diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 83c91120607..6f0fcb5d9f6 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -7436,7 +7436,7 @@ EditorNode::EditorNode() { main_menu->set_switch_on_hover(true); file_menu = memnew(PopupMenu); - file_menu->set_name(TTR("Scene")); + file_menu->set_name(TTRC("Scene")); main_menu->add_child(file_menu); main_menu->set_menu_tooltip(0, TTR("Operations with scene files.")); @@ -7562,7 +7562,7 @@ EditorNode::EditorNode() { #endif project_menu = memnew(PopupMenu); - project_menu->set_name(TTR("Project")); + project_menu->set_name(TTRC("Project")); main_menu->add_child(project_menu); project_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/project_settings", TTRC("Project Settings..."), Key::NONE, TTRC("Project Settings")), PROJECT_OPEN_SETTINGS); @@ -7619,11 +7619,11 @@ EditorNode::EditorNode() { // Options are added and handled by DebuggerEditorPlugin. debug_menu = memnew(PopupMenu); - debug_menu->set_name(TTR("Debug")); + debug_menu->set_name(TTRC("Debug")); main_menu->add_child(debug_menu); settings_menu = memnew(PopupMenu); - settings_menu->set_name(TTR("Editor")); + settings_menu->set_name(TTRC("Editor")); main_menu->add_child(settings_menu); #ifdef MACOS_ENABLED @@ -7673,7 +7673,7 @@ EditorNode::EditorNode() { #endif help_menu = memnew(PopupMenu); - help_menu->set_name(TTR("Help")); + help_menu->set_name(TTRC("Help")); if (global_menu && NativeMenu::get_singleton()->has_system_menu(NativeMenu::HELP_MENU_ID)) { help_menu->set_system_menu(NativeMenu::HELP_MENU_ID); } diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index d8b13209a6e..0156088e6aa 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -77,6 +77,10 @@ bool EditorSettings::_set(const StringName &p_name, const Variant &p_value) { } } emit_signal(SNAME("settings_changed")); + + if (p_name == SNAME("interface/editor/editor_language")) { + setup_language(); + } } return true; } @@ -1323,9 +1327,9 @@ fail: void EditorSettings::setup_language() { String lang = get("interface/editor/editor_language"); - TranslationServer::get_singleton()->set_locale(lang); if (lang == "en") { + TranslationServer::get_singleton()->set_locale(lang); return; // Default, nothing to do. } // Load editor translation for configured/detected locale. @@ -1337,6 +1341,8 @@ void EditorSettings::setup_language() { // Load extractable translation for projects. load_extractable_translations(lang); + + TranslationServer::get_singleton()->set_locale(lang); } void EditorSettings::setup_network() { diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index cb1d4c35ae3..1a2fa5d4dbb 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -769,9 +769,7 @@ void SceneTree::_main_window_focus_in() { void SceneTree::_notification(int p_notification) { switch (p_notification) { case NOTIFICATION_TRANSLATION_CHANGED: { - if (!Engine::get_singleton()->is_editor_hint()) { - get_root()->propagate_notification(p_notification); - } + get_root()->propagate_notification(p_notification); } break; case NOTIFICATION_OS_MEMORY_WARNING: