diff options
Diffstat (limited to 'editor/project_settings_editor.cpp')
-rw-r--r-- | editor/project_settings_editor.cpp | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index b21c176543..76fd20ca12 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -360,7 +360,7 @@ void ProjectSettingsEditor::_wait_for_key(const Ref<InputEvent> &p_event) { last_wait_for_key = p_event; String str = keycode_get_string(k->get_scancode()).capitalize(); if (k->get_metakey()) - str = TTR("Meta+") + str; + str = vformat("%s+", find_keycode_name(KEY_META)) + str; if (k->get_shift()) str = TTR("Shift+") + str; if (k->get_alt()) @@ -642,7 +642,7 @@ void ProjectSettingsEditor::_update_actions() { String str = keycode_get_string(k->get_scancode()).capitalize(); if (k->get_metakey()) - str = TTR("Meta+") + str; + str = vformat("%s+", find_keycode_name(KEY_META)) + str; if (k->get_shift()) str = TTR("Shift+") + str; if (k->get_alt()) @@ -785,12 +785,12 @@ void ProjectSettingsEditor::_item_del() { String property = globals_editor->get_current_section().plus_file(path); if (!ProjectSettings::get_singleton()->has_setting(property)) { - EditorNode::get_singleton()->show_warning(TTR("No property '" + property + "' exists.")); + EditorNode::get_singleton()->show_warning(vformat(TTR("No property '%s' exists."), property)); return; } if (ProjectSettings::get_singleton()->get_order(property) < ProjectSettings::NO_BUILTIN_ORDER_BASE) { - EditorNode::get_singleton()->show_warning(TTR("Setting '" + property + "' is internal, and it can't be deleted.")); + EditorNode::get_singleton()->show_warning(vformat(TTR("Setting '%s' is internal, and it can't be deleted."), property)); return; } @@ -1318,7 +1318,7 @@ void ProjectSettingsEditor::_update_translations() { t->set_text(0, translations[i].replace_first("res://", "")); t->set_tooltip(0, translations[i]); t->set_metadata(0, i); - t->add_button(0, get_icon("Del", "EditorIcons"), 0, false, TTR("Remove")); + t->add_button(0, get_icon("Remove", "EditorIcons"), 0, false, TTR("Remove")); } } @@ -1436,7 +1436,7 @@ void ProjectSettingsEditor::_update_translations() { t->set_text(0, keys[i].replace_first("res://", "")); t->set_tooltip(0, keys[i]); t->set_metadata(0, keys[i]); - t->add_button(0, get_icon("Del", "EditorIcons"), 0, false, TTR("Remove")); + t->add_button(0, get_icon("Remove", "EditorIcons"), 0, false, TTR("Remove")); if (keys[i] == remap_selected) { t->select(0); translation_res_option_add_button->set_disabled(false); @@ -1454,7 +1454,7 @@ void ProjectSettingsEditor::_update_translations() { t2->set_text(0, path.replace_first("res://", "")); t2->set_tooltip(0, path); t2->set_metadata(0, j); - t2->add_button(0, get_icon("Del", "EditorIcons"), 0, false, TTR("Remove")); + t2->add_button(0, get_icon("Remove", "EditorIcons"), 0, false, TTR("Remove")); t2->set_cell_mode(1, TreeItem::CELL_MODE_RANGE); t2->set_text(1, langnames); t2->set_editable(1, true); @@ -1776,12 +1776,12 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { //translations TabContainer *translations = memnew(TabContainer); - translations->add_style_override("panel", memnew(StyleBoxEmpty)); translations->set_tab_align(TabContainer::ALIGN_LEFT); translations->set_name(TTR("Localization")); tab_container->add_child(translations); //remap for properly select language in popup translation_locales_idxs_remap = Vector<int>(); + translation_locales_list_created = false; { @@ -1887,19 +1887,14 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) { translation_filter->connect("item_edited", this, "_translation_filter_option_changed"); } - { - autoload_settings = memnew(EditorAutoloadSettings); - autoload_settings->set_name(TTR("AutoLoad")); - tab_container->add_child(autoload_settings); - autoload_settings->connect("autoload_changed", this, "_settings_changed"); - } + autoload_settings = memnew(EditorAutoloadSettings); + autoload_settings->set_name(TTR("AutoLoad")); + tab_container->add_child(autoload_settings); + autoload_settings->connect("autoload_changed", this, "_settings_changed"); - { - - plugin_settings = memnew(EditorPluginSettings); - plugin_settings->set_name(TTR("Plugins")); - tab_container->add_child(plugin_settings); - } + plugin_settings = memnew(EditorPluginSettings); + plugin_settings->set_name(TTR("Plugins")); + tab_container->add_child(plugin_settings); timer = memnew(Timer); timer->set_wait_time(1.5); |