Bug 2709 - Mac: Missing sub-menu check marks in French
This commit is contained in:
parent
811065cff4
commit
e80ec51a32
|
@ -1548,6 +1548,21 @@ bool AudacityApp::InitPart2()
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(__WXMAC__)
|
||||
// Bug 2709: Workaround CoreSVG locale issue
|
||||
Bind(wxEVT_MENU_OPEN, [=](wxMenuEvent &event)
|
||||
{
|
||||
wxSetlocale(LC_NUMERIC, wxString(wxT("C")));
|
||||
event.Skip();
|
||||
});
|
||||
|
||||
Bind(wxEVT_MENU_CLOSE, [=](wxMenuEvent &event)
|
||||
{
|
||||
wxSetlocale(LC_NUMERIC, GUIPrefs::GetLocaleName());
|
||||
event.Skip();
|
||||
});
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -270,6 +270,7 @@ wxString GUIPrefs::InitLang( wxString langCode )
|
|||
}
|
||||
|
||||
static std::unique_ptr<wxLocale> sLocale;
|
||||
static wxString sLocaleName;
|
||||
|
||||
wxString GUIPrefs::SetLang( const wxString & lang )
|
||||
{
|
||||
|
@ -337,9 +338,16 @@ wxString GUIPrefs::SetLang( const wxString & lang )
|
|||
wxApp::s_macHelpMenuTitleName = _("&Help");
|
||||
#endif
|
||||
|
||||
sLocaleName = wxSetlocale(LC_ALL, NULL);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
wxString GUIPrefs::GetLocaleName()
|
||||
{
|
||||
return sLocaleName;
|
||||
}
|
||||
|
||||
wxString GUIPrefs::GetLang()
|
||||
{
|
||||
if (sLocale)
|
||||
|
|
|
@ -55,6 +55,8 @@ class GUIPrefs final : public PrefsPanel
|
|||
// Unlike GetLang, gives en rather than en_GB or en_US for result.
|
||||
static wxString GetLangShort();
|
||||
|
||||
static wxString GetLocaleName();
|
||||
|
||||
private:
|
||||
void Populate();
|
||||
|
||||
|
|
Loading…
Reference in New Issue