Godot Engine – Multi-platform 2D and 3D game engine
EditorFeatureProfile: Fix auto-translation
NoNormalDevf3896e6d96fb
diff --git a/editor/settings/editor_feature_profile.cpp b/editor/settings/editor_feature_profile.cppindex a3f4ac5cdd0..f05c703a206 100644--- a/editor/settings/editor_feature_profile.cpp+++ b/editor/settings/editor_feature_profile.cpp@@ -359,8 +359,7 @@ void EditorFeatureProfileManager::_notification(int p_what) {} break;case NOTIFICATION_TRANSLATION_CHANGED: {- // Update `EditorHelpBit` in case it contains custom text.- _class_list_item_selected();+ _update_profile_list();} break;case NOTIFICATION_THEME_CHANGED: {@@ -949,15 +948,15 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {current_profile_name = memnew(LineEdit);name_hbc->add_child(current_profile_name);current_profile_name->set_accessibility_name(TTRC("Current Profile:"));- current_profile_name->set_text(TTR("(none)"));+ current_profile_name->set_text(TTRC("(none)"));current_profile_name->set_editable(false);current_profile_name->set_h_size_flags(Control::SIZE_EXPAND_FILL);- profile_actions[PROFILE_CLEAR] = memnew(Button(TTR("Reset to Default")));+ profile_actions[PROFILE_CLEAR] = memnew(Button(TTRC("Reset to Default")));name_hbc->add_child(profile_actions[PROFILE_CLEAR]);profile_actions[PROFILE_CLEAR]->set_disabled(true);profile_actions[PROFILE_CLEAR]->connect(SceneStringName(pressed), callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_CLEAR));- main_vbc->add_margin_child(TTR("Current Profile:"), name_hbc);+ main_vbc->add_margin_child(TTRC("Current Profile:"), name_hbc);main_vbc->add_child(memnew(HSeparator));@@ -969,31 +968,31 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {profiles_hbc->add_child(profile_list);profile_list->connect(SceneStringName(item_selected), callable_mp(this, &EditorFeatureProfileManager::_profile_selected));- profile_actions[PROFILE_NEW] = memnew(Button(TTR("Create Profile")));+ profile_actions[PROFILE_NEW] = memnew(Button(TTRC("Create Profile")));profiles_hbc->add_child(profile_actions[PROFILE_NEW]);profile_actions[PROFILE_NEW]->connect(SceneStringName(pressed), callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_NEW));- profile_actions[PROFILE_ERASE] = memnew(Button(TTR("Remove Profile")));+ profile_actions[PROFILE_ERASE] = memnew(Button(TTRC("Remove Profile")));profiles_hbc->add_child(profile_actions[PROFILE_ERASE]);profile_actions[PROFILE_ERASE]->set_disabled(true);profile_actions[PROFILE_ERASE]->connect(SceneStringName(pressed), callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_ERASE));- main_vbc->add_margin_child(TTR("Available Profiles:"), profiles_hbc);+ main_vbc->add_margin_child(TTRC("Available Profiles:"), profiles_hbc);HBoxContainer *current_profile_hbc = memnew(HBoxContainer);- profile_actions[PROFILE_SET] = memnew(Button(TTR("Make Current")));+ profile_actions[PROFILE_SET] = memnew(Button(TTRC("Make Current")));current_profile_hbc->add_child(profile_actions[PROFILE_SET]);profile_actions[PROFILE_SET]->set_disabled(true);profile_actions[PROFILE_SET]->connect(SceneStringName(pressed), callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_SET));current_profile_hbc->add_child(memnew(VSeparator));- profile_actions[PROFILE_IMPORT] = memnew(Button(TTR("Import")));+ profile_actions[PROFILE_IMPORT] = memnew(Button(TTRC("Import")));current_profile_hbc->add_child(profile_actions[PROFILE_IMPORT]);profile_actions[PROFILE_IMPORT]->connect(SceneStringName(pressed), callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_IMPORT));- profile_actions[PROFILE_EXPORT] = memnew(Button(TTR("Export")));+ profile_actions[PROFILE_EXPORT] = memnew(Button(TTRC("Export")));current_profile_hbc->add_child(profile_actions[PROFILE_EXPORT]);profile_actions[PROFILE_EXPORT]->set_disabled(true);profile_actions[PROFILE_EXPORT]->connect(SceneStringName(pressed), callable_mp(this, &EditorFeatureProfileManager::_profile_action).bind(PROFILE_EXPORT));@@ -1010,7 +1009,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {class_list = memnew(Tree);class_list->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);- class_list_vbc->add_margin_child(TTR("Configure Selected Profile:"), class_list, true);+ class_list_vbc->add_margin_child(TTRC("Configure Selected Profile:"), class_list, true);class_list->set_hide_root(true);class_list->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);class_list->connect("cell_selected", callable_mp(this, &EditorFeatureProfileManager::_class_list_item_selected));@@ -1027,10 +1026,10 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {description_bit = memnew(EditorHelpBit);description_bit->set_content_height_limits(80 * EDSCALE, 80 * EDSCALE);description_bit->connect("request_hide", callable_mp(this, &EditorFeatureProfileManager::_hide_requested));- property_list_vbc->add_margin_child(TTR("Description:"), description_bit, false);+ property_list_vbc->add_margin_child(TTRC("Description:"), description_bit, false);property_list = memnew(Tree);- property_list_vbc->add_margin_child(TTR("Extra Options:"), property_list, true);+ property_list_vbc->add_margin_child(TTRC("Extra Options:"), property_list, true);property_list->set_hide_root(true);property_list->set_hide_folding(true);property_list->set_edit_checkbox_cell_only_when_checkbox_is_pressed(true);@@ -1039,7 +1038,7 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {// It will be displayed once the user creates or chooses a profile.property_list_vbc->hide();- no_profile_selected_help = memnew(Label(TTR("Create or import a profile to edit available classes and properties.")));+ no_profile_selected_help = memnew(Label(TTRC("Create or import a profile to edit available classes and properties.")));// Add some spacing above the help label.Ref<StyleBoxEmpty> sb = memnew(StyleBoxEmpty);sb->set_content_margin(SIDE_TOP, 20 * EDSCALE);@@ -1049,11 +1048,11 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {h_split->add_child(no_profile_selected_help);new_profile_dialog = memnew(ConfirmationDialog);- new_profile_dialog->set_title(TTR("Create Profile"));+ new_profile_dialog->set_title(TTRC("Create Profile"));VBoxContainer *new_profile_vb = memnew(VBoxContainer);new_profile_dialog->add_child(new_profile_vb);Label *new_profile_label = memnew(Label);- new_profile_label->set_text(TTR("New profile name:"));+ new_profile_label->set_text(TTRC("New profile name:"));new_profile_vb->add_child(new_profile_label);new_profile_name = memnew(LineEdit);new_profile_vb->add_child(new_profile_name);@@ -1062,31 +1061,31 @@ EditorFeatureProfileManager::EditorFeatureProfileManager() {add_child(new_profile_dialog);new_profile_dialog->connect(SceneStringName(confirmed), callable_mp(this, &EditorFeatureProfileManager::_create_new_profile));new_profile_dialog->register_text_enter(new_profile_name);- new_profile_dialog->set_ok_button_text(TTR("Create"));+ new_profile_dialog->set_ok_button_text(TTRC("Create"));erase_profile_dialog = memnew(ConfirmationDialog);erase_profile_dialog->set_flag(Window::FLAG_RESIZE_DISABLED, true);add_child(erase_profile_dialog);- erase_profile_dialog->set_title(TTR("Remove Profile"));+ erase_profile_dialog->set_title(TTRC("Remove Profile"));erase_profile_dialog->connect(SceneStringName(confirmed), callable_mp(this, &EditorFeatureProfileManager::_erase_selected_profile));import_profiles = memnew(EditorFileDialog);add_child(import_profiles);import_profiles->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILES);- import_profiles->add_filter("*.profile", TTR("Godot Feature Profile"));+ import_profiles->add_filter("*.profile", TTRC("Godot Feature Profile"));import_profiles->connect("files_selected", callable_mp(this, &EditorFeatureProfileManager::_import_profiles));- import_profiles->set_title(TTR("Import Profile(s)"));+ import_profiles->set_title(TTRC("Import Profile(s)"));import_profiles->set_access(EditorFileDialog::ACCESS_FILESYSTEM);export_profile = memnew(EditorFileDialog);add_child(export_profile);export_profile->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);- export_profile->add_filter("*.profile", TTR("Godot Feature Profile"));+ export_profile->add_filter("*.profile", TTRC("Godot Feature Profile"));export_profile->connect("file_selected", callable_mp(this, &EditorFeatureProfileManager::_export_profile));- export_profile->set_title(TTR("Export Profile"));+ export_profile->set_title(TTRC("Export Profile"));export_profile->set_access(EditorFileDialog::ACCESS_FILESYSTEM);- set_title(TTR("Manage Editor Feature Profiles"));+ set_title(TTRC("Manage Editor Feature Profiles"));set_flag(FLAG_MAXIMIZE_DISABLED, false);EDITOR_DEF("_default_feature_profile", "");