Skip to content

Commit

Permalink
Merge pull request #45662 from akien-mga/main-fix-l10n-remapping
Browse files Browse the repository at this point in the history
Main: Load translations and remaps before scene types
  • Loading branch information
akien-mga authored Feb 2, 2021
2 parents 235d891 + bb5dcb6 commit b375349
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {

register_server_types();

MAIN_PRINT("Main: Load Remaps");
MAIN_PRINT("Main: Load Boot Image");

Color clear = GLOBAL_DEF("rendering/environment/default_clear_color", Color(0.3, 0.3, 0.3));
RenderingServer::get_singleton()->set_default_clear_color(clear);
Expand Down Expand Up @@ -1690,7 +1690,6 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
MAIN_PRINT("Main: DCC");
RenderingServer::get_singleton()->set_default_clear_color(
GLOBAL_DEF("rendering/environment/default_clear_color", Color(0.3, 0.3, 0.3)));
MAIN_PRINT("Main: END");

GLOBAL_DEF("application/config/icon", String());
ProjectSettings::get_singleton()->set_custom_property_info("application/config/icon",
Expand Down Expand Up @@ -1728,7 +1727,16 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
id->set_emulate_mouse_from_touch(bool(GLOBAL_DEF("input_devices/pointing/emulate_mouse_from_touch", true)));
}

MAIN_PRINT("Main: Load Remaps");
MAIN_PRINT("Main: Load Translations and Remaps");

translation_server->setup(); //register translations, load them, etc.
if (locale != "") {
translation_server->set_locale(locale);
}
translation_server->load_translations();
ResourceLoader::load_translation_remaps(); //load remaps for resources

ResourceLoader::load_path_remaps();

MAIN_PRINT("Main: Load Scene Types");

Expand Down Expand Up @@ -1774,17 +1782,6 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
// This loads global classes, so it must happen before custom loaders and savers are registered
ScriptServer::init_languages();

MAIN_PRINT("Main: Load Translations");

translation_server->setup(); //register translations, load them, etc.
if (locale != "") {
translation_server->set_locale(locale);
}
translation_server->load_translations();
ResourceLoader::load_translation_remaps(); //load remaps for resources

ResourceLoader::load_path_remaps();

audio_server->load_default_bus_layout();

if (use_debug_profiler && EngineDebugger::is_active()) {
Expand Down

0 comments on commit b375349

Please sign in to comment.