mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-21 04:14:31 +08:00
some localization fix for my computer
seems like wxSetlocale(LC_NUMERIC, "C"); don't play well with a ','-based pc used to compile.
This commit is contained in:
parent
8c8f822b38
commit
e8b61f4fdb
@ -317,7 +317,7 @@ set(L10N_DIR "${SLIC3R_RESOURCES_DIR}/localization")
|
|||||||
add_custom_target(pot
|
add_custom_target(pot
|
||||||
COMMAND xgettext --keyword=L --from-code=UTF-8 --debug
|
COMMAND xgettext --keyword=L --from-code=UTF-8 --debug
|
||||||
-f "${L10N_DIR}/list.txt"
|
-f "${L10N_DIR}/list.txt"
|
||||||
-o "${L10N_DIR}/Slic3rPE.pot"
|
-o "${L10N_DIR}/Slic3r++.pot"
|
||||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||||
COMMENT "Generate pot file from strings in the source tree"
|
COMMENT "Generate pot file from strings in the source tree"
|
||||||
)
|
)
|
||||||
|
@ -134,6 +134,7 @@ bool GUI_App::OnInit()
|
|||||||
});
|
});
|
||||||
|
|
||||||
load_language();
|
load_language();
|
||||||
|
//wxSetlocale(LC_NUMERIC, "C");
|
||||||
|
|
||||||
// Suppress the '- default -' presets.
|
// Suppress the '- default -' presets.
|
||||||
preset_bundle->set_default_suppressed(app_config->get("no_defaults") == "1");
|
preset_bundle->set_default_suppressed(app_config->get("no_defaults") == "1");
|
||||||
@ -419,7 +420,7 @@ bool GUI_App::select_language( wxArrayString & names,
|
|||||||
m_wxLocale->AddCatalogLookupPathPrefix(from_u8(localization_dir()));
|
m_wxLocale->AddCatalogLookupPathPrefix(from_u8(localization_dir()));
|
||||||
m_wxLocale->AddCatalog(/*GetAppName()*/"Slic3r++");
|
m_wxLocale->AddCatalog(/*GetAppName()*/"Slic3r++");
|
||||||
//FIXME This is a temporary workaround, the correct solution is to switch to "C" locale during file import / export only.
|
//FIXME This is a temporary workaround, the correct solution is to switch to "C" locale during file import / export only.
|
||||||
wxSetlocale(LC_NUMERIC, "C");
|
//wxSetlocale(LC_NUMERIC, "C");
|
||||||
Preset::update_suffix_modified();
|
Preset::update_suffix_modified();
|
||||||
m_imgui->set_language(m_wxLocale->GetCanonicalName().ToUTF8().data());
|
m_imgui->set_language(m_wxLocale->GetCanonicalName().ToUTF8().data());
|
||||||
return true;
|
return true;
|
||||||
@ -448,7 +449,7 @@ bool GUI_App::load_language()
|
|||||||
m_wxLocale->AddCatalogLookupPathPrefix(from_u8(localization_dir()));
|
m_wxLocale->AddCatalogLookupPathPrefix(from_u8(localization_dir()));
|
||||||
m_wxLocale->AddCatalog(/*GetAppName()*/"Slic3r++");
|
m_wxLocale->AddCatalog(/*GetAppName()*/"Slic3r++");
|
||||||
//FIXME This is a temporary workaround, the correct solution is to switch to "C" locale during file import / export only.
|
//FIXME This is a temporary workaround, the correct solution is to switch to "C" locale during file import / export only.
|
||||||
wxSetlocale(LC_NUMERIC, "C");
|
//wxSetlocale(LC_NUMERIC, "C");
|
||||||
Preset::update_suffix_modified();
|
Preset::update_suffix_modified();
|
||||||
m_imgui->set_language(m_wxLocale->GetCanonicalName().ToUTF8().data());
|
m_imgui->set_language(m_wxLocale->GetCanonicalName().ToUTF8().data());
|
||||||
return true;
|
return true;
|
||||||
@ -638,6 +639,7 @@ void GUI_App::add_config_menu(wxMenuBar *menu)
|
|||||||
save_language();
|
save_language();
|
||||||
show_info(mainframe->m_tabpanel, _(L("Application will be restarted")), _(L("Attention!")));
|
show_info(mainframe->m_tabpanel, _(L("Application will be restarted")), _(L("Attention!")));
|
||||||
_3DScene::remove_all_canvases();// remove all canvas before recreate GUI
|
_3DScene::remove_all_canvases();// remove all canvas before recreate GUI
|
||||||
|
//wxSetlocale(LC_NUMERIC, "C");
|
||||||
recreate_GUI();
|
recreate_GUI();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user