diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-07-20 09:45:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-20 09:45:17 +0200 |
commit | 87d8927ab026f8c66e71ca04d57c497f8d5d8b89 (patch) | |
tree | 116f76a15b4f4e372c193c2ba4906b3cd7ccbcbc | |
parent | 2f060df059711a9d89f7ab2796f35f3c32d609d0 (diff) | |
parent | 42d740d641a868fca3de69e5ebe158c9f63dafce (diff) |
Merge pull request #50624 from foxydevloper/translate-more-strings
Make various strings translatable
-rw-r--r-- | editor/action_map_editor.cpp | 10 | ||||
-rw-r--r-- | editor/editor_log.cpp | 8 | ||||
-rw-r--r-- | editor/plugins/animation_tree_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/input_event_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 4 | ||||
-rw-r--r-- | editor/plugins/sprite_2d_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/tiles/tile_data_editors.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/version_control_editor_plugin.cpp | 10 | ||||
-rw-r--r-- | editor/project_export.cpp | 6 | ||||
-rw-r--r-- | editor/shader_globals_editor.cpp | 6 |
11 files changed, 27 insertions, 27 deletions
diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp index 04c1c9951b..d3f3ecba54 100644 --- a/editor/action_map_editor.cpp +++ b/editor/action_map_editor.cpp @@ -581,7 +581,7 @@ void InputEventConfigurationDialog::set_allowed_input_types(int p_type_masks) { InputEventConfigurationDialog::InputEventConfigurationDialog() { allowed_input_types = INPUT_KEY | INPUT_MOUSE_BUTTON | INPUT_JOY_BUTTON | INPUT_JOY_MOTION; - set_title("Event Configuration"); + set_title(TTR("Event Configuration")); set_min_size(Size2i(550 * EDSCALE, 0)); // Min width VBoxContainer *main_vbox = memnew(VBoxContainer); @@ -595,7 +595,7 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() { main_vbox->add_child(tab_container); CenterContainer *cc = memnew(CenterContainer); - cc->set_name("Listen for Input"); + cc->set_name(TTR("Listen for Input")); event_as_text = memnew(Label); event_as_text->set_align(Label::ALIGN_CENTER); cc->add_child(event_as_text); @@ -604,7 +604,7 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() { // List of all input options to manually select from. VBoxContainer *manual_vbox = memnew(VBoxContainer); - manual_vbox->set_name("Manual Selection"); + manual_vbox->set_name(TTR("Manual Selection")); manual_vbox->set_v_size_flags(Control::SIZE_EXPAND_FILL); tab_container->add_child(manual_vbox); @@ -632,7 +632,7 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() { Label *opts_label = memnew(Label); opts_label->set_theme_type_variation("HeaderSmall"); - opts_label->set_text("Additional Options"); + opts_label->set_text(TTR("Additional Options")); additional_options_container->add_child(opts_label); // Device Selection @@ -641,7 +641,7 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() { Label *device_label = memnew(Label); device_label->set_theme_type_variation("HeaderSmall"); - device_label->set_text("Device:"); + device_label->set_text(TTR("Device:")); device_container->add_child(device_label); device_id_option = memnew(OptionButton); diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index b64cc3f31c..6de7f6c425 100644 --- a/editor/editor_log.cpp +++ b/editor/editor_log.cpp @@ -398,22 +398,22 @@ EditorLog::EditorLog() { vb_right->add_child(memnew(HSeparator)); LogFilter *std_filter = memnew(LogFilter(MSG_TYPE_STD)); - std_filter->initialize_button("Toggle visibility of standard output messages.", callable_mp(this, &EditorLog::_set_filter_active)); + std_filter->initialize_button(TTR("Toggle visibility of standard output messages."), callable_mp(this, &EditorLog::_set_filter_active)); vb_right->add_child(std_filter->toggle_button); type_filter_map.insert(MSG_TYPE_STD, std_filter); LogFilter *error_filter = memnew(LogFilter(MSG_TYPE_ERROR)); - error_filter->initialize_button("Toggle visibility of errors.", callable_mp(this, &EditorLog::_set_filter_active)); + error_filter->initialize_button(TTR("Toggle visibility of errors."), callable_mp(this, &EditorLog::_set_filter_active)); vb_right->add_child(error_filter->toggle_button); type_filter_map.insert(MSG_TYPE_ERROR, error_filter); LogFilter *warning_filter = memnew(LogFilter(MSG_TYPE_WARNING)); - warning_filter->initialize_button("Toggle visibility of warnings.", callable_mp(this, &EditorLog::_set_filter_active)); + warning_filter->initialize_button(TTR("Toggle visibility of warnings."), callable_mp(this, &EditorLog::_set_filter_active)); vb_right->add_child(warning_filter->toggle_button); type_filter_map.insert(MSG_TYPE_WARNING, warning_filter); LogFilter *editor_filter = memnew(LogFilter(MSG_TYPE_EDITOR)); - editor_filter->initialize_button("Toggle visibility of editor messages.", callable_mp(this, &EditorLog::_set_filter_active)); + editor_filter->initialize_button(TTR("Toggle visibility of editor messages."), callable_mp(this, &EditorLog::_set_filter_active)); vb_right->add_child(editor_filter->toggle_button); type_filter_map.insert(MSG_TYPE_EDITOR, editor_filter); diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp index e90665f84d..9c28e023dd 100644 --- a/editor/plugins/animation_tree_editor_plugin.cpp +++ b/editor/plugins/animation_tree_editor_plugin.cpp @@ -79,7 +79,7 @@ void AnimationTreeEditor::_update_path() { group.instantiate(); Button *b = memnew(Button); - b->set_text("Root"); + b->set_text(TTR("Root")); b->set_toggle_mode(true); b->set_button_group(group); b->set_pressed(true); diff --git a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp index 71598b904b..a4436525fb 100644 --- a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp +++ b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp @@ -131,7 +131,7 @@ void GPUParticlesCollisionSDFEditorPlugin::_sdf_save_path_and_bake(const String if (col_sdf) { Ref<Image> bake_img = col_sdf->bake(); if (bake_img.is_null()) { - EditorNode::get_singleton()->show_warning("Bake Error."); + EditorNode::get_singleton()->show_warning(TTR("Bake Error.")); return; } diff --git a/editor/plugins/input_event_editor_plugin.cpp b/editor/plugins/input_event_editor_plugin.cpp index f1aa10844b..d3d2de92f5 100644 --- a/editor/plugins/input_event_editor_plugin.cpp +++ b/editor/plugins/input_event_editor_plugin.cpp @@ -86,7 +86,7 @@ InputEventConfigContainer::InputEventConfigContainer() { mc->add_child(hb); open_config_button = memnew(Button); - open_config_button->set_text("Configure"); + open_config_button->set_text(TTR("Configure")); open_config_button->connect("pressed", callable_mp(this, &InputEventConfigContainer::_configure_pressed)); hb->add_child(open_config_button); diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index c341783d54..14cff520b4 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -6248,7 +6248,7 @@ void Node3DEditor::_add_sun_to_scene(bool p_already_added_environment) { ERR_FAIL_COND(!base); Node *new_sun = preview_sun->duplicate(); - undo_redo->create_action("Add Preview Sun to Scene"); + undo_redo->create_action(TTR("Add Preview Sun to Scene")); undo_redo->add_do_method(base, "add_child", new_sun); // Move to the beginning of the scene tree since more "global" nodes // generally look better when placed at the top. @@ -6278,7 +6278,7 @@ void Node3DEditor::_add_environment_to_scene(bool p_already_added_sun) { WorldEnvironment *new_env = memnew(WorldEnvironment); new_env->set_environment(preview_environment->get_environment()->duplicate(true)); - undo_redo->create_action("Add Preview Environment to Scene"); + undo_redo->create_action(TTR("Add Preview Environment to Scene")); undo_redo->add_do_method(base, "add_child", new_env); // Move to the beginning of the scene tree since more "global" nodes // generally look better when placed at the top. diff --git a/editor/plugins/sprite_2d_editor_plugin.cpp b/editor/plugins/sprite_2d_editor_plugin.cpp index 9a62b22d63..0f889ce33d 100644 --- a/editor/plugins/sprite_2d_editor_plugin.cpp +++ b/editor/plugins/sprite_2d_editor_plugin.cpp @@ -521,7 +521,7 @@ Sprite2DEditor::Sprite2DEditor() { debug_uv_dialog = memnew(ConfirmationDialog); debug_uv_dialog->get_ok_button()->set_text(TTR("Create Mesh2D")); - debug_uv_dialog->set_title("Mesh 2D Preview"); + debug_uv_dialog->set_title(TTR("Mesh 2D Preview")); VBoxContainer *vb = memnew(VBoxContainer); debug_uv_dialog->add_child(vb); ScrollContainer *scroll = memnew(ScrollContainer); diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp index 8cfc4990ea..dd2922286f 100644 --- a/editor/plugins/tiles/tile_data_editors.cpp +++ b/editor/plugins/tiles/tile_data_editors.cpp @@ -1050,7 +1050,7 @@ void TileDataDefaultEditor::_notification(int p_what) { TileDataDefaultEditor::TileDataDefaultEditor() { label = memnew(Label); - label->set_text("Painting:"); + label->set_text(TTR("Painting:")); add_child(label); toolbar->add_child(memnew(VSeparator)); diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp index 25b08a1509..5804f54649 100644 --- a/editor/plugins/version_control_editor_plugin.cpp +++ b/editor/plugins/version_control_editor_plugin.cpp @@ -164,7 +164,7 @@ void VersionControlEditorPlugin::_refresh_stage_area() { _refresh_file_diff(); } } - commit_status->set_text("New changes detected"); + commit_status->set_text(TTR("New changes detected")); } } else { WARN_PRINT("No VCS addon is initialized. Select a Version Control Addon from Project menu."); @@ -270,9 +270,9 @@ void VersionControlEditorPlugin::_clear_file_diff() { void VersionControlEditorPlugin::_update_stage_status() { String status; if (staged_files_count == 1) { - status = "Stage contains 1 file"; + status = TTR("Stage contains 1 file"); } else { - status = "Stage contains " + String::num_int64(staged_files_count) + " files"; + status = vformat(TTR("Stage contains %d files"), staged_files_count); } commit_status->set_text(status); } @@ -280,9 +280,9 @@ void VersionControlEditorPlugin::_update_stage_status() { void VersionControlEditorPlugin::_update_commit_status() { String status; if (staged_files_count == 1) { - status = "Committed 1 file"; + status = TTR("Committed 1 file"); } else { - status = "Committed " + String::num_int64(staged_files_count) + " files "; + status = vformat(TTR("Committed %d files"), staged_files_count); } commit_status->set_text(status); staged_files_count = 0; diff --git a/editor/project_export.cpp b/editor/project_export.cpp index b8e1613fca..1e818b9d43 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -1153,7 +1153,7 @@ ProjectExportDialog::ProjectExportDialog() { enc_directory = memnew(CheckButton); enc_directory->connect("toggled", callable_mp(this, &ProjectExportDialog::_enc_directory_changed)); - enc_directory->set_text("Encrypt Index (File Names and Info)"); + enc_directory->set_text(TTR("Encrypt Index (File Names and Info)")); sec_vb->add_child(enc_directory); enc_in_filters = memnew(LineEdit); @@ -1219,7 +1219,7 @@ ProjectExportDialog::ProjectExportDialog() { export_all_dialog = memnew(ConfirmationDialog); add_child(export_all_dialog); - export_all_dialog->set_title("Export All"); + export_all_dialog->set_title(TTR("Export All")); export_all_dialog->set_text(TTR("Choose an export mode:")); export_all_dialog->get_ok_button()->hide(); export_all_dialog->add_button(TTR("Debug"), true, "debug"); @@ -1253,7 +1253,7 @@ ProjectExportDialog::ProjectExportDialog() { export_error2->set_text(" - " + TTR("Export templates for this platform are missing:") + " "); error_dialog = memnew(AcceptDialog); - error_dialog->set_title("Error"); + error_dialog->set_title(TTR("Error")); error_dialog->set_text(TTR("Export templates for this platform are missing/corrupted:") + " "); main_vb->add_child(error_dialog); error_dialog->hide(); diff --git a/editor/shader_globals_editor.cpp b/editor/shader_globals_editor.cpp index eba96e5967..a844678cea 100644 --- a/editor/shader_globals_editor.cpp +++ b/editor/shader_globals_editor.cpp @@ -84,7 +84,7 @@ protected: UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo(); - undo_redo->create_action("Set Shader Global Variable"); + undo_redo->create_action(TTR("Set Shader Global Variable")); undo_redo->add_do_method(RS::get_singleton(), "global_variable_set", p_name, p_value); undo_redo->add_undo_method(RS::get_singleton(), "global_variable_set", p_name, existing); RS::GlobalVariableType type = RS::get_singleton()->global_variable_get_type(p_name); @@ -395,7 +395,7 @@ void ShaderGlobalsEditor::_variable_added() { Variant value = create_var(RS::GlobalVariableType(variable_type->get_selected())); - undo_redo->create_action("Add Shader Global Variable"); + undo_redo->create_action(TTR("Add Shader Global Variable")); undo_redo->add_do_method(RS::get_singleton(), "global_variable_add", var, RS::GlobalVariableType(variable_type->get_selected()), value); undo_redo->add_undo_method(RS::get_singleton(), "global_variable_remove", var); Dictionary gv; @@ -413,7 +413,7 @@ void ShaderGlobalsEditor::_variable_deleted(const String &p_variable) { print_line("deleted " + p_variable); UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo(); - undo_redo->create_action("Add Shader Global Variable"); + undo_redo->create_action(TTR("Add Shader Global Variable")); undo_redo->add_do_method(RS::get_singleton(), "global_variable_remove", p_variable); undo_redo->add_undo_method(RS::get_singleton(), "global_variable_add", p_variable, RS::get_singleton()->global_variable_get_type(p_variable), RS::get_singleton()->global_variable_get(p_variable)); |