Fix for #9779 - PrusaSlicer2.6alpha4 Cannot set locale to language "Chinese (Simplified, China)".

(Related to #9476 PrusaSlicer2.6alpha2 Switching PrusaSlicer to language zh_TW failed.)

After fix from upstream wxWidgets (see a3e925df0a (diff-1e3658a254af33d4cb78b07040114b18d8a0642fe928f65fdfbd4746d8cc0f4a)) issue is disappeared and workaround is no needed now.
This commit is contained in:
YuSanka 2023-06-08 13:11:51 +02:00
parent d7d223d759
commit b9df1deb0e
2 changed files with 2 additions and 9 deletions

View file

@ -2281,14 +2281,7 @@ bool GUI_App::load_language(wxString language, bool initial)
}
#endif
#ifdef __APPLE__
// ysFIXME after fix for wxWidgets issue (https://github.com/wxWidgets/wxWidgets/issues/23209)
// Workaround for wxLANGUAGE_CHINESE(...) languages => Allow to continue even if wxLocale is not available.
// Because of translation will works fine, just locales will set to EN
if (! wxLocale::IsAvailable(language_info->Language) && language_info->CanonicalName.BeforeFirst('_') != "zh" ) {
#else
if (! wxLocale::IsAvailable(language_info->Language)) {
#endif
// Loading the language dictionary failed.
wxString message = "Switching PrusaSlicer to language " + language_info->CanonicalName + " failed.";
#if !defined(_WIN32) && !defined(__APPLE__)