diff --git a/src/CrashReport.cpp b/src/CrashReport.cpp index 7809957b3..d67197731 100644 --- a/src/CrashReport.cpp +++ b/src/CrashReport.cpp @@ -25,7 +25,7 @@ namespace CrashReport { void Generate(wxDebugReport::Context ctx) { wxDebugReportCompress rpt; - rpt.AddAll(ctx); + //rpt.AddAll(ctx); wxFileNameWrapper fn{ FileNames::DataDir(), wxT("audacity.cfg") }; rpt.AddFile(fn.GetFullPath(), _TS("Audacity Configuration")); @@ -34,7 +34,7 @@ void Generate(wxDebugReport::Context ctx) if (ctx == wxDebugReport::Context_Current) { - auto saveLang = GUIPrefs::GetLang(); + auto saveLang = GUIPrefs::GetLangShort(); GUIPrefs::InitLang( wxT("en") ); auto cleanup = finally( [&]{ GUIPrefs::InitLang( saveLang ); } ); diff --git a/src/prefs/GUIPrefs.cpp b/src/prefs/GUIPrefs.cpp index 8d44e4818..db3e73699 100644 --- a/src/prefs/GUIPrefs.cpp +++ b/src/prefs/GUIPrefs.cpp @@ -366,6 +366,14 @@ wxString GUIPrefs::GetLang() return {}; } +wxString GUIPrefs::GetLangShort() +{ + if (sLocale) + return sLocale->GetName(); + else + return {}; +} + int ShowClippingPrefsID() { static int value = wxNewId(); diff --git a/src/prefs/GUIPrefs.h b/src/prefs/GUIPrefs.h index 55365d842..f9be82a07 100644 --- a/src/prefs/GUIPrefs.h +++ b/src/prefs/GUIPrefs.h @@ -52,6 +52,9 @@ class GUIPrefs final : public PrefsPanel // Returns the last language code that was set static wxString GetLang(); + // Returns the last language code that was set + // Unlike GetLang, gives en rather than en_GB or en_US for result. + static wxString GetLangShort(); private: void Populate();