diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2023-02-09 17:01:32 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2023-02-09 19:32:02 +0800 |
commit | a40ccc2d7e48f5cf5bfe36504c2969cbdfa4aa6b (patch) | |
tree | 52ceba6d9c1e54c2229e5d52ecbc65a43196027d /editor/plugins | |
parent | d69809cab603cae9f525768337affe5e12e454a8 (diff) |
Improve some editor strings for localization
Diffstat (limited to 'editor/plugins')
-rw-r--r-- | editor/plugins/debugger_editor_plugin.cpp | 12 | ||||
-rw-r--r-- | editor/plugins/font_config_plugin.cpp | 3 |
2 files changed, 6 insertions, 9 deletions
diff --git a/editor/plugins/debugger_editor_plugin.cpp b/editor/plugins/debugger_editor_plugin.cpp index 28151800b6..224d221d9a 100644 --- a/editor/plugins/debugger_editor_plugin.cpp +++ b/editor/plugins/debugger_editor_plugin.cpp @@ -97,14 +97,10 @@ DebuggerEditorPlugin::DebuggerEditorPlugin(PopupMenu *p_debug_menu) { debug_menu->add_separator(); debug_menu->add_submenu_item(TTR("Run Multiple Instances"), "run_instances"); - instances_menu->add_radio_check_item(TTR("Run 1 Instance")); - instances_menu->set_item_metadata(0, 1); - instances_menu->add_radio_check_item(TTR("Run 2 Instances")); - instances_menu->set_item_metadata(1, 2); - instances_menu->add_radio_check_item(TTR("Run 3 Instances")); - instances_menu->set_item_metadata(2, 3); - instances_menu->add_radio_check_item(TTR("Run 4 Instances")); - instances_menu->set_item_metadata(3, 4); + for (int i = 1; i <= 4; i++) { + instances_menu->add_radio_check_item(vformat(TTRN("Run %d Instance", "Run %d Instances", i), i)); + instances_menu->set_item_metadata(i - 1, i); + } instances_menu->set_item_checked(0, true); instances_menu->connect("index_pressed", callable_mp(this, &DebuggerEditorPlugin::_select_run_count)); debug_menu->connect("id_pressed", callable_mp(this, &DebuggerEditorPlugin::_menu_option)); diff --git a/editor/plugins/font_config_plugin.cpp b/editor/plugins/font_config_plugin.cpp index d5f3b897c9..7618ec3903 100644 --- a/editor/plugins/font_config_plugin.cpp +++ b/editor/plugins/font_config_plugin.cpp @@ -310,7 +310,8 @@ void EditorPropertyFontMetaOverride::update_property() { } if (script_editor) { - button_add = EditorInspector::create_inspector_action_button(TTR("Add Script")); + // TRANSLATORS: Script refers to a writing system. + button_add = EditorInspector::create_inspector_action_button(TTR("Add Script", "Locale")); } else { button_add = EditorInspector::create_inspector_action_button(TTR("Add Locale")); } |