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

@ -13,8 +13,8 @@ if (UNIX AND NOT APPLE) # wxWidgets will not use char as the underlying type for
endif()
prusaslicer_add_cmake_project(wxWidgets
URL https://github.com/prusa3d/wxWidgets/archive/0b49beaacce17d90f0c370ecd73221abd089667a.zip
URL_HASH SHA256=8fa978a76d6bd811b30eecc5124186b9ad54290b820f3a354e85bfa9dae6a5ce
URL https://github.com/prusa3d/wxWidgets/archive/c71b02d8efc2c73e9d3c7fc3c597e01c99953eaa.zip
URL_HASH SHA256=541363297fe6b120c788ae58b11622c899ea497a09445b74a283cb5b2546d027
DEPENDS ${PNG_PKG} ${ZLIB_PKG} ${EXPAT_PKG} dep_TIFF dep_JPEG dep_NanoSVG
CMAKE_ARGS
-DwxBUILD_PRECOMP=ON

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__)