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:
parent
d2847fe4c4
commit
877ffc3287
@ -25,7 +25,7 @@ namespace CrashReport {
|
|||||||
void Generate(wxDebugReport::Context ctx)
|
void Generate(wxDebugReport::Context ctx)
|
||||||
{
|
{
|
||||||
wxDebugReportCompress rpt;
|
wxDebugReportCompress rpt;
|
||||||
rpt.AddAll(ctx);
|
//rpt.AddAll(ctx);
|
||||||
|
|
||||||
wxFileNameWrapper fn{ FileNames::DataDir(), wxT("audacity.cfg") };
|
wxFileNameWrapper fn{ FileNames::DataDir(), wxT("audacity.cfg") };
|
||||||
rpt.AddFile(fn.GetFullPath(), _TS("Audacity Configuration"));
|
rpt.AddFile(fn.GetFullPath(), _TS("Audacity Configuration"));
|
||||||
@ -34,7 +34,7 @@ void Generate(wxDebugReport::Context ctx)
|
|||||||
|
|
||||||
if (ctx == wxDebugReport::Context_Current)
|
if (ctx == wxDebugReport::Context_Current)
|
||||||
{
|
{
|
||||||
auto saveLang = GUIPrefs::GetLang();
|
auto saveLang = GUIPrefs::GetLangShort();
|
||||||
GUIPrefs::InitLang( wxT("en") );
|
GUIPrefs::InitLang( wxT("en") );
|
||||||
auto cleanup = finally( [&]{ GUIPrefs::InitLang( saveLang ); } );
|
auto cleanup = finally( [&]{ GUIPrefs::InitLang( saveLang ); } );
|
||||||
|
|
||||||
|
@ -366,6 +366,14 @@ wxString GUIPrefs::GetLang()
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxString GUIPrefs::GetLangShort()
|
||||||
|
{
|
||||||
|
if (sLocale)
|
||||||
|
return sLocale->GetName();
|
||||||
|
else
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
int ShowClippingPrefsID()
|
int ShowClippingPrefsID()
|
||||||
{
|
{
|
||||||
static int value = wxNewId();
|
static int value = wxNewId();
|
||||||
|
@ -52,6 +52,9 @@ class GUIPrefs final : public PrefsPanel
|
|||||||
|
|
||||||
// Returns the last language code that was set
|
// Returns the last language code that was set
|
||||||
static wxString GetLang();
|
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:
|
private:
|
||||||
void Populate();
|
void Populate();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user