|
@@ -105,6 +105,13 @@ void ProjectManager::_notification(int p_what) {
|
|
|
} break;
|
|
|
|
|
|
case NOTIFICATION_TRANSLATION_CHANGED: {
|
|
|
+ // TRANSLATORS: This refers to the application where users manage their Godot projects.
|
|
|
+ SceneTree::get_singleton()->get_root()->set_title(GODOT_VERSION_NAME + String(" - ") + TTR("Project Manager", "Application"));
|
|
|
+
|
|
|
+ const String line1 = TTR("You don't have any projects yet.");
|
|
|
+ const String line2 = TTR("Get started by creating a new one,\nimporting one that exists, or by downloading a project template from the Asset Library!");
|
|
|
+ empty_list_message->set_text(vformat("[center][b]%s[/b] %s[/center]", line1, line2));
|
|
|
+
|
|
|
_titlebar_resized();
|
|
|
} break;
|
|
|
|
|
@@ -417,10 +424,10 @@ void ProjectManager::_update_list_placeholder() {
|
|
|
|
|
|
const int network_mode = EDITOR_GET("network/connection/network_mode");
|
|
|
if (network_mode == EditorSettings::NETWORK_OFFLINE) {
|
|
|
- empty_list_open_assetlib->set_text(TTR("Go Online and Open Asset Library"));
|
|
|
+ empty_list_open_assetlib->set_text(TTRC("Go Online and Open Asset Library"));
|
|
|
empty_list_online_warning->set_visible(true);
|
|
|
} else {
|
|
|
- empty_list_open_assetlib->set_text(TTR("Open Asset Library"));
|
|
|
+ empty_list_open_assetlib->set_text(TTRC("Open Asset Library"));
|
|
|
empty_list_online_warning->set_visible(false);
|
|
|
}
|
|
|
|
|
@@ -452,7 +459,7 @@ void ProjectManager::_run_project_confirm() {
|
|
|
for (int i = 0; i < selected_list.size(); ++i) {
|
|
|
const String &selected_main = selected_list[i].main_scene;
|
|
|
if (selected_main.is_empty()) {
|
|
|
- _show_error(TTR("Can't run project: Project has no main scene defined.\nPlease edit the project and set the main scene in the Project Settings under the \"Application\" category."));
|
|
|
+ _show_error(TTRC("Can't run project: Project has no main scene defined.\nPlease edit the project and set the main scene in the Project Settings under the \"Application\" category."));
|
|
|
continue;
|
|
|
}
|
|
|
|
|
@@ -460,7 +467,7 @@ void ProjectManager::_run_project_confirm() {
|
|
|
|
|
|
// `.substr(6)` on `ProjectSettings::get_singleton()->get_imported_files_path()` strips away the leading "res://".
|
|
|
if (!DirAccess::exists(path.path_join(ProjectSettings::get_singleton()->get_imported_files_path().substr(6)))) {
|
|
|
- _show_error(TTR("Can't run project: Assets need to be imported first.\nPlease edit the project to trigger the initial import."));
|
|
|
+ _show_error(TTRC("Can't run project: Assets need to be imported first.\nPlease edit the project to trigger the initial import."));
|
|
|
continue;
|
|
|
}
|
|
|
|
|
@@ -571,10 +578,10 @@ void ProjectManager::_open_selected_projects_check_warnings() {
|
|
|
if (config_version == GODOT4_CONFIG_VERSION - 1 && ProjectSettings::CONFIG_VERSION == GODOT4_CONFIG_VERSION) { // Conversion from Godot 3 to 4.
|
|
|
full_convert_button->show();
|
|
|
ask_update_settings->set_text(vformat(TTR("The selected project \"%s\" was generated by Godot 3.x, and needs to be converted for Godot 4.x.\n\nProject path: %s\n\nYou have three options:\n- Convert only the configuration file (\"project.godot\"). Use this to open the project without attempting to convert its scenes, resources and scripts.\n- Convert the entire project including its scenes, resources and scripts (recommended if you are upgrading).\n- Do nothing and go back.\n\nWarning: If you select a conversion option, you won't be able to open the project with previous versions of the engine anymore."), project.project_name, project.path));
|
|
|
- ask_update_settings->get_ok_button()->set_text(TTR("Convert project.godot Only"));
|
|
|
+ ask_update_settings->get_ok_button()->set_text(TTRC("Convert project.godot Only"));
|
|
|
} else {
|
|
|
ask_update_settings->set_text(vformat(TTR("The selected project \"%s\" was generated by an older engine version, and needs to be converted for this version.\n\nProject path: %s\n\nDo you want to convert it?\n\nWarning: You won't be able to open the project with previous versions of the engine anymore."), project.project_name, project.path));
|
|
|
- ask_update_settings->get_ok_button()->set_text(TTR("Convert project.godot"));
|
|
|
+ ask_update_settings->get_ok_button()->set_text(TTRC("Convert project.godot"));
|
|
|
}
|
|
|
ask_update_settings->popup_centered(popup_min_size);
|
|
|
ask_update_settings->get_cancel_button()->grab_focus(); // To prevent accidents.
|
|
@@ -696,7 +703,7 @@ void ProjectManager::_erase_project() {
|
|
|
if (selected_list.size() >= 2) {
|
|
|
confirm_message = vformat(TTR("Remove %d projects from the list?"), selected_list.size());
|
|
|
} else {
|
|
|
- confirm_message = TTR("Remove this project from the list?");
|
|
|
+ confirm_message = TTRC("Remove this project from the list?");
|
|
|
}
|
|
|
|
|
|
erase_ask_label->set_text(confirm_message);
|
|
@@ -705,7 +712,7 @@ void ProjectManager::_erase_project() {
|
|
|
}
|
|
|
|
|
|
void ProjectManager::_erase_missing_projects() {
|
|
|
- erase_missing_ask->set_text(TTR("Remove all missing projects from the list?\nThe project folders' contents won't be modified."));
|
|
|
+ erase_missing_ask->set_text(TTRC("Remove all missing projects from the list?\nThe project folders' contents won't be modified."));
|
|
|
erase_missing_ask->popup_centered();
|
|
|
}
|
|
|
|
|
@@ -936,24 +943,24 @@ void ProjectManager::_apply_project_tags() {
|
|
|
void ProjectManager::_set_new_tag_name(const String p_name) {
|
|
|
create_tag_dialog->get_ok_button()->set_disabled(true);
|
|
|
if (p_name.is_empty()) {
|
|
|
- tag_error->set_text(TTR("Tag name can't be empty."));
|
|
|
+ tag_error->set_text(TTRC("Tag name can't be empty."));
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (p_name.contains_char(' ')) {
|
|
|
- tag_error->set_text(TTR("Tag name can't contain spaces."));
|
|
|
+ tag_error->set_text(TTRC("Tag name can't contain spaces."));
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
for (const String &c : forbidden_tag_characters) {
|
|
|
if (p_name.contains(c)) {
|
|
|
- tag_error->set_text(vformat(TTR("These characters are not allowed in tags: %s."), String(" ").join(forbidden_tag_characters)));
|
|
|
+ tag_error->set_text(vformat(TTRC("These characters are not allowed in tags: %s."), String(" ").join(forbidden_tag_characters)));
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (p_name.to_lower() != p_name) {
|
|
|
- tag_error->set_text(TTR("Tag name must be lowercase."));
|
|
|
+ tag_error->set_text(TTRC("Tag name must be lowercase."));
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -1237,9 +1244,6 @@ ProjectManager::ProjectManager() {
|
|
|
OS::get_singleton()->set_low_processor_usage_mode(true);
|
|
|
}
|
|
|
|
|
|
- // TRANSLATORS: This refers to the application where users manage their Godot projects.
|
|
|
- SceneTree::get_singleton()->get_root()->set_title(GODOT_VERSION_NAME + String(" - ") + TTR("Project Manager", "Application"));
|
|
|
-
|
|
|
SceneTree::get_singleton()->get_root()->connect("files_dropped", callable_mp(this, &ProjectManager::_files_dropped));
|
|
|
|
|
|
// Initialize UI.
|
|
@@ -1328,7 +1332,7 @@ ProjectManager::ProjectManager() {
|
|
|
|
|
|
quick_settings_button = memnew(Button);
|
|
|
quick_settings_button->set_flat(true);
|
|
|
- quick_settings_button->set_text(TTR("Settings"));
|
|
|
+ quick_settings_button->set_text(TTRC("Settings"));
|
|
|
right_hbox->add_child(quick_settings_button);
|
|
|
quick_settings_button->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_show_quick_settings));
|
|
|
|
|
@@ -1348,7 +1352,7 @@ ProjectManager::ProjectManager() {
|
|
|
{
|
|
|
local_projects_vb = memnew(VBoxContainer);
|
|
|
local_projects_vb->set_name("LocalProjectsTab");
|
|
|
- _add_main_view(MAIN_VIEW_PROJECTS, TTR("Projects"), Ref<Texture2D>(), local_projects_vb);
|
|
|
+ _add_main_view(MAIN_VIEW_PROJECTS, TTRC("Projects"), Ref<Texture2D>(), local_projects_vb);
|
|
|
|
|
|
// Project list's top bar.
|
|
|
{
|
|
@@ -1357,33 +1361,33 @@ ProjectManager::ProjectManager() {
|
|
|
local_projects_vb->add_child(hb);
|
|
|
|
|
|
create_btn = memnew(Button);
|
|
|
- create_btn->set_text(TTR("Create"));
|
|
|
+ create_btn->set_text(TTRC("Create"));
|
|
|
create_btn->set_shortcut(ED_SHORTCUT("project_manager/new_project", TTRC("New Project"), KeyModifierMask::CMD_OR_CTRL | Key::N));
|
|
|
create_btn->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_new_project));
|
|
|
hb->add_child(create_btn);
|
|
|
|
|
|
import_btn = memnew(Button);
|
|
|
- import_btn->set_text(TTR("Import"));
|
|
|
+ import_btn->set_text(TTRC("Import"));
|
|
|
import_btn->set_shortcut(ED_SHORTCUT("project_manager/import_project", TTRC("Import Project"), KeyModifierMask::CMD_OR_CTRL | Key::I));
|
|
|
import_btn->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_import_project));
|
|
|
hb->add_child(import_btn);
|
|
|
|
|
|
scan_btn = memnew(Button);
|
|
|
- scan_btn->set_text(TTR("Scan"));
|
|
|
+ scan_btn->set_text(TTRC("Scan"));
|
|
|
scan_btn->set_shortcut(ED_SHORTCUT("project_manager/scan_projects", TTRC("Scan Projects"), KeyModifierMask::CMD_OR_CTRL | Key::S));
|
|
|
scan_btn->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_scan_projects));
|
|
|
hb->add_child(scan_btn);
|
|
|
|
|
|
- loading_label = memnew(Label(TTR("Loading, please wait...")));
|
|
|
+ loading_label = memnew(Label(TTRC("Loading, please wait...")));
|
|
|
loading_label->set_accessibility_live(DisplayServer::AccessibilityLiveMode::LIVE_ASSERTIVE);
|
|
|
loading_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
|
|
loading_label->hide();
|
|
|
hb->add_child(loading_label);
|
|
|
|
|
|
search_box = memnew(LineEdit);
|
|
|
- search_box->set_placeholder(TTR("Filter Projects"));
|
|
|
+ search_box->set_placeholder(TTRC("Filter Projects"));
|
|
|
search_box->set_accessibility_name(TTRC("Filter Projects"));
|
|
|
- search_box->set_tooltip_text(TTR("This field filters projects by name and last path component.\nTo filter projects by name and full path, the query must contain at least one `/` character."));
|
|
|
+ search_box->set_tooltip_text(TTRC("This field filters projects by name and last path component.\nTo filter projects by name and full path, the query must contain at least one `/` character."));
|
|
|
search_box->set_clear_button_enabled(true);
|
|
|
search_box->connect(SceneStringName(text_changed), callable_mp(this, &ProjectManager::_on_search_term_changed));
|
|
|
search_box->connect(SceneStringName(text_submitted), callable_mp(this, &ProjectManager::_on_search_term_submitted));
|
|
@@ -1391,7 +1395,7 @@ ProjectManager::ProjectManager() {
|
|
|
hb->add_child(search_box);
|
|
|
|
|
|
sort_label = memnew(Label);
|
|
|
- sort_label->set_text(TTR("Sort:"));
|
|
|
+ sort_label->set_text(TTRC("Sort:"));
|
|
|
sort_label->set_focus_mode(Control::FOCUS_NONE);
|
|
|
hb->add_child(sort_label);
|
|
|
|
|
@@ -1403,10 +1407,10 @@ ProjectManager::ProjectManager() {
|
|
|
filter_option->connect(SceneStringName(item_selected), callable_mp(this, &ProjectManager::_on_order_option_changed));
|
|
|
hb->add_child(filter_option);
|
|
|
|
|
|
- filter_option->add_item(TTR("Last Edited"));
|
|
|
- filter_option->add_item(TTR("Name"));
|
|
|
- filter_option->add_item(TTR("Path"));
|
|
|
- filter_option->add_item(TTR("Tags"));
|
|
|
+ filter_option->add_item(TTRC("Last Edited"));
|
|
|
+ filter_option->add_item(TTRC("Name"));
|
|
|
+ filter_option->add_item(TTRC("Path"));
|
|
|
+ filter_option->add_item(TTRC("Tags"));
|
|
|
}
|
|
|
|
|
|
// Project list and its sidebar.
|
|
@@ -1435,15 +1439,12 @@ ProjectManager::ProjectManager() {
|
|
|
empty_list_placeholder->hide();
|
|
|
project_list_panel->add_child(empty_list_placeholder);
|
|
|
|
|
|
- RichTextLabel *empty_list_message = memnew(RichTextLabel);
|
|
|
+ empty_list_message = memnew(RichTextLabel);
|
|
|
empty_list_message->set_use_bbcode(true);
|
|
|
empty_list_message->set_fit_content(true);
|
|
|
empty_list_message->set_h_size_flags(SIZE_EXPAND_FILL);
|
|
|
empty_list_message->add_theme_style_override(CoreStringName(normal), memnew(StyleBoxEmpty));
|
|
|
|
|
|
- const String line1 = TTR("You don't have any projects yet.");
|
|
|
- const String line2 = TTR("Get started by creating a new one,\nimporting one that exists, or by downloading a project template from the Asset Library!");
|
|
|
- empty_list_message->set_text(vformat("[center][b]%s[/b] %s[/center]", line1, line2));
|
|
|
empty_list_placeholder->add_child(empty_list_message);
|
|
|
|
|
|
FlowContainer *empty_list_actions = memnew(FlowContainer);
|
|
@@ -1451,19 +1452,19 @@ ProjectManager::ProjectManager() {
|
|
|
empty_list_placeholder->add_child(empty_list_actions);
|
|
|
|
|
|
empty_list_create_project = memnew(Button);
|
|
|
- empty_list_create_project->set_text(TTR("Create New Project"));
|
|
|
+ empty_list_create_project->set_text(TTRC("Create New Project"));
|
|
|
empty_list_create_project->set_theme_type_variation("PanelBackgroundButton");
|
|
|
empty_list_actions->add_child(empty_list_create_project);
|
|
|
empty_list_create_project->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_new_project));
|
|
|
|
|
|
empty_list_import_project = memnew(Button);
|
|
|
- empty_list_import_project->set_text(TTR("Import Existing Project"));
|
|
|
+ empty_list_import_project->set_text(TTRC("Import Existing Project"));
|
|
|
empty_list_import_project->set_theme_type_variation("PanelBackgroundButton");
|
|
|
empty_list_actions->add_child(empty_list_import_project);
|
|
|
empty_list_import_project->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_import_project));
|
|
|
|
|
|
empty_list_open_assetlib = memnew(Button);
|
|
|
- empty_list_open_assetlib->set_text(TTR("Open Asset Library"));
|
|
|
+ empty_list_open_assetlib->set_text(TTRC("Open Asset Library"));
|
|
|
empty_list_open_assetlib->set_theme_type_variation("PanelBackgroundButton");
|
|
|
empty_list_actions->add_child(empty_list_open_assetlib);
|
|
|
empty_list_open_assetlib->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_open_asset_library_confirmed));
|
|
@@ -1473,7 +1474,7 @@ ProjectManager::ProjectManager() {
|
|
|
empty_list_online_warning->set_custom_minimum_size(Size2(220, 0) * EDSCALE);
|
|
|
empty_list_online_warning->set_autowrap_mode(TextServer::AUTOWRAP_WORD);
|
|
|
empty_list_online_warning->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
|
|
- empty_list_online_warning->set_text(TTR("Note: The Asset Library requires an online connection and involves sending data over the internet."));
|
|
|
+ empty_list_online_warning->set_text(TTRC("Note: The Asset Library requires an online connection and involves sending data over the internet."));
|
|
|
empty_list_placeholder->add_child(empty_list_online_warning);
|
|
|
}
|
|
|
|
|
@@ -1489,7 +1490,7 @@ ProjectManager::ProjectManager() {
|
|
|
project_list_sidebar->add_child(open_btn_container);
|
|
|
|
|
|
open_btn = memnew(Button);
|
|
|
- open_btn->set_text(TTR("Edit"));
|
|
|
+ open_btn->set_text(TTRC("Edit"));
|
|
|
open_btn->set_shortcut(ED_SHORTCUT("project_manager/edit_project", TTRC("Edit Project"), KeyModifierMask::CMD_OR_CTRL | Key::E));
|
|
|
open_btn->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_open_selected_projects_check_recovery_mode));
|
|
|
open_btn->set_h_size_flags(Control::SIZE_EXPAND_FILL);
|
|
@@ -1512,25 +1513,25 @@ ProjectManager::ProjectManager() {
|
|
|
open_btn_container->set_custom_minimum_size(Size2(120, open_btn->get_combined_minimum_size().y));
|
|
|
|
|
|
run_btn = memnew(Button);
|
|
|
- run_btn->set_text(TTR("Run"));
|
|
|
+ run_btn->set_text(TTRC("Run"));
|
|
|
run_btn->set_shortcut(ED_SHORTCUT("project_manager/run_project", TTRC("Run Project"), KeyModifierMask::CMD_OR_CTRL | Key::R));
|
|
|
run_btn->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_run_project));
|
|
|
project_list_sidebar->add_child(run_btn);
|
|
|
|
|
|
rename_btn = memnew(Button);
|
|
|
- rename_btn->set_text(TTR("Rename"));
|
|
|
+ rename_btn->set_text(TTRC("Rename"));
|
|
|
// The F2 shortcut isn't overridden with Enter on macOS as Enter is already used to edit a project.
|
|
|
rename_btn->set_shortcut(ED_SHORTCUT("project_manager/rename_project", TTRC("Rename Project"), Key::F2));
|
|
|
rename_btn->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_rename_project));
|
|
|
project_list_sidebar->add_child(rename_btn);
|
|
|
|
|
|
manage_tags_btn = memnew(Button);
|
|
|
- manage_tags_btn->set_text(TTR("Manage Tags"));
|
|
|
- manage_tags_btn->set_shortcut(ED_SHORTCUT("project_manager/project_tags", TTR("Manage Tags"), KeyModifierMask::CMD_OR_CTRL | Key::T));
|
|
|
+ manage_tags_btn->set_text(TTRC("Manage Tags"));
|
|
|
+ manage_tags_btn->set_shortcut(ED_SHORTCUT("project_manager/project_tags", TTRC("Manage Tags"), KeyModifierMask::CMD_OR_CTRL | Key::T));
|
|
|
project_list_sidebar->add_child(manage_tags_btn);
|
|
|
|
|
|
erase_btn = memnew(Button);
|
|
|
- erase_btn->set_text(TTR("Remove"));
|
|
|
+ erase_btn->set_text(TTRC("Remove"));
|
|
|
erase_btn->set_shortcut(ED_SHORTCUT("project_manager/remove_project", TTRC("Remove Project"), Key::KEY_DELETE));
|
|
|
erase_btn->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_erase_project));
|
|
|
project_list_sidebar->add_child(erase_btn);
|
|
@@ -1540,7 +1541,7 @@ ProjectManager::ProjectManager() {
|
|
|
project_list_sidebar->add_child(filler);
|
|
|
|
|
|
erase_missing_btn = memnew(Button);
|
|
|
- erase_missing_btn->set_text(TTR("Remove Missing"));
|
|
|
+ erase_missing_btn->set_text(TTRC("Remove Missing"));
|
|
|
erase_missing_btn->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_erase_missing_projects));
|
|
|
project_list_sidebar->add_child(erase_missing_btn);
|
|
|
}
|
|
@@ -1550,14 +1551,14 @@ ProjectManager::ProjectManager() {
|
|
|
if (AssetLibraryEditorPlugin::is_available()) {
|
|
|
asset_library = memnew(EditorAssetLibrary(true));
|
|
|
asset_library->set_name("AssetLibraryTab");
|
|
|
- _add_main_view(MAIN_VIEW_ASSETLIB, TTR("Asset Library"), Ref<Texture2D>(), asset_library);
|
|
|
+ _add_main_view(MAIN_VIEW_ASSETLIB, TTRC("Asset Library"), Ref<Texture2D>(), asset_library);
|
|
|
asset_library->connect("install_asset", callable_mp(this, &ProjectManager::_install_project));
|
|
|
} else {
|
|
|
VBoxContainer *asset_library_filler = memnew(VBoxContainer);
|
|
|
asset_library_filler->set_name("AssetLibraryTab");
|
|
|
- Button *asset_library_toggle = _add_main_view(MAIN_VIEW_ASSETLIB, TTR("Asset Library"), Ref<Texture2D>(), asset_library_filler);
|
|
|
+ Button *asset_library_toggle = _add_main_view(MAIN_VIEW_ASSETLIB, TTRC("Asset Library"), Ref<Texture2D>(), asset_library_filler);
|
|
|
asset_library_toggle->set_disabled(true);
|
|
|
- asset_library_toggle->set_tooltip_text(TTR("Asset Library not available (due to using Web editor, or because SSL support disabled)."));
|
|
|
+ asset_library_toggle->set_tooltip_text(TTRC("Asset Library not available (due to using Web editor, or because SSL support disabled)."));
|
|
|
}
|
|
|
|
|
|
// Footer bar.
|
|
@@ -1589,18 +1590,18 @@ ProjectManager::ProjectManager() {
|
|
|
scan_dir->set_previews_enabled(false);
|
|
|
scan_dir->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
|
|
|
scan_dir->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_DIR);
|
|
|
- scan_dir->set_title(TTR("Select a Folder to Scan")); // must be after mode or it's overridden
|
|
|
+ scan_dir->set_title(TTRC("Select a Folder to Scan")); // Must be after mode or it's overridden.
|
|
|
scan_dir->set_current_dir(EDITOR_GET("filesystem/directories/default_project_path"));
|
|
|
add_child(scan_dir);
|
|
|
scan_dir->connect("dir_selected", callable_mp(project_list, &ProjectList::find_projects));
|
|
|
|
|
|
erase_missing_ask = memnew(ConfirmationDialog);
|
|
|
- erase_missing_ask->set_ok_button_text(TTR("Remove All"));
|
|
|
+ erase_missing_ask->set_ok_button_text(TTRC("Remove All"));
|
|
|
erase_missing_ask->get_ok_button()->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_erase_missing_projects_confirm));
|
|
|
add_child(erase_missing_ask);
|
|
|
|
|
|
erase_ask = memnew(ConfirmationDialog);
|
|
|
- erase_ask->set_ok_button_text(TTR("Remove"));
|
|
|
+ erase_ask->set_ok_button_text(TTRC("Remove"));
|
|
|
erase_ask->get_ok_button()->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_erase_project_confirm));
|
|
|
add_child(erase_ask);
|
|
|
|
|
@@ -1613,24 +1614,24 @@ ProjectManager::ProjectManager() {
|
|
|
// Comment out for now until we have a better warning system to
|
|
|
// ensure users delete their project only.
|
|
|
//delete_project_contents = memnew(CheckBox);
|
|
|
- //delete_project_contents->set_text(TTR("Also delete project contents (no undo!)"));
|
|
|
+ //delete_project_contents->set_text(TTRC("Also delete project contents (no undo!)"));
|
|
|
//erase_ask_vb->add_child(delete_project_contents);
|
|
|
|
|
|
multi_open_ask = memnew(ConfirmationDialog);
|
|
|
- multi_open_ask->set_ok_button_text(TTR("Edit"));
|
|
|
+ multi_open_ask->set_ok_button_text(TTRC("Edit"));
|
|
|
multi_open_ask->get_ok_button()->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_open_selected_projects));
|
|
|
add_child(multi_open_ask);
|
|
|
|
|
|
multi_run_ask = memnew(ConfirmationDialog);
|
|
|
- multi_run_ask->set_ok_button_text(TTR("Run"));
|
|
|
+ multi_run_ask->set_ok_button_text(TTRC("Run"));
|
|
|
multi_run_ask->get_ok_button()->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_run_project_confirm));
|
|
|
add_child(multi_run_ask);
|
|
|
|
|
|
open_recovery_mode_ask = memnew(ConfirmationDialog);
|
|
|
open_recovery_mode_ask->set_min_size(Size2(550, 70) * EDSCALE);
|
|
|
open_recovery_mode_ask->set_autowrap(true);
|
|
|
- open_recovery_mode_ask->add_button(TTR("Edit normally"))->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_on_recovery_mode_popup_open_normal));
|
|
|
- open_recovery_mode_ask->set_ok_button_text(TTR("Edit in Recovery Mode"));
|
|
|
+ open_recovery_mode_ask->add_button(TTRC("Edit normally"))->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_on_recovery_mode_popup_open_normal));
|
|
|
+ open_recovery_mode_ask->set_ok_button_text(TTRC("Edit in Recovery Mode"));
|
|
|
open_recovery_mode_ask->get_ok_button()->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_on_recovery_mode_popup_open_recovery));
|
|
|
add_child(open_recovery_mode_ask);
|
|
|
|
|
@@ -1641,13 +1642,13 @@ ProjectManager::ProjectManager() {
|
|
|
if (ed_swap_cancel_ok == 0) {
|
|
|
ed_swap_cancel_ok = DisplayServer::get_singleton()->get_swap_cancel_ok() ? 2 : 1;
|
|
|
}
|
|
|
- full_convert_button = ask_update_settings->add_button(TTR("Convert Full Project"), ed_swap_cancel_ok != 2);
|
|
|
+ full_convert_button = ask_update_settings->add_button(TTRC("Convert Full Project"), ed_swap_cancel_ok != 2);
|
|
|
full_convert_button->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_full_convert_button_pressed));
|
|
|
add_child(ask_update_settings);
|
|
|
|
|
|
ask_full_convert_dialog = memnew(ConfirmationDialog);
|
|
|
ask_full_convert_dialog->set_autowrap(true);
|
|
|
- ask_full_convert_dialog->set_text(TTR("This option will perform full project conversion, updating scenes, resources and scripts from Godot 3 to work in Godot 4.\n\nNote that this is a best-effort conversion, i.e. it makes upgrading the project easier, but it will not open out-of-the-box and will still require manual adjustments.\n\nIMPORTANT: Make sure to backup your project before converting, as this operation makes it impossible to open it in older versions of Godot."));
|
|
|
+ ask_full_convert_dialog->set_text(TTRC("This option will perform full project conversion, updating scenes, resources and scripts from Godot 3 to work in Godot 4.\n\nNote that this is a best-effort conversion, i.e. it makes upgrading the project easier, but it will not open out-of-the-box and will still require manual adjustments.\n\nIMPORTANT: Make sure to backup your project before converting, as this operation makes it impossible to open it in older versions of Godot."));
|
|
|
ask_full_convert_dialog->connect(SceneStringName(confirmed), callable_mp(this, &ProjectManager::_perform_full_project_conversion));
|
|
|
add_child(ask_full_convert_dialog);
|
|
|
|
|
@@ -1657,7 +1658,7 @@ ProjectManager::ProjectManager() {
|
|
|
add_child(project_dialog);
|
|
|
|
|
|
error_dialog = memnew(AcceptDialog);
|
|
|
- error_dialog->set_title(TTR("Error"));
|
|
|
+ error_dialog->set_title(TTRC("Error"));
|
|
|
add_child(error_dialog);
|
|
|
|
|
|
about_dialog = memnew(EditorAbout);
|
|
@@ -1668,19 +1669,19 @@ ProjectManager::ProjectManager() {
|
|
|
{
|
|
|
tag_manage_dialog = memnew(ConfirmationDialog);
|
|
|
add_child(tag_manage_dialog);
|
|
|
- tag_manage_dialog->set_title(TTR("Manage Project Tags"));
|
|
|
+ tag_manage_dialog->set_title(TTRC("Manage Project Tags"));
|
|
|
tag_manage_dialog->get_ok_button()->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_apply_project_tags));
|
|
|
manage_tags_btn->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_manage_project_tags));
|
|
|
|
|
|
VBoxContainer *tag_vb = memnew(VBoxContainer);
|
|
|
tag_manage_dialog->add_child(tag_vb);
|
|
|
|
|
|
- Label *label = memnew(Label(TTR("Project Tags")));
|
|
|
+ Label *label = memnew(Label(TTRC("Project Tags")));
|
|
|
tag_vb->add_child(label);
|
|
|
label->set_theme_type_variation("HeaderMedium");
|
|
|
label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
|
|
|
|
|
- label = memnew(Label(TTR("Click tag to remove it from the project.")));
|
|
|
+ label = memnew(Label(TTRC("Click tag to remove it from the project.")));
|
|
|
tag_vb->add_child(label);
|
|
|
label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
|
|
|
|
@@ -1690,12 +1691,12 @@ ProjectManager::ProjectManager() {
|
|
|
|
|
|
tag_vb->add_child(memnew(HSeparator));
|
|
|
|
|
|
- label = memnew(Label(TTR("All Tags")));
|
|
|
+ label = memnew(Label(TTRC("All Tags")));
|
|
|
tag_vb->add_child(label);
|
|
|
label->set_theme_type_variation("HeaderMedium");
|
|
|
label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
|
|
|
|
|
- label = memnew(Label(TTR("Click tag to add it to the project.")));
|
|
|
+ label = memnew(Label(TTRC("Click tag to add it to the project.")));
|
|
|
tag_vb->add_child(label);
|
|
|
label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
|
|
|
|
|
@@ -1709,13 +1710,13 @@ ProjectManager::ProjectManager() {
|
|
|
|
|
|
create_tag_dialog = memnew(ConfirmationDialog);
|
|
|
tag_manage_dialog->add_child(create_tag_dialog);
|
|
|
- create_tag_dialog->set_title(TTR("Create New Tag"));
|
|
|
+ create_tag_dialog->set_title(TTRC("Create New Tag"));
|
|
|
create_tag_dialog->get_ok_button()->connect(SceneStringName(pressed), callable_mp(this, &ProjectManager::_create_new_tag));
|
|
|
|
|
|
tag_vb = memnew(VBoxContainer);
|
|
|
create_tag_dialog->add_child(tag_vb);
|
|
|
|
|
|
- Label *info = memnew(Label(TTR("Tags are capitalized automatically when displayed.")));
|
|
|
+ Label *info = memnew(Label(TTRC("Tags are capitalized automatically when displayed.")));
|
|
|
tag_vb->add_child(info);
|
|
|
|
|
|
new_tag_name = memnew(LineEdit);
|