Call m_locale->Init() with option wxLOCALE_DONT_LOAD_DEFAULT to avoid any warning message.
We do not use or install the wxWidgets dictionaries, so do not use the default option (wxLOCALE_LOAD_DEFAULT) when initializing wxLocale.
This commit is contained in:
parent
cf334b1ebb
commit
e954531ca8
|
@ -418,7 +418,9 @@ bool PGM_BASE::SetLanguage( wxString& aErrMsg, bool first_time )
|
|||
delete m_locale;
|
||||
m_locale = new wxLocale;
|
||||
|
||||
if( !m_locale->Init( m_language_id ) )
|
||||
// don't use wxLOCALE_LOAD_DEFAULT flag so that Init() doesn't return
|
||||
// false just because it failed to load wxstd catalog
|
||||
if( !m_locale->Init( m_language_id, wxLOCALE_DONT_LOAD_DEFAULT ) )
|
||||
{
|
||||
wxLogTrace( traceLocale, "This language is not supported by the system." );
|
||||
|
||||
|
@ -426,7 +428,7 @@ bool PGM_BASE::SetLanguage( wxString& aErrMsg, bool first_time )
|
|||
delete m_locale;
|
||||
|
||||
m_locale = new wxLocale;
|
||||
m_locale->Init();
|
||||
m_locale->Init( wxLANGUAGE_DEFAULT, wxLOCALE_DONT_LOAD_DEFAULT);
|
||||
|
||||
aErrMsg = _( "This language is not supported by the operating system." );
|
||||
return false;
|
||||
|
@ -477,7 +479,7 @@ bool PGM_BASE::SetLanguage( wxString& aErrMsg, bool first_time )
|
|||
delete m_locale;
|
||||
|
||||
m_locale = new wxLocale;
|
||||
m_locale->Init();
|
||||
m_locale->Init( wxLANGUAGE_DEFAULT, wxLOCALE_DONT_LOAD_DEFAULT);
|
||||
|
||||
aErrMsg = _( "The KiCad language file for this language is not installed." );
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue