]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/intl.cpp
wxLaunchDefaultBrowser messages should be localized
[wxWidgets.git] / src / common / intl.cpp
index 3bc3f8b79f996130bf9e1d8b008f5b9743f8c781..c03a9824b32a0192e1295c78016b632326ea6d1e 100644 (file)
@@ -1036,8 +1036,7 @@ 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
-    wxString pathPrefix;
-    pathPrefix << prefix << wxFILE_SEP_PATH << lang;
+    const wxString pathPrefix = wxFileName(prefix, lang).GetFullPath();
 
     wxString searchPath;
     searchPath.reserve(4*pathPrefix.length());
@@ -1941,12 +1940,9 @@ void wxLocale::AddCatalogLookupPathPrefix(const wxString& prefix)
     // because the locale identifier (kCFLocaleIdentifier) is formatted a little bit differently, eg 
     // az_Cyrl_AZ@calendar=buddhist;currency=JPY we just recreate the base info as expected by wx here
     
-    CFTypeRef cfstr = CFLocaleGetValue(userLocaleRef, kCFLocaleLanguageCode);
-    wxMacCFStringHolder str(CFStringCreateCopy(NULL, static_cast<CFStringRef>(cfstr)));
+    wxMacCFStringHolder str(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleLanguageCode)));
     langFull = str.AsString()+"_";
-        
-    cfstr = CFLocaleGetValue(userLocaleRef, kCFLocaleCountryCode);
-    str.Assign(CFStringCreateCopy(NULL, static_cast<CFStringRef>(cfstr)));
+    str.Assign(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleCountryCode)));
     langFull += str.AsString();
 #else
     if (!wxGetEnv(wxT("LC_ALL"), &langFull) &&