X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e7c80f9e052d3d50b3d7780b21e55d8c5586cdea..991a9f971006f5a1cff46c1e90fba539b3771a2d:/src/common/intl.cpp diff --git a/src/common/intl.cpp b/src/common/intl.cpp index 0f3e9b0572..2bb34b78cf 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -46,6 +46,7 @@ #include "wx/log.h" #include "wx/utils.h" #include "wx/app.h" + #include "wx/hashmap.h" #endif // WX_PRECOMP #ifndef __WXWINCE__ @@ -71,7 +72,6 @@ #include "wx/module.h" #include "wx/fontmap.h" #include "wx/encconv.h" -#include "wx/hashmap.h" #include "wx/ptr_scpd.h" #include "wx/apptrait.h" #include "wx/stdpaths.h" @@ -1583,11 +1583,13 @@ bool wxLocale::Init(const wxChar *szName, // there may be a catalog with toolkit specific overrides, it is not // an error if this does not exist - if ( bOk && wxTheApp ) + if ( bOk ) { - wxAppTraits *traits = wxTheApp->GetTraits(); - if (traits) - AddCatalog(traits->GetToolkitInfo().name.BeforeFirst(wxT('/')).MakeLower()); + wxString port(wxPlatformInfo().GetPortIdName()); + if ( !port.empty() ) + { + AddCatalog(port.BeforeFirst(wxT('/')).MakeLower()); + } } } @@ -1939,9 +1941,9 @@ void wxLocale::AddCatalogLookupPathPrefix(const wxString& prefix) // check for this // do we have just the language (or sublang too)? - bool justLang = langFull.Len() == LEN_LANG; + bool justLang = langFull.length() == LEN_LANG; if ( justLang || - (langFull.Len() == LEN_FULL && langFull[LEN_LANG] == wxT('_')) ) + (langFull.length() == LEN_FULL && langFull[LEN_LANG] == wxT('_')) ) { // 0. Make sure the lang is according to latest ISO 639 // (this is necessary because glibc uses iw and in instead @@ -3557,7 +3559,6 @@ void wxLocale::InitLanguagesDB() LNG(wxLANGUAGE_SANGHO, "sg" , 0 , 0 , "Sangho") LNG(wxLANGUAGE_SANSKRIT, "sa" , LANG_SANSKRIT , SUBLANG_DEFAULT , "Sanskrit") LNG(wxLANGUAGE_SCOTS_GAELIC, "gd" , 0 , 0 , "Scots Gaelic") - LNG(wxLANGUAGE_SERBIAN, "sr_YU", LANG_SERBIAN , SUBLANG_DEFAULT , "Serbian") LNG(wxLANGUAGE_SERBIAN_CYRILLIC, "sr_YU", LANG_SERBIAN , SUBLANG_SERBIAN_CYRILLIC , "Serbian (Cyrillic)") LNG(wxLANGUAGE_SERBIAN_LATIN, "sr_YU", LANG_SERBIAN , SUBLANG_SERBIAN_LATIN , "Serbian (Latin)") LNG(wxLANGUAGE_SERBO_CROATIAN, "sh" , 0 , 0 , "Serbo-Croatian")