diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-09 12:38:17 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-09 12:38:17 +0100 |
commit | d02a7bc00d76d50843f1b938914340135060a119 (patch) | |
tree | e4c4d41874c7d692cd2aeca7cc03aaf3c8a5a22d /editor | |
parent | ebe3cfc061d84d3d1b4496165d666b2bbed093f7 (diff) | |
parent | a40ccc2d7e48f5cf5bfe36504c2969cbdfa4aa6b (diff) |
Merge pull request #72953 from timothyqiu/i18n-improvements
Improve some editor strings for localization
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_locale_dialog.cpp | 6 | ||||
-rw-r--r-- | editor/import/dynamic_font_import_settings.cpp | 6 | ||||
-rw-r--r-- | editor/plugins/debugger_editor_plugin.cpp | 12 | ||||
-rw-r--r-- | editor/plugins/font_config_plugin.cpp | 3 |
4 files changed, 13 insertions, 14 deletions
diff --git a/editor/editor_locale_dialog.cpp b/editor/editor_locale_dialog.cpp index 5a372412fa..fbf3c99690 100644 --- a/editor/editor_locale_dialog.cpp +++ b/editor/editor_locale_dialog.cpp @@ -446,7 +446,8 @@ EditorLocaleDialog::EditorLocaleDialog() { vb_script_list->set_h_size_flags(Control::SIZE_EXPAND_FILL); { Label *script_lbl = memnew(Label); - script_lbl->set_text(TTR("Script:")); + // TRANSLATORS: This is the label for a list of writing systems. + script_lbl->set_text(TTR("Script:", "Locale")); vb_script_list->add_child(script_lbl); } { @@ -504,7 +505,8 @@ EditorLocaleDialog::EditorLocaleDialog() { vb_script->set_h_size_flags(Control::SIZE_EXPAND_FILL); { Label *script_lbl = memnew(Label); - script_lbl->set_text(TTR("Script")); + // TRANSLATORS: This refers to a writing system. + script_lbl->set_text(TTR("Script", "Locale")); vb_script->add_child(script_lbl); } { diff --git a/editor/import/dynamic_font_import_settings.cpp b/editor/import/dynamic_font_import_settings.cpp index cfbe34b868..6e74c42b2c 100644 --- a/editor/import/dynamic_font_import_settings.cpp +++ b/editor/import/dynamic_font_import_settings.cpp @@ -528,7 +528,7 @@ void DynamicFontImportSettings::_variation_selected() { inspector_vars->edit(import_variation_data.ptr()); import_variation_data->notify_property_list_changed(); - label_glyphs->set_text(TTR("Preloaded glyphs: ") + itos(import_variation_data->selected_glyphs.size())); + label_glyphs->set_text(vformat(TTR("Preloaded glyphs: %d"), import_variation_data->selected_glyphs.size())); _range_selected(); _change_text_opts(); @@ -659,7 +659,7 @@ void DynamicFontImportSettings::_glyph_update_lbl() { } } int unlinked_glyphs = import_variation_data->selected_glyphs.size() - linked_glyphs; - label_glyphs->set_text(TTR("Preloaded glyphs:") + " " + itos(unlinked_glyphs + import_variation_data->selected_chars.size())); + label_glyphs->set_text(vformat(TTR("Preloaded glyphs: %d"), unlinked_glyphs + import_variation_data->selected_chars.size())); } void DynamicFontImportSettings::_glyph_clear() { @@ -1403,7 +1403,7 @@ DynamicFontImportSettings::DynamicFontImportSettings() { label_glyphs = memnew(Label); gl_hb->add_child(label_glyphs); - label_glyphs->set_text(TTR("Preloaded glyphs:") + " " + itos(0)); + label_glyphs->set_text(vformat(TTR("Preloaded glyphs: %d"), 0)); label_glyphs->set_custom_minimum_size(Size2(50 * EDSCALE, 0)); Button *btn_clear = memnew(Button); 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")); } |