X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9e7ed2b008e4c179b4b46449877f2e492cc0ab9f..baaae89f09ece7ab8a17570ee535683b9d14aeda:/src/common/intl.cpp diff --git a/src/common/intl.cpp b/src/common/intl.cpp index 168c333343..7d115e81a6 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -307,15 +307,19 @@ static wxString GetFullSearchPath(const wxChar *lang) wxGetWorkingDirectory( cwd , sizeof( cwd ) ) ; searchPath << GetAllMsgCatalogSubdirs(cwd, lang); // generic search paths could be somewhere in the system folder preferences -#else +#else // !Mac searchPath << GetAllMsgCatalogSubdirs(wxT("."), lang); +#ifdef __UNIX__ // and finally add some standard ones searchPath << GetAllMsgCatalogSubdirs(wxT("/usr/share/locale"), lang) << GetAllMsgCatalogSubdirs(wxT("/usr/lib/locale"), lang) << GetAllMsgCatalogSubdirs(wxT("/usr/local/share/locale"), lang); -#endif +#endif // __UNIX__ + +#endif // platform + return searchPath; } @@ -444,7 +448,7 @@ void wxMsgCatalogFile::FillHash(wxMessagesHash& hash, bool convertEncoding) cons if ( convertEncoding ) { wxFontEncoding targetEnc = wxFONTENCODING_SYSTEM; - wxFontEncoding enc = wxTheFontMapper->CharsetToEncoding(charset, FALSE); + wxFontEncoding enc = wxFontMapper::Get()->CharsetToEncoding(charset, FALSE); if ( enc == wxFONTENCODING_SYSTEM ) { convertEncoding = FALSE; // unknown encoding @@ -678,7 +682,7 @@ bool wxLocale::Init(int language, int flags) const wxChar *retloc; // Set the locale: -#ifdef __UNIX__ +#if defined(__UNIX__) && !defined(__WXMAC__) if (language == wxLANGUAGE_DEFAULT) locale = wxEmptyString; else @@ -789,7 +793,7 @@ void wxLocale::AddCatalogLookupPathPrefix(const wxString& prefix) size_t i = 0, count = ms_languagesDB->GetCount(); -#if defined(__UNIX__) +#if defined(__UNIX__) && !defined(__WXMAC__) // first get the string identifying the language from the environment wxString langFull; if (!wxGetEnv(wxT("LC_ALL"), &langFull) && @@ -912,7 +916,7 @@ void wxLocale::AddCatalogLookupPathPrefix(const wxString& prefix) } } #elif defined(__WXMAC__) - char* lc = NULL ; + const char* lc = NULL ; long lang = GetScriptVariable( smSystemScript, smScriptLang) ; switch( GetScriptManagerVariable( smRegionCode ) ) { case verUS : @@ -1340,7 +1344,7 @@ wxFontEncoding wxLocale::GetSystemEncoding() wxString encname = GetSystemEncodingName(); if ( !encname.empty() ) { - wxFontEncoding enc = wxTheFontMapper-> + wxFontEncoding enc = wxFontMapper::Get()-> CharsetToEncoding(encname, FALSE /* not interactive */); // this should probably be considered as a bug in CharsetToEncoding(): @@ -1425,12 +1429,14 @@ const wxChar *wxLocale::GetString(const wxChar *szOrigString, if ( szDomain != NULL ) { - wxLogDebug(_T("string '%s' not found in domain '%s' for locale '%s'."), - szOrigString, szDomain, m_strLocale.c_str()); + wxLogTrace(_T("i18n"), + _T("string '%s' not found in domain '%s' for locale '%s'."), + szOrigString, szDomain, m_strLocale.c_str()); } else { - wxLogDebug(_T("string '%s' not found in locale '%s'."), + wxLogTrace(_T("i18n"), + _T("string '%s' not found in locale '%s'."), szOrigString, m_strLocale.c_str()); } }