1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-21 08:27:13 +01:00

wxLocale constructor we used has been deprecated

And it doesn't do all of the same initialization as the new one, so we
get assertions on Windows (not sure why the other two didn't complain).

Warning in wx302 manual says:

   Deprecated:
       This form is deprecated, use the other one unless you know what you are doing.

So, best to use the new one.  This DOES mean that we WILL have to
testing locales again which is fine cause we had some work to do
there anyway.
This commit is contained in:
Leland Lucius
2015-07-19 17:38:31 -05:00
parent 54676a7228
commit 8bf6668ff3

View File

@@ -1021,11 +1021,12 @@ void AudacityApp::InitLang( const wxString & lang )
wxSetEnv(wxT("LANG"), wxT("en_US.UTF-8"));
#endif
#if wxCHECK_VERSION(3,0,0)
mLocale = new wxLocale(wxT(""), lang, wxT(""), true);
#else
mLocale = new wxLocale(wxT(""), lang, wxT(""), true, true);
#endif
const wxLanguageInfo *info = wxLocale::FindLanguageInfo(lang);
if (!lang)
{
return;
}
mLocale = new wxLocale(info->Language);
for(unsigned int i=0; i<audacityPathList.GetCount(); i++)
mLocale->AddCatalogLookupPathPrefix(audacityPathList[i]);