diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3656b6f22..9f65a46bb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -246,6 +246,12 @@ else () COMMAND ln -sfn "${SLIC3R_RESOURCES_DIR}" "${BIN_RESOURCES_DIR}" COMMENT "Symlinking the resources directory into the build tree" VERBATIM) + if (UNIX AND NOT APPLE) + add_custom_command(TARGET BambuStudio POST_BUILD + COMMAND ln -sfn "zh_cn" "${BIN_RESOURCES_DIR}/i18n/zh_CN" + COMMENT "Symlinking zh_CN language setting to zh_cn" + VERBATIM) + endif() endif () # Slic3r binary install target. Default build type is release in case no CMAKE_BUILD_TYPE is provided. diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index a3229b415..957e886db 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -4796,7 +4796,7 @@ bool GUI_App::load_language(wxString language, bool initial) // Get the active language from PrusaSlicer.ini, or empty string if the key does not exist. language = app_config->get("language"); if (! language.empty()) - BOOST_LOG_TRIVIAL(trace) << boost::format("language provided by PBambuStudio.conf: %1%") % language; + BOOST_LOG_TRIVIAL(trace) << boost::format("language provided by BambuStudio.conf: %1%") % language; else { // Get the system language. const wxLanguage lang_system = wxLanguage(wxLocale::GetSystemLanguage()); @@ -4902,7 +4902,7 @@ bool GUI_App::load_language(wxString language, bool initial) #ifdef __linux__ // If we can't find this locale , try to use different one for the language // instead of just reporting that it is impossible to switch. - if (! wxLocale::IsAvailable(language_info->Language)) { + if (! wxLocale::IsAvailable(language_info->Language) && m_language_info_system) { std::string original_lang = into_u8(language_info->CanonicalName); language_info = linux_get_existing_locale_language(language_info, m_language_info_system); BOOST_LOG_TRIVIAL(trace) << boost::format("Can't switch language to %1% (missing locales). Using %2% instead.") diff --git a/src/slic3r/GUI/wxExtensions.cpp b/src/slic3r/GUI/wxExtensions.cpp index aa1992995..1ba8129fc 100644 --- a/src/slic3r/GUI/wxExtensions.cpp +++ b/src/slic3r/GUI/wxExtensions.cpp @@ -540,7 +540,7 @@ wxBitmap *get_extruder_color_icon(std::string color, std::string label, int icon // there is no neede to scale created solid bitmap wxColor clr(color); bitmap = bmp_cache.insert(bitmap_key, wxBitmap(icon_width, icon_height)); -#ifdef __WXOSX__ +#ifndef __WXMSW__ wxMemoryDC dc; #else wxClientDC cdc((wxWindow *) Slic3r::GUI::wxGetApp().mainframe);