mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-01-18 07:55:03 +00:00
mmg: initialize wxLocale with English if none/unknown selected
This commit is contained in:
parent
da82a20dcc
commit
4246ab4e78
@ -115,11 +115,11 @@ mmg_app::init_ui_locale() {
|
|||||||
std::string installation_path = get_installation_path();
|
std::string installation_path = get_installation_path();
|
||||||
if (!installation_path.empty())
|
if (!installation_path.empty())
|
||||||
wxLocale::AddCatalogLookupPathPrefix(wxU(installation_path + "/locale"));
|
wxLocale::AddCatalogLookupPathPrefix(wxU(installation_path + "/locale"));
|
||||||
}
|
|
||||||
|
|
||||||
const wxLanguageInfo *lang_info = wxLocale::FindLanguageInfo(wxU(m_ui_locale));
|
auto lang_info = !m_ui_locale.empty() ? wxLocale::FindLanguageInfo(wxU(m_ui_locale)) : nullptr;
|
||||||
if (s_first_init) {
|
auto language = lang_info ? lang_info->Language : wxLANGUAGE_ENGLISH;
|
||||||
if (lang_info && m_locale.Init(lang_info->Language)) {
|
|
||||||
|
if (lang_info && m_locale.Init(language)) {
|
||||||
m_locale.AddCatalog(wxU("wxstd"));
|
m_locale.AddCatalog(wxU("wxstd"));
|
||||||
#ifdef SYS_WINDOWS
|
#ifdef SYS_WINDOWS
|
||||||
m_locale.AddCatalog(wxU("wxmsw"));
|
m_locale.AddCatalog(wxU("wxmsw"));
|
||||||
|
Loading…
Reference in New Issue
Block a user