X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b3dbb11c7dc18296e38d04f6a893355f87e31e7..ac9d38d811747d38bcd1747fb95878b03cdf24f0:/src/common/intl.cpp diff --git a/src/common/intl.cpp b/src/common/intl.cpp index 3bc3f8b79f..c03a9824b3 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -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(cfstr))); + wxMacCFStringHolder str(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleLanguageCode))); langFull = str.AsString()+"_"; - - cfstr = CFLocaleGetValue(userLocaleRef, kCFLocaleCountryCode); - str.Assign(CFStringCreateCopy(NULL, static_cast(cfstr))); + str.Assign(wxCFRetain((CFStringRef)CFLocaleGetValue(userLocaleRef, kCFLocaleCountryCode))); langFull += str.AsString(); #else if (!wxGetEnv(wxT("LC_ALL"), &langFull) &&