X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/616ae1e8434e55bc11dcd0570e96a610bc7e88e5..d2bb4c8653ae01c57ecd9a8ad899da06f865f5da:/src/common/translation.cpp?ds=sidebyside diff --git a/src/common/translation.cpp b/src/common/translation.cpp index 0aea6979b3..00350928a5 100644 --- a/src/common/translation.cpp +++ b/src/common/translation.cpp @@ -155,13 +155,13 @@ wxString GetPreferredUILanguage(const wxArrayString& available) { wxString lang(*j); lang.Replace("-", "_"); - if ( available.Index(lang) != wxNOT_FOUND ) + if ( available.Index(lang, /*bCase=*/false) != wxNOT_FOUND ) return lang; size_t pos = lang.find('_'); if ( pos != wxString::npos ) { lang = lang.substr(0, pos); - if ( available.Index(lang) != wxNOT_FOUND ) + if ( available.Index(lang, /*bCase=*/false) != wxNOT_FOUND ) return lang; } } @@ -289,7 +289,7 @@ public: T_LEFT_BRACKET, T_RIGHT_BRACKET }; Type type() const { return m_type; } - void setType(Type type) { m_type = type; } + void setType(Type t) { m_type = t; } // for T_NUMBER only typedef int Number; Number number() const { return m_number; } @@ -466,7 +466,7 @@ private: class wxPluralFormsNode { public: - wxPluralFormsNode(const wxPluralFormsToken& token) : m_token(token) {} + wxPluralFormsNode(const wxPluralFormsToken& t) : m_token(t) {} const wxPluralFormsToken& token() const { return m_token; } const wxPluralFormsNode* node(unsigned i) const { return m_nodes[i].get(); } @@ -1512,7 +1512,6 @@ bool wxTranslations::AddCatalog(const wxString& domain, bool wxTranslations::LoadCatalog(const wxString& domain, const wxString& lang) { - m_loader->GetAvailableTranslations(domain); wxCHECK_MSG( m_loader, false, "loader can't be NULL" ); wxMsgCatalog *cat = NULL; @@ -1765,13 +1764,13 @@ wxString GetMsgCatalogSubdirs(const wxString& prefix, const wxString& lang) // breaking apps after they are recompiled against the latest wx // b) it makes it possible to package app's support files in the same // way on all target platforms - const wxString pathPrefix = wxFileName(prefix, lang).GetFullPath(); + const wxString prefixAndLang = wxFileName(prefix, lang).GetFullPath(); wxString searchPath; - searchPath.reserve(4*pathPrefix.length()); - searchPath << pathPrefix << wxFILE_SEP_PATH << "LC_MESSAGES" << wxPATH_SEP - << prefix << wxFILE_SEP_PATH << wxPATH_SEP - << pathPrefix; + searchPath.reserve(4*prefixAndLang.length()); + searchPath << prefixAndLang << wxFILE_SEP_PATH << "LC_MESSAGES" << wxPATH_SEP + << prefixAndLang << wxPATH_SEP + << prefix; return searchPath; } @@ -1950,7 +1949,7 @@ wxMsgCatalog *wxResourceTranslationsLoader::LoadCatalog(const wxString& domain, if ( !wxLoadUserResource(&mo_data, &mo_size, resname, - GetResourceType(), + GetResourceType().t_str(), GetModule()) ) return NULL;