Language of character tags in Character Search dialog resolved to match UI language
This commit is contained in:
parent
6253f2c267
commit
2b2b2656b3
@ -32,6 +32,7 @@ wxIMPLEMENT_APP(ZRColaApp);
|
|||||||
|
|
||||||
ZRColaApp::ZRColaApp() :
|
ZRColaApp::ZRColaApp() :
|
||||||
m_mainWnd(NULL),
|
m_mainWnd(NULL),
|
||||||
|
m_lang_ui(wxLANGUAGE_DEFAULT),
|
||||||
wxApp()
|
wxApp()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -55,7 +56,7 @@ bool ZRColaApp::OnInit()
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Initialize locale.
|
// Initialize locale.
|
||||||
if (wxInitializeLocale(m_locale)) {
|
if (wxInitializeLocale(m_locale, &m_lang_ui)) {
|
||||||
wxVERIFY(m_locale.AddCatalog(wxT("wxExtend") wxT(wxExtendVersion)));
|
wxVERIFY(m_locale.AddCatalog(wxT("wxExtend") wxT(wxExtendVersion)));
|
||||||
wxVERIFY(m_locale.AddCatalog(wxT("UpdaterZRCola")));
|
wxVERIFY(m_locale.AddCatalog(wxT("UpdaterZRCola")));
|
||||||
wxVERIFY(m_locale.AddCatalog(wxT("libZRColaUI")));
|
wxVERIFY(m_locale.AddCatalog(wxT("libZRColaUI")));
|
||||||
|
@ -84,6 +84,7 @@ public:
|
|||||||
wxZRColaFrame *m_mainWnd; ///< Main window
|
wxZRColaFrame *m_mainWnd; ///< Main window
|
||||||
|
|
||||||
wxLocale m_locale; ///< Current locale
|
wxLocale m_locale; ///< Current locale
|
||||||
|
wxLanguage m_lang_ui; ///< Translation language (language of User Interface, wxLANGUAGE_DEFAULT = English)
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
|
@ -35,8 +35,9 @@ wxZRColaCharSelect::wxZRColaCharSelect(wxWindow* parent) :
|
|||||||
wxZRColaCharSelectBase(parent)
|
wxZRColaCharSelectBase(parent)
|
||||||
{
|
{
|
||||||
// Set tag lookup locale.
|
// Set tag lookup locale.
|
||||||
auto language = static_cast<wxLanguage>(dynamic_cast<ZRColaApp*>(wxTheApp)->m_locale.GetLanguage());
|
wxLanguage language = dynamic_cast<ZRColaApp*>(wxTheApp)->m_lang_ui;
|
||||||
if (wxLANGUAGE_ENGLISH <= language && language <= wxLANGUAGE_ENGLISH_ZIMBABWE) m_locale = MAKELCID(MAKELANGID(LANG_ENGLISH , SUBLANG_DEFAULT), SORT_DEFAULT);
|
if (wxLANGUAGE_DEFAULT == language ||
|
||||||
|
wxLANGUAGE_ENGLISH <= language && language <= wxLANGUAGE_ENGLISH_ZIMBABWE) m_locale = MAKELCID(MAKELANGID(LANG_ENGLISH , SUBLANG_DEFAULT), SORT_DEFAULT);
|
||||||
else if (wxLANGUAGE_RUSSIAN <= language && language <= wxLANGUAGE_RUSSIAN_UKRAINE ) m_locale = MAKELCID(MAKELANGID(LANG_RUSSIAN , SUBLANG_DEFAULT), SORT_DEFAULT);
|
else if (wxLANGUAGE_RUSSIAN <= language && language <= wxLANGUAGE_RUSSIAN_UKRAINE ) m_locale = MAKELCID(MAKELANGID(LANG_RUSSIAN , SUBLANG_DEFAULT), SORT_DEFAULT);
|
||||||
else if (wxLANGUAGE_SLOVENIAN == language ) m_locale = MAKELCID(MAKELANGID(LANG_SLOVENIAN, SUBLANG_DEFAULT), SORT_DEFAULT);
|
else if (wxLANGUAGE_SLOVENIAN == language ) m_locale = MAKELCID(MAKELANGID(LANG_SLOVENIAN, SUBLANG_DEFAULT), SORT_DEFAULT);
|
||||||
else m_locale = MAKELCID(MAKELANGID(LANG_ENGLISH , SUBLANG_DEFAULT), SORT_DEFAULT);
|
else m_locale = MAKELCID(MAKELANGID(LANG_ENGLISH , SUBLANG_DEFAULT), SORT_DEFAULT);
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit b644d08eac98260556cf3d059a2d272f98955097
|
Subproject commit 05627f98d6b9f2cca5ac9765d516353fb17e0e6a
|
Loading…
x
Reference in New Issue
Block a user