From b55fb15b897a486074ad70c3886867354b11037f Mon Sep 17 00:00:00 2001 From: lllucius Date: Sat, 2 Apr 2011 01:48:51 +0000 Subject: [PATCH] Bug #335 - corrects loading of wxWidgets message catalogs after changing languages. --- src/AudacityApp.cpp | 5 +++++ src/prefs/EffectsPrefs.cpp | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp index 6dad64295..3fe32fb09 100644 --- a/src/AudacityApp.cpp +++ b/src/AudacityApp.cpp @@ -936,6 +936,11 @@ void AudacityApp::InitLang( const wxString & lang ) for(unsigned int i=0; iAddCatalogLookupPathPrefix(audacityPathList[i]); + // LL: Must add the wxWidgets catalog manually since the search + // paths were not set up when mLocale was created. The + // catalogs are search in LIFO order, so add wxstd first. + mLocale->AddCatalog(wxT("wxstd")); + #ifdef AUDACITY_NAME mLocale->AddCatalog(wxT(AUDACITY_NAME)); #else diff --git a/src/prefs/EffectsPrefs.cpp b/src/prefs/EffectsPrefs.cpp index 7728bafdf..08294f975 100644 --- a/src/prefs/EffectsPrefs.cpp +++ b/src/prefs/EffectsPrefs.cpp @@ -124,12 +124,6 @@ bool EffectsPrefs::Apply() ShuttleGui S(this, eIsSavingToPrefs); PopulateOrExchange(S); - // If language has changed, we want to change it now, not on the next reboot. - wxString lang = gPrefs->Read(wxT("/Locale/Language"), wxT("")); - if (lang == wxT("")) - lang = GetSystemLanguageCode(); - wxGetApp().InitLang(lang); - return true; }