mirror of https://github.com/godotengine/godot
Merge 4aca3482a9 into 15ff450680
This commit is contained in:
commit
f0aeb50530
|
|
@ -7315,7 +7315,7 @@ EditorNode::EditorNode() {
|
||||||
main_menu->set_switch_on_hover(true);
|
main_menu->set_switch_on_hover(true);
|
||||||
|
|
||||||
file_menu = memnew(PopupMenu);
|
file_menu = memnew(PopupMenu);
|
||||||
file_menu->set_name(TTR("Scene"));
|
file_menu->set_name(TTRC("Scene"));
|
||||||
main_menu->add_child(file_menu);
|
main_menu->add_child(file_menu);
|
||||||
main_menu->set_menu_tooltip(0, TTR("Operations with scene files."));
|
main_menu->set_menu_tooltip(0, TTR("Operations with scene files."));
|
||||||
|
|
||||||
|
|
@ -7440,7 +7440,7 @@ EditorNode::EditorNode() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
project_menu = memnew(PopupMenu);
|
project_menu = memnew(PopupMenu);
|
||||||
project_menu->set_name(TTR("Project"));
|
project_menu->set_name(TTRC("Project"));
|
||||||
main_menu->add_child(project_menu);
|
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);
|
project_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/project_settings", TTRC("Project Settings..."), Key::NONE, TTRC("Project Settings")), PROJECT_OPEN_SETTINGS);
|
||||||
|
|
@ -7498,11 +7498,11 @@ EditorNode::EditorNode() {
|
||||||
|
|
||||||
// Options are added and handled by DebuggerEditorPlugin.
|
// Options are added and handled by DebuggerEditorPlugin.
|
||||||
debug_menu = memnew(PopupMenu);
|
debug_menu = memnew(PopupMenu);
|
||||||
debug_menu->set_name(TTR("Debug"));
|
debug_menu->set_name(TTRC("Debug"));
|
||||||
main_menu->add_child(debug_menu);
|
main_menu->add_child(debug_menu);
|
||||||
|
|
||||||
settings_menu = memnew(PopupMenu);
|
settings_menu = memnew(PopupMenu);
|
||||||
settings_menu->set_name(TTR("Editor"));
|
settings_menu->set_name(TTRC("Editor"));
|
||||||
main_menu->add_child(settings_menu);
|
main_menu->add_child(settings_menu);
|
||||||
|
|
||||||
#ifdef MACOS_ENABLED
|
#ifdef MACOS_ENABLED
|
||||||
|
|
@ -7553,7 +7553,7 @@ EditorNode::EditorNode() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
help_menu = memnew(PopupMenu);
|
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)) {
|
if (global_menu && NativeMenu::get_singleton()->has_system_menu(NativeMenu::HELP_MENU_ID)) {
|
||||||
help_menu->set_system_menu(NativeMenu::HELP_MENU_ID);
|
help_menu->set_system_menu(NativeMenu::HELP_MENU_ID);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,10 @@ bool EditorSettings::_set(const StringName &p_name, const Variant &p_value) {
|
||||||
if (changed && initialized) {
|
if (changed && initialized) {
|
||||||
changed_settings.insert(p_name);
|
changed_settings.insert(p_name);
|
||||||
emit_signal(SNAME("settings_changed"));
|
emit_signal(SNAME("settings_changed"));
|
||||||
|
|
||||||
|
if (p_name == SNAME("interface/editor/editor_language")) {
|
||||||
|
setup_language();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -1255,9 +1259,9 @@ fail:
|
||||||
|
|
||||||
void EditorSettings::setup_language() {
|
void EditorSettings::setup_language() {
|
||||||
String lang = get("interface/editor/editor_language");
|
String lang = get("interface/editor/editor_language");
|
||||||
TranslationServer::get_singleton()->set_locale(lang);
|
|
||||||
|
|
||||||
if (lang == "en") {
|
if (lang == "en") {
|
||||||
|
TranslationServer::get_singleton()->set_locale(lang);
|
||||||
return; // Default, nothing to do.
|
return; // Default, nothing to do.
|
||||||
}
|
}
|
||||||
// Load editor translation for configured/detected locale.
|
// Load editor translation for configured/detected locale.
|
||||||
|
|
@ -1269,6 +1273,8 @@ void EditorSettings::setup_language() {
|
||||||
|
|
||||||
// Load extractable translation for projects.
|
// Load extractable translation for projects.
|
||||||
load_extractable_translations(lang);
|
load_extractable_translations(lang);
|
||||||
|
|
||||||
|
TranslationServer::get_singleton()->set_locale(lang);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorSettings::setup_network() {
|
void EditorSettings::setup_network() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue