mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-15 20:15:52 +08:00
fix crashes on some Linux distro caused by locale by @pfrench42 #235
This commit is contained in:
parent
abc0f1c682
commit
99406816cd
@ -4904,6 +4904,9 @@ bool GUI_App::load_language(wxString language, bool initial)
|
|||||||
// instead of just reporting that it is impossible to switch.
|
// instead of just reporting that it is impossible to switch.
|
||||||
if (! wxLocale::IsAvailable(language_info->Language)) {
|
if (! wxLocale::IsAvailable(language_info->Language)) {
|
||||||
std::string original_lang = into_u8(language_info->CanonicalName);
|
std::string original_lang = into_u8(language_info->CanonicalName);
|
||||||
|
if (nullptr == m_language_info_system) {
|
||||||
|
m_language_info_system = wxLocale::GetLanguageInfo(wxLANGUAGE_DEFAULT);
|
||||||
|
}
|
||||||
language_info = linux_get_existing_locale_language(language_info, m_language_info_system);
|
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.")
|
BOOST_LOG_TRIVIAL(trace) << boost::format("Can't switch language to %1% (missing locales). Using %2% instead.")
|
||||||
% original_lang % language_info->CanonicalName.ToUTF8().data();
|
% original_lang % language_info->CanonicalName.ToUTF8().data();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user