1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-19 14:17:41 +02:00

Bug 2344 - Windows: Generate Support Data shows info/error message re. language

This commit is contained in:
James Crook 2020-03-06 12:06:17 +00:00
parent d2847fe4c4
commit 877ffc3287
3 changed files with 13 additions and 2 deletions

View File

@ -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 ); } );

View File

@ -366,6 +366,14 @@ wxString GUIPrefs::GetLang()
return {};
}
wxString GUIPrefs::GetLangShort()
{
if (sLocale)
return sLocale->GetName();
else
return {};
}
int ShowClippingPrefsID()
{
static int value = wxNewId();

View File

@ -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();