]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/translation.cpp
formatting
[wxWidgets.git] / src / common / translation.cpp
index e9bbd0e4eb3c65be5284686fc2a5311a384b826a..00350928a5417e57fde4f2c0765808533fa0a92a 100644 (file)
@@ -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;
                     }
                 }
@@ -1764,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;
 }