diff --git a/nel/include/nel/gui/view_text.h b/nel/include/nel/gui/view_text.h index e7405a2dd..b4796bf4f 100644 --- a/nel/include/nel/gui/view_text.h +++ b/nel/include/nel/gui/view_text.h @@ -119,8 +119,8 @@ namespace NLGUI void enableStringSelection(uint start, uint end); void disableStringSelection(); - /// Get - std::string getText() const { return _HardText.empty() ? _Text : _HardText; } + /// Get displayed text + std::string getText() const { return _Text; } #ifdef RYZOM_LUA_UCSTRING ucstring getTextAsUtf16() const; // Compatibility ucstring getHardTextAsUtf16() const; // Compatibility @@ -188,6 +188,7 @@ namespace NLGUI /// From a line number, get the character at which it ends (not including any '\n' ), or -1 if invalid void getLineEndIndex(uint line, sint &index, bool &endOfPreviousLine) const; + /// If localized, return localization key (ie "uiLanguage"), else return displayed text. std::string getHardText() const { return _HardText.empty() ? _Text : _HardText; } void setHardText (const std::string &ht); //< Localizes strings starting with "ui" #ifdef RYZOM_LUA_UCSTRING diff --git a/nel/src/gui/view_text.cpp b/nel/src/gui/view_text.cpp index 814f88469..44c9c3c38 100644 --- a/nel/src/gui/view_text.cpp +++ b/nel/src/gui/view_text.cpp @@ -1469,7 +1469,7 @@ namespace NLGUI } } - nlassert(_Text.empty() || ((_Localized && (NLMISC::startsWith(getText(), "ui"))) == (_HardText.empty() == _Text.empty()))); + nlassert(_Text.empty() || ((_Localized && (NLMISC::startsWith(getHardText(), "ui"))) == (_HardText.empty() == _Text.empty()))); } // ***************************************************************************