diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index 56759a8086..c2e173c040 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -800,7 +800,7 @@ ConnectionsDock::ConnectionsDock(EditorNode *p_editor) { tree->set_v_size_flags(SIZE_EXPAND_FILL); connect_button = memnew(Button); - connect_button->set_text("Connect"); + connect_button->set_text(TTR("Connect")); HBoxContainer *hb = memnew(HBoxContainer); vbc->add_child(hb); hb->add_spacer(); diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp index 6c05a9ef80..caed426b2d 100644 --- a/editor/editor_asset_installer.cpp +++ b/editor/editor_asset_installer.cpp @@ -89,7 +89,7 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) { unzFile pkg = unzOpen2(p_path.utf8().get_data(), &io); if (!pkg) { - error->set_text("Error opening package file, not in zip format."); + error->set_text(TTR("Error opening package file, not in zip format.")); return; } @@ -221,7 +221,7 @@ void EditorAssetInstaller::ok_pressed() { unzFile pkg = unzOpen2(package_path.utf8().get_data(), &io); if (!pkg) { - error->set_text("Error opening package file, not in zip format."); + error->set_text(TTR("Error opening package file, not in zip format.")); return; } @@ -229,7 +229,7 @@ void EditorAssetInstaller::ok_pressed() { Vector failed_files; - ProgressDialog::get_singleton()->add_task("uncompress", "Uncompressing Assets", status_map.size()); + ProgressDialog::get_singleton()->add_task("uncompress", TTR("Uncompressing Assets"), status_map.size()); int idx = 0; while (ret == UNZ_OK) { @@ -304,7 +304,7 @@ void EditorAssetInstaller::ok_pressed() { EditorNode::get_singleton()->show_warning(msg); } else { if (EditorNode::get_singleton() != NULL) - EditorNode::get_singleton()->show_warning("Package Installed Successfully!", "Success!"); + EditorNode::get_singleton()->show_warning(TTR("Package Installed Successfully!"), TTR("Success!")); } EditorFileSystem::get_singleton()->scan_changes(); } @@ -325,8 +325,8 @@ EditorAssetInstaller::EditorAssetInstaller() { error = memnew(AcceptDialog); add_child(error); - get_ok()->set_text("Install"); - set_title("Package Installer"); + get_ok()->set_text(TTR("Install")); + set_title(TTR("Package Installer")); updating = false; diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 3494aa577d..1f72a59a14 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -128,7 +128,7 @@ void EditorAudioBus::update_send() { send->clear(); if (get_index() == 0) { send->set_disabled(true); - send->set_text("Speakers"); + send->set_text(TTR("Speakers")); } else { send->set_disabled(false); StringName current_send = AudioServer::get_singleton()->get_bus_send(get_index()); @@ -183,7 +183,7 @@ void EditorAudioBus::update_bus() { add->set_cell_mode(0, TreeItem::CELL_MODE_CUSTOM); add->set_editable(0, true); add->set_selectable(0, false); - add->set_text(0, "Add Effect"); + add->set_text(0, TTR("Add Effect")); update_send(); @@ -221,7 +221,7 @@ void EditorAudioBus::_name_changed(const String &p_new_name) { UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); StringName current = AudioServer::get_singleton()->get_bus_name(get_index()); - ur->create_action("Rename Audio Bus"); + ur->create_action(TTR("Rename Audio Bus")); ur->add_do_method(AudioServer::get_singleton(), "set_bus_name", get_index(), attempt); ur->add_undo_method(AudioServer::get_singleton(), "set_bus_name", get_index(), current); @@ -264,7 +264,7 @@ void EditorAudioBus::_solo_toggled() { updating_bus = true; UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); - ur->create_action("Toggle Audio Bus Solo"); + ur->create_action(TTR("Toggle Audio Bus Solo")); ur->add_do_method(AudioServer::get_singleton(), "set_bus_solo", get_index(), solo->is_pressed()); ur->add_undo_method(AudioServer::get_singleton(), "set_bus_solo", get_index(), AudioServer::get_singleton()->is_bus_solo(get_index())); ur->add_do_method(buses, "_update_bus", get_index()); @@ -278,7 +278,7 @@ void EditorAudioBus::_mute_toggled() { updating_bus = true; UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); - ur->create_action("Toggle Audio Bus Mute"); + ur->create_action(TTR("Toggle Audio Bus Mute")); ur->add_do_method(AudioServer::get_singleton(), "set_bus_mute", get_index(), mute->is_pressed()); ur->add_undo_method(AudioServer::get_singleton(), "set_bus_mute", get_index(), AudioServer::get_singleton()->is_bus_mute(get_index())); ur->add_do_method(buses, "_update_bus", get_index()); @@ -292,7 +292,7 @@ void EditorAudioBus::_bypass_toggled() { updating_bus = true; UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); - ur->create_action("Toggle Audio Bus Bypass Effects"); + ur->create_action(TTR("Toggle Audio Bus Bypass Effects")); ur->add_do_method(AudioServer::get_singleton(), "set_bus_bypass_effects", get_index(), bypass->is_pressed()); ur->add_undo_method(AudioServer::get_singleton(), "set_bus_bypass_effects", get_index(), AudioServer::get_singleton()->is_bus_bypassing_effects(get_index())); ur->add_do_method(buses, "_update_bus", get_index()); @@ -356,7 +356,7 @@ void EditorAudioBus::_effect_edited() { updating_bus = true; UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); - ur->create_action("Select Audio Bus Send"); + ur->create_action(TTR("Select Audio Bus Send")); ur->add_do_method(AudioServer::get_singleton(), "set_bus_effect_enabled", get_index(), index, effect->is_checked(0)); ur->add_undo_method(AudioServer::get_singleton(), "set_bus_effect_enabled", get_index(), index, AudioServer::get_singleton()->is_bus_effect_enabled(get_index(), index)); ur->add_do_method(buses, "_update_bus", get_index()); @@ -383,7 +383,7 @@ void EditorAudioBus::_effect_add(int p_which) { afxr->set_name(effect_options->get_item_text(p_which)); UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); - ur->create_action("Add Audio Bus Effect"); + ur->create_action(TTR("Add Audio Bus Effect")); ur->add_do_method(AudioServer::get_singleton(), "add_bus_effect", get_index(), afxr, -1); ur->add_undo_method(AudioServer::get_singleton(), "remove_bus_effect", get_index(), AudioServer::get_singleton()->get_bus_effect_count(get_index())); ur->add_do_method(buses, "_update_bus", get_index()); @@ -526,7 +526,7 @@ void EditorAudioBus::drop_data_fw(const Point2 &p_point, const Variant &p_data, bool enabled = AudioServer::get_singleton()->is_bus_effect_enabled(bus, effect); UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); - ur->create_action("Move Bus Effect"); + ur->create_action(TTR("Move Bus Effect")); ur->add_do_method(AudioServer::get_singleton(), "remove_bus_effect", bus, effect); ur->add_do_method(AudioServer::get_singleton(), "add_bus_effect", get_index(), AudioServer::get_singleton()->get_bus_effect(bus, effect), paste_at); @@ -567,7 +567,7 @@ void EditorAudioBus::_delete_effect_pressed(int p_option) { int index = item->get_metadata(0); UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); - ur->create_action("Delete Bus Effect"); + ur->create_action(TTR("Delete Bus Effect")); ur->add_do_method(AudioServer::get_singleton(), "remove_bus_effect", get_index(), index); ur->add_undo_method(AudioServer::get_singleton(), "add_bus_effect", get_index(), AudioServer::get_singleton()->get_bus_effect(get_index(), index), index); ur->add_undo_method(AudioServer::get_singleton(), "set_bus_effect_enabled", get_index(), index, AudioServer::get_singleton()->is_bus_effect_enabled(get_index(), index)); @@ -736,13 +736,13 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses) { } delete_popup = bus_options->get_popup(); - delete_popup->add_item("Duplicate"); - delete_popup->add_item("Delete"); + delete_popup->add_item(TTR("Duplicate")); + delete_popup->add_item(TTR("Delete")); add_child(delete_popup); delete_popup->connect("index_pressed", this, "_delete_pressed"); delete_effect_popup = memnew(PopupMenu); - delete_effect_popup->add_item("Delete Effect"); + delete_effect_popup->add_item(TTR("Delete Effect")); add_child(delete_effect_popup); delete_effect_popup->connect("index_pressed", this, "_delete_effect_pressed"); } @@ -840,7 +840,7 @@ void EditorAudioBuses::_add_bus() { UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); //need to simulate new name, so we can undi :( - ur->create_action("Add Audio Bus"); + ur->create_action(TTR("Add Audio Bus")); ur->add_do_method(AudioServer::get_singleton(), "set_bus_count", AudioServer::get_singleton()->get_bus_count() + 1); ur->add_undo_method(AudioServer::get_singleton(), "set_bus_count", AudioServer::get_singleton()->get_bus_count()); ur->add_do_method(this, "_update_buses"); @@ -868,13 +868,13 @@ void EditorAudioBuses::_delete_bus(Object *p_which) { EditorAudioBus *bus = Object::cast_to(p_which); int index = bus->get_index(); if (index == 0) { - EditorNode::get_singleton()->show_warning("Master bus can't be deleted!"); + EditorNode::get_singleton()->show_warning(TTR("Master bus can't be deleted!")); return; } UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); - ur->create_action("Delete Audio Bus"); + ur->create_action(TTR("Delete Audio Bus")); ur->add_do_method(AudioServer::get_singleton(), "remove_bus", index); ur->add_undo_method(AudioServer::get_singleton(), "add_bus", index); ur->add_undo_method(AudioServer::get_singleton(), "set_bus_name", index, AudioServer::get_singleton()->get_bus_name(index)); @@ -897,7 +897,7 @@ void EditorAudioBuses::_duplicate_bus(int p_which) { int add_at_pos = p_which + 1; UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); - ur->create_action("Duplicate Audio Bus"); + ur->create_action(TTR("Duplicate Audio Bus")); ur->add_do_method(AudioServer::get_singleton(), "add_bus", add_at_pos); ur->add_do_method(AudioServer::get_singleton(), "set_bus_name", add_at_pos, AudioServer::get_singleton()->get_bus_name(p_which) + " Copy"); ur->add_do_method(AudioServer::get_singleton(), "set_bus_volume_db", add_at_pos, AudioServer::get_singleton()->get_bus_volume_db(p_which)); @@ -932,7 +932,7 @@ void EditorAudioBuses::_drop_at_index(int p_bus, int p_index) { UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); //need to simulate new name, so we can undi :( - ur->create_action("Move Audio Bus"); + ur->create_action(TTR("Move Audio Bus")); ur->add_do_method(AudioServer::get_singleton(), "move_bus", p_bus, p_index); int final_pos; if (p_index == p_bus) { @@ -993,7 +993,7 @@ void EditorAudioBuses::_load_default_layout() { Ref state = ResourceLoader::load("res://default_bus_layout.tres"); if (state.is_null()) { - EditorNode::get_singleton()->show_warning("There is no 'res://default_bus_layout.tres' file."); + EditorNode::get_singleton()->show_warning(TTR("There is no 'res://default_bus_layout.tres' file.")); return; } @@ -1010,7 +1010,7 @@ void EditorAudioBuses::_file_dialog_callback(const String &p_string) { if (file_dialog->get_mode() == EditorFileDialog::MODE_OPEN_FILE) { Ref state = ResourceLoader::load(p_string); if (state.is_null()) { - EditorNode::get_singleton()->show_warning("Invalid file, not an audio bus layout."); + EditorNode::get_singleton()->show_warning(TTR("Invalid file, not an audio bus layout.")); return; } @@ -1144,7 +1144,7 @@ void EditorAudioBuses::open_layout(const String &p_path) { Ref state = ResourceLoader::load(p_path); if (state.is_null()) { - EditorNode::get_singleton()->show_warning("Invalid file, not an audio bus layout."); + EditorNode::get_singleton()->show_warning(TTR("Invalid file, not an audio bus layout.")); return; } diff --git a/editor/editor_dir_dialog.cpp b/editor/editor_dir_dialog.cpp index 12c55d9671..80d3abcf0c 100644 --- a/editor/editor_dir_dialog.cpp +++ b/editor/editor_dir_dialog.cpp @@ -184,7 +184,7 @@ void EditorDirDialog::_make_dir() { TreeItem *ti = tree->get_selected(); if (!ti) { - mkdirerr->set_text("Please select a base directory first"); + mkdirerr->set_text(TTR("Please select a base directory first")); mkdirerr->popup_centered_minsize(); return; } diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 26dbc27136..6e4a848517 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -809,27 +809,27 @@ void EditorFileDialog::set_mode(Mode p_mode) { case MODE_OPEN_FILE: get_ok()->set_text(TTR("Open")); - set_title("Open a File"); + set_title(TTR("Open a File")); makedir->hide(); break; case MODE_OPEN_FILES: get_ok()->set_text(TTR("Open")); - set_title("Open File(s)"); + set_title(TTR("Open File(s)")); makedir->hide(); break; case MODE_OPEN_DIR: get_ok()->set_text(TTR("Open")); - set_title("Open a Directory"); + set_title(TTR("Open a Directory")); makedir->show(); break; case MODE_OPEN_ANY: get_ok()->set_text(TTR("Open")); - set_title("Open a File or Directory"); + set_title(TTR("Open a File or Directory")); makedir->show(); break; case MODE_SAVE_FILE: get_ok()->set_text(TTR("Save")); - set_title("Save a File"); + set_title(TTR("Save a File")); makedir->show(); break; } diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index fb3c52e773..9bf3372e1f 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -913,7 +913,7 @@ void EditorNode::_save_scene(String p_file, int idx) { current_option = -1; //accept->get_cancel()->hide(); accept->get_ok()->set_text(TTR("I see..")); - accept->set_text("This operation can't be done without a tree root."); + accept->set_text(TTR("This operation can't be done without a tree root.")); accept->popup_centered_minsize(); return; } @@ -1967,7 +1967,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { current_option = -1; //confirmation->get_cancel()->hide(); accept->get_ok()->set_text(TTR("I see..")); - accept->set_text("This operation can't be done without a tree root."); + accept->set_text(TTR("This operation can't be done without a tree root.")); accept->popup_centered_minsize(); break; } @@ -2073,7 +2073,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { current_option = -1; //confirmation->get_cancel()->hide(); accept->get_ok()->set_text(TTR("I see..")); - accept->set_text("This operation can't be done without a scene."); + accept->set_text(TTR("This operation can't be done without a scene.")); accept->popup_centered_minsize(); break; } @@ -2118,7 +2118,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { current_option = -1; //accept->get_cancel()->hide(); accept->get_ok()->set_text(TTR("I see..")); - accept->set_text("This operation can't be done without a selected node."); + accept->set_text(TTR("This operation can't be done without a selected node.")); accept->popup_centered_minsize(); break; } @@ -2944,12 +2944,12 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled) String addon_path = "res://addons/" + p_addon + "/plugin.cfg"; Error err = cf->load(addon_path); if (err != OK) { - show_warning("Unable to enable addon plugin at: '" + addon_path + "' parsing of config failed."); + show_warning(TTR("Unable to enable addon plugin at: '") + addon_path + TTR("' parsing of config failed.")); return; } if (!cf->has_section_key("plugin", "script")) { - show_warning("Unable to find script field for addon plugin at: 'res://addons/" + p_addon + "''."); + show_warning(TTR("Unable to find script field for addon plugin at: 'res://addons/") + p_addon + "''."); return; } @@ -2959,18 +2959,18 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled) Ref