mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-15 12:09:06 +00:00
CHANGED: #1471 Added a new property for CI18N noResolution, when it's set the translation labels are not resolved, and it's set while using the GUI Editor.
This commit is contained in:
parent
e9d142b37a
commit
5760a4b852
3 changed files with 16 additions and 0 deletions
|
@ -206,6 +206,8 @@ public:
|
|||
static void hashToUCString(uint64 hash, ucstring &dst);
|
||||
//@}
|
||||
|
||||
static void setNoResolution( bool b ){ noResolution = b; }
|
||||
|
||||
private:
|
||||
|
||||
typedef std::map<std::string, ucstring> StrMapContainer;
|
||||
|
@ -254,6 +256,9 @@ private:
|
|||
TLineFormat lineFmt,
|
||||
bool warnIfIncludesNotFound,
|
||||
TReadContext &readContext);
|
||||
|
||||
// Don't resolve labels
|
||||
static bool noResolution;
|
||||
};
|
||||
|
||||
} // NLMISC
|
||||
|
|
|
@ -33,6 +33,7 @@ string CI18N::_SelectedLanguageCode;
|
|||
CI18N::ILoadProxy *CI18N::_LoadProxy = 0;
|
||||
vector<string> CI18N::_LanguageCodes;
|
||||
vector<ucstring> CI18N::_LanguageNames;
|
||||
bool CI18N::noResolution = false;
|
||||
|
||||
void CI18N::setLoadProxy(ILoadProxy *loadProxy)
|
||||
{
|
||||
|
@ -160,6 +161,13 @@ void CI18N::loadFromFilename(const string &filename, bool reload)
|
|||
|
||||
const ucstring &CI18N::get (const string &label)
|
||||
{
|
||||
if( noResolution )
|
||||
{
|
||||
static ucstring labelString;
|
||||
labelString = label;
|
||||
return labelString;
|
||||
}
|
||||
|
||||
if (label.empty())
|
||||
{
|
||||
static ucstring emptyString;
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "nel/gui/interface_group.h"
|
||||
#include "nel/gui/widget_manager.h"
|
||||
#include "nel/misc/path.h"
|
||||
#include "nel/misc/i18n.h"
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
|
@ -36,11 +37,13 @@ namespace GUIEditor
|
|||
NelGUIWidget::~NelGUIWidget()
|
||||
{
|
||||
NLGUI::CViewRenderer::release();
|
||||
NLMISC::CI18N::setNoResolution( false );
|
||||
|
||||
}
|
||||
|
||||
void NelGUIWidget::init()
|
||||
{
|
||||
NLMISC::CI18N::setNoResolution( true );
|
||||
NLMISC::CPath::remapExtension( "dds", "tga", true );
|
||||
NLMISC::CPath::remapExtension( "dds", "png", true );
|
||||
NLMISC::CPath::remapExtension( "png", "tga", true );
|
||||
|
|
Loading…
Reference in a new issue