From 80b82e4e6683eb0ae98d8dca8664d00cc97c3a6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 8 Jun 2022 11:42:51 +0200 Subject: [PATCH] i18n: Misc fixes translation strings Adds some translator comments to solve some questions raised on Weblate. --- core/math/expression.cpp | 2 +- doc/classes/Color.xml | 18 +++++----- doc/classes/EditorPlugin.xml | 2 +- doc/classes/Environment.xml | 4 +-- doc/classes/NodePath.xml | 2 +- doc/classes/OS.xml | 2 +- doc/classes/Range.xml | 2 +- doc/classes/SceneTreeTimer.xml | 2 +- doc/classes/VisualServer.xml | 2 +- editor/animation_bezier_editor.cpp | 1 + editor/animation_track_editor.cpp | 33 +++++++++---------- editor/editor_audio_buses.cpp | 8 ++--- editor/editor_properties_array_dict.cpp | 6 ++-- editor/editor_settings.cpp | 1 + editor/find_in_files.cpp | 4 +-- editor/import/resource_importer_scene.cpp | 2 +- .../animation_player_editor_plugin.cpp | 2 ++ .../animation_state_machine_editor.cpp | 2 +- editor/plugins/canvas_item_editor_plugin.cpp | 1 + editor/plugins/particles_editor_plugin.cpp | 2 +- .../resource_preloader_editor_plugin.cpp | 5 +-- editor/plugins/spatial_editor_plugin.cpp | 7 ++-- editor/plugins/sprite_editor_plugin.cpp | 6 ++-- editor/script_editor_debugger.cpp | 2 +- .../gdnative_library_singleton_editor.cpp | 2 +- modules/visual_script/visual_script.cpp | 4 +-- .../visual_script_flow_control.cpp | 4 +-- modules/visual_script/visual_script_nodes.cpp | 8 ++--- 28 files changed, 70 insertions(+), 66 deletions(-) diff --git a/core/math/expression.cpp b/core/math/expression.cpp index 280dbe27dce..57edf73620e 100644 --- a/core/math/expression.cpp +++ b/core/math/expression.cpp @@ -1946,7 +1946,7 @@ bool Expression::_execute(const Array &p_inputs, Object *p_instance, Expression: case Expression::ENode::TYPE_INPUT: { const Expression::InputNode *in = static_cast(p_node); if (in->index < 0 || in->index >= p_inputs.size()) { - r_error_str = vformat(RTR("Invalid input %i (not passed) in expression"), in->index); + r_error_str = vformat(RTR("Invalid input %d (not passed) in expression"), in->index); return true; } r_ret = p_inputs[in->index]; diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 467e2a2dfae..ceee7d45b6d 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -36,7 +36,7 @@ Constructs a color from a 32-bit integer in RGBA format (each byte represents a color channel). [codeblock] - var c = Color(274) # Similar to Color(0.0, 0.0, 0.004, 0.07) + var color = Color(274) # Similar to Color(0.0, 0.0, 0.004, 0.07) [/codeblock] @@ -82,8 +82,8 @@ Returns the most contrasting color. [codeblock] - var c = Color(0.3, 0.4, 0.9) - var contrasted_color = c.contrasted() # Equivalent to RGBA(204, 229, 102, 255) + var color = Color(0.3, 0.4, 0.9) + var contrasted_color = color.contrasted() # Equivalent to RGBA(204, 229, 102, 255) [/codeblock] @@ -107,7 +107,7 @@ Constructs a color from an HSV profile. [code]h[/code], [code]s[/code], and [code]v[/code] are values between 0 and 1. [codeblock] - var c = Color.from_hsv(0.58, 0.5, 0.79, 0.8) # Equivalent to HSV(210, 50, 79, 0.8) or Color8(100, 151, 201, 0.8) + var color = Color.from_hsv(0.58, 0.5, 0.79, 0.8) # Equivalent to HSV(210, 50, 79, 0.8) or Color8(100, 151, 201, 0.8) [/codeblock] @@ -124,8 +124,8 @@ Returns the color's grayscale representation. The gray value is calculated as [code](r + g + b) / 3[/code]. [codeblock] - var c = Color(0.2, 0.45, 0.82) - var gray = c.gray() # A value of 0.466667 + var color = Color(0.2, 0.45, 0.82) + var gray = color.gray() # A value of 0.466667 [/codeblock] @@ -217,9 +217,9 @@ Returns the color's HTML hexadecimal color string in ARGB format (ex: [code]ff34f822[/code]). Setting [code]with_alpha[/code] to [code]false[/code] excludes alpha from the hexadecimal string. [codeblock] - var c = Color(1, 1, 1, 0.5) - var s1 = c.to_html() # Returns "7fffffff" - var s2 = c.to_html(false) # Returns "ffffff" + var color = Color(1, 1, 1, 0.5) + var s1 = color.to_html() # Returns "7fffffff" + var s2 = color.to_html(false) # Returns "ffffff" [/codeblock] diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index 04aa4a92e63..5a6de59d0c7 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -302,7 +302,7 @@ - Gets the Editor's dialogue used for making scripts. + Gets the Editor's dialog used for making scripts. [b]Note:[/b] Users can configure it before use. [b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash. diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index b30ec3aaabb..0c3d3f512de 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -379,10 +379,10 @@ Low quality for the screen-space ambient occlusion effect (fastest). - Low quality for the screen-space ambient occlusion effect. + Medium quality for the screen-space ambient occlusion effect. - Low quality for the screen-space ambient occlusion effect (slowest). + High quality for the screen-space ambient occlusion effect (slowest). diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml index baf59e7d64f..98bddf44aff 100644 --- a/doc/classes/NodePath.xml +++ b/doc/classes/NodePath.xml @@ -76,7 +76,7 @@ - Gets the node name indicated by [code]idx[/code] (0 to [method get_name_count]). + Gets the node name indicated by [code]idx[/code] (0 to [method get_name_count] - 1). [codeblock] var node_path = NodePath("Path2D/PathFollow2D/Sprite") print(node_path.get_name(0)) # Path2D diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index a9d67a8b25f..1528c801cfb 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -995,7 +995,7 @@ Requests the OS to open a resource with the most appropriate program. For example: - [code]OS.shell_open("C:\\Users\name\Downloads")[/code] on Windows opens the file explorer at the user's Downloads folder. - [code]OS.shell_open("https://godotengine.org")[/code] opens the default web browser on the official Godot website. - - [code]OS.shell_open("mailto:example@example.com")[/code] opens the default email client with the "To" field set to [code]example@example.com[/code]. See [url=https://blog.escapecreative.com/customizing-mailto-links/]Customizing [code]mailto:[/code] Links[/url] for a list of fields that can be added. + - [code]OS.shell_open("mailto:example@example.com")[/code] opens the default email client with the "To" field set to [code]example@example.com[/code]. See [url=https://datatracker.ietf.org/doc/html/rfc2368]RFC 2368 - The [code]mailto[/code] URL scheme[/url] for a list of fields that can be added. Use [method ProjectSettings.globalize_path] to convert a [code]res://[/code] or [code]user://[/code] path into a system path for use with this method. [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS and Windows. diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml index 6bc274d5beb..edfd42f747f 100644 --- a/doc/classes/Range.xml +++ b/doc/classes/Range.xml @@ -4,7 +4,7 @@ Abstract base class for range-based controls. - Range is a base class for [Control] nodes that change a floating-point [i]value[/i] between a [i]minimum[/i] and a [i]maximum[/i], using [i]step[/i] and [i]page[/i], for example a [ScrollBar]. + Range is a base class for [Control] nodes that change a floating-point [member value] between a [member min_value] and [member max_value], using a configured [member step] and [member page] size. See e.g. [ScrollBar] and [Slider] for examples of higher level nodes using Range. diff --git a/doc/classes/SceneTreeTimer.xml b/doc/classes/SceneTreeTimer.xml index 5ab09aab2e1..f87bb41a9fb 100644 --- a/doc/classes/SceneTreeTimer.xml +++ b/doc/classes/SceneTreeTimer.xml @@ -12,7 +12,7 @@ yield(get_tree().create_timer(1.0), "timeout") print("Timer ended.") [/codeblock] - The timer will be automatically freed after its time elapses. + The timer will be automatically freed after its time elapses, so be aware that any reference you might have kept to it will become invalid. diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index 0c2527b1f60..2d941405005 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -2915,7 +2915,7 @@ get_viewport().set_attach_to_screen_rect(Rect2()) $Viewport.set_attach_to_screen_rect(Rect2(0, 0, 600, 600)) [/codeblock] - Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For a further optimization see, [method viewport_set_render_direct_to_screen]. + Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For further optimization, see [method viewport_set_render_direct_to_screen]. diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp index 0c835ba148a..206167cc737 100644 --- a/editor/animation_bezier_editor.cpp +++ b/editor/animation_bezier_editor.cpp @@ -220,6 +220,7 @@ void AnimationBezierTrackEdit::_notification(int p_what) { bezier_handle_icon = get_icon("KeyBezierHandle", "EditorIcons"); selected_icon = get_icon("KeyBezierSelected", "EditorIcons"); if (handle_mode_option->get_item_count() == 0) { + // TRANSLATORS: Adjective, refers to the mode for Bezier handles (Free, Balanced, Mirror). handle_mode_option->add_icon_item(get_icon("BezierHandlesFree", "EditorIcons"), TTR("Free"), HANDLE_MODE_FREE); handle_mode_option->add_icon_item(get_icon("BezierHandlesBalanced", "EditorIcons"), TTR("Balanced"), HANDLE_MODE_BALANCED); handle_mode_option->add_icon_item(get_icon("BezierHandlesMirror", "EditorIcons"), TTR("Mirror"), HANDLE_MODE_MIRROR); diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index b54f8e7c48c..ea7c6763ca1 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -2495,30 +2495,29 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const { } if (key_idx != -1) { - String text = TTR("Time (s): ") + rtos(animation->track_get_key_time(track, key_idx)) + "\n"; + String text = TTR("Time (s):") + " " + rtos(animation->track_get_key_time(track, key_idx)) + "\n"; switch (animation->track_get_type(track)) { case Animation::TYPE_TRANSFORM: { Dictionary d = animation->track_get_key_value(track, key_idx); if (d.has("location")) { - text += "Pos: " + String(d["location"]) + "\n"; + text += TTR("Position:") + " " + String(d["location"]) + "\n"; } if (d.has("rotation")) { - text += "Rot: " + String(d["rotation"]) + "\n"; + text += TTR("Rotation:") + " " + String(d["rotation"]) + "\n"; } if (d.has("scale")) { - text += "Scale: " + String(d["scale"]) + "\n"; + text += TTR("Scale:") + " " + String(d["scale"]) + "\n"; } } break; case Animation::TYPE_VALUE: { const Variant &v = animation->track_get_key_value(track, key_idx); - text += "Type: " + Variant::get_type_name(v.get_type()) + "\n"; + text += TTR("Type:") + " " + Variant::get_type_name(v.get_type()) + "\n"; Variant::Type valid_type = Variant::NIL; + text += TTR("Value:") + " " + String(v); if (!_is_value_key_valid(v, valid_type)) { - text += "Value: " + String(v) + " (Invalid, expected type: " + Variant::get_type_name(valid_type) + ")\n"; - } else { - text += "Value: " + String(v) + "\n"; + text += " " + vformat(TTR("(Invalid, expected type: %s)"), Variant::get_type_name(valid_type)); } - text += "Easing: " + rtos(animation->track_get_key_transition(track, key_idx)); + text += "\n" + TTR("Easing:") + " " + rtos(animation->track_get_key_transition(track, key_idx)); } break; case Animation::TYPE_METHOD: { @@ -2542,11 +2541,11 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const { } break; case Animation::TYPE_BEZIER: { float h = animation->bezier_track_get_key_value(track, key_idx); - text += "Value: " + rtos(h) + "\n"; + text += TTR("Value:") + " " + rtos(h) + "\n"; Vector2 ih = animation->bezier_track_get_key_in_handle(track, key_idx); - text += "In-Handle: " + ih + "\n"; + text += TTR("In-Handle:") + " " + ih + "\n"; Vector2 oh = animation->bezier_track_get_key_out_handle(track, key_idx); - text += "Out-Handle: " + oh + "\n"; + text += TTR("Out-Handle:") + " " + oh + "\n"; } break; case Animation::TYPE_AUDIO: { String stream_name = "null"; @@ -2561,15 +2560,15 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const { } } - text += "Stream: " + stream_name + "\n"; + text += TTR("Stream:") + " " + stream_name + "\n"; float so = animation->audio_track_get_key_start_offset(track, key_idx); - text += "Start (s): " + rtos(so) + "\n"; + text += TTR("Start (s):") + " " + rtos(so) + "\n"; float eo = animation->audio_track_get_key_end_offset(track, key_idx); - text += "End (s): " + rtos(eo) + "\n"; + text += TTR("End (s):") + " " + rtos(eo) + "\n"; } break; case Animation::TYPE_ANIMATION: { String name = animation->animation_track_get_key_animation(track, key_idx); - text += "Animation Clip: " + name + "\n"; + text += TTR("Animation Clip:") + " " + name + "\n"; } break; } return text; @@ -4736,7 +4735,7 @@ void AnimationTrackEditor::_add_method_key(const String &p_method) { } } - EditorNode::get_singleton()->show_warning(TTR("Method not found in object: ") + p_method); + EditorNode::get_singleton()->show_warning(TTR("Method not found in object:") + " " + p_method); } void AnimationTrackEditor::_key_selected(int p_key, bool p_single, int p_track) { diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp index 3b8b3d92df0..87b3b2a4dc0 100644 --- a/editor/editor_audio_buses.cpp +++ b/editor/editor_audio_buses.cpp @@ -1217,7 +1217,7 @@ void EditorAudioBuses::_load_default_layout() { } edited_path = layout_path; - file->set_text(String(TTR("Layout")) + ": " + layout_path.get_file()); + file->set_text(String(TTR("Layout:")) + " " + layout_path.get_file()); AudioServer::get_singleton()->set_bus_layout(state); _update_buses(); EditorNode::get_singleton()->get_undo_redo()->clear_history(); @@ -1233,7 +1233,7 @@ void EditorAudioBuses::_file_dialog_callback(const String &p_string) { } edited_path = p_string; - file->set_text(String(TTR("Layout")) + ": " + p_string.get_file()); + file->set_text(String(TTR("Layout:")) + " " + p_string.get_file()); AudioServer::get_singleton()->set_bus_layout(state); _update_buses(); EditorNode::get_singleton()->get_undo_redo()->clear_history(); @@ -1254,7 +1254,7 @@ void EditorAudioBuses::_file_dialog_callback(const String &p_string) { } edited_path = p_string; - file->set_text(String(TTR("Layout")) + ": " + p_string.get_file()); + file->set_text(String(TTR("Layout:")) + " " + p_string.get_file()); _update_buses(); EditorNode::get_singleton()->get_undo_redo()->clear_history(); call_deferred("_select_layout"); @@ -1288,7 +1288,7 @@ EditorAudioBuses::EditorAudioBuses() { file = memnew(Label); String layout_path = ProjectSettings::get_singleton()->get("audio/default_bus_layout"); - file->set_text(String(TTR("Layout")) + ": " + layout_path.get_file()); + file->set_text(String(TTR("Layout:")) + " " + layout_path.get_file()); file->set_clip_text(true); file->set_h_size_flags(SIZE_EXPAND_FILL); top_hb->add_child(file); diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp index bf5f952902b..b40c94d62ca 100644 --- a/editor/editor_properties_array_dict.cpp +++ b/editor/editor_properties_array_dict.cpp @@ -280,7 +280,7 @@ void EditorPropertyArray::update_property() { HBoxContainer *hbox = memnew(HBoxContainer); vbox->add_child(hbox); - Label *label = memnew(Label(TTR("Size: "))); + Label *label = memnew(Label(TTR("Size:"))); label->set_h_size_flags(SIZE_EXPAND_FILL); hbox->add_child(label); @@ -294,7 +294,7 @@ void EditorPropertyArray::update_property() { page_hbox = memnew(HBoxContainer); vbox->add_child(page_hbox); - label = memnew(Label(TTR("Page: "))); + label = memnew(Label(TTR("Page:"))); label->set_h_size_flags(SIZE_EXPAND_FILL); page_hbox->add_child(label); @@ -850,7 +850,7 @@ void EditorPropertyDictionary::update_property() { page_hbox = memnew(HBoxContainer); vbox->add_child(page_hbox); - Label *label = memnew(Label(TTR("Page: "))); + Label *label = memnew(Label(TTR("Page:"))); label->set_h_size_flags(SIZE_EXPAND_FILL); page_hbox->add_child(label); page_slider = memnew(EditorSpinSlider); diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 186f19bcf70..d9298f00fca 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -665,6 +665,7 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { /* Extra config */ + // TRANSLATORS: Project Manager here refers to the tool used to create/manage Godot projects. _initial_set("project_manager/sorting_order", 0); hints["project_manager/sorting_order"] = PropertyInfo(Variant::INT, "project_manager/sorting_order", PROPERTY_HINT_ENUM, "Name,Path,Last Modified"); diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index 0c594f87808..16870dd6756 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -578,7 +578,7 @@ FindInFilesPanel::FindInFilesPanel() { HBoxContainer *hbc = memnew(HBoxContainer); Label *find_label = memnew(Label); - find_label->set_text(TTR("Find: ")); + find_label->set_text(TTR("Find:")); hbc->add_child(find_label); _search_text_label = memnew(Label); @@ -626,7 +626,7 @@ FindInFilesPanel::FindInFilesPanel() { _replace_container = memnew(HBoxContainer); Label *replace_label = memnew(Label); - replace_label->set_text(TTR("Replace: ")); + replace_label->set_text(TTR("Replace:")); _replace_container->add_child(replace_label); _replace_line_edit = memnew(LineEdit); diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 39f0f2fc42e..31b3ee36dbb 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -1427,7 +1427,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p name = "Mesh " + itos(step); } - progress2.step(TTR("Generating for Mesh: ") + name + " (" + itos(step) + "/" + itos(meshes.size()) + ")", step); + progress2.step(TTR("Generating for Mesh:") + " " + name + " (" + itos(step) + "/" + itos(meshes.size()) + ")", step); int *ret_cache_data = cache_data; unsigned int ret_cache_size = cache_size; diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 1566eb51e58..c716738c5d0 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -1669,8 +1669,10 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay onion_skinning = memnew(MenuButton); onion_skinning->set_tooltip(TTR("Onion Skinning Options")); onion_skinning->get_popup()->add_separator(TTR("Directions")); + // TRANSLATORS: Opposite of "Future", refers to a direction in animation onion skinning. onion_skinning->get_popup()->add_check_item(TTR("Past"), ONION_SKINNING_PAST); onion_skinning->get_popup()->set_item_checked(onion_skinning->get_popup()->get_item_count() - 1, true); + // TRANSLATORS: Opposite of "Past", refers to a direction in animation onion skinning. onion_skinning->get_popup()->add_check_item(TTR("Future"), ONION_SKINNING_FUTURE); onion_skinning->get_popup()->add_separator(TTR("Depth")); onion_skinning->get_popup()->add_radio_check_item(TTR("1 step"), ONION_SKINNING_1_STEP); diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index 27b720781da..659073a943f 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -1282,7 +1282,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() { tool_end->set_disabled(true); top_hb->add_child(memnew(VSeparator)); - top_hb->add_child(memnew(Label(TTR("Transition: ")))); + top_hb->add_child(memnew(Label(TTR("Transition:")))); transition_mode = memnew(OptionButton); top_hb->add_child(transition_mode); diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index e30ecd9e182..083b51f309e 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -6126,6 +6126,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) { hb->add_child(memnew(VSeparator)); view_menu = memnew(MenuButton); + // TRANSLATORS: Noun, name of the 2D/3D View menus. view_menu->set_text(TTR("View")); hb->add_child(view_menu); view_menu->get_popup()->connect("id_pressed", this, "_popup_callback"); diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp index c58fe6bd273..6d0ddc9402a 100644 --- a/editor/plugins/particles_editor_plugin.cpp +++ b/editor/plugins/particles_editor_plugin.cpp @@ -215,7 +215,7 @@ ParticlesEditorBase::ParticlesEditorBase() { emission_fill->add_item(TTR("Surface Points")); emission_fill->add_item(TTR("Surface Points+Normal (Directed)")); emission_fill->add_item(TTR("Volume")); - emd_vb->add_margin_child(TTR("Emission Source: "), emission_fill); + emd_vb->add_margin_child(TTR("Emission Source:"), emission_fill); emission_dialog->get_ok()->set_text(TTR("Create")); emission_dialog->connect("confirmed", this, "_generate_emission_points"); diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp index 3a01c62e76e..c6aa500d890 100644 --- a/editor/plugins/resource_preloader_editor_plugin.cpp +++ b/editor/plugins/resource_preloader_editor_plugin.cpp @@ -423,11 +423,8 @@ ResourcePreloaderEditorPlugin::ResourcePreloaderEditorPlugin(EditorNode *p_node) preloader_editor = memnew(ResourcePreloaderEditor); preloader_editor->set_custom_minimum_size(Size2(0, 250) * EDSCALE); - button = editor->add_bottom_panel_item(TTR("ResourcePreloader"), preloader_editor); + button = editor->add_bottom_panel_item("ResourcePreloader", preloader_editor); button->hide(); - - //preloader_editor->set_anchor( MARGIN_TOP, Control::ANCHOR_END); - //preloader_editor->set_margin( MARGIN_TOP, 120 ); } ResourcePreloaderEditorPlugin::~ResourcePreloaderEditorPlugin() { diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 9943af0a08e..ee43dcaddbf 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -1630,7 +1630,8 @@ void SpatialEditorViewport::_sinput(const Ref &p_event) { Vector3 motion_snapped = motion; motion_snapped.snap(Vector3(snap, snap, snap)); // This might not be necessary anymore after issue #288 is solved (in 4.0?). - set_message(TTR("Scaling: ") + "(" + String::num(motion_snapped.x, snap_step_decimals) + ", " + + // TRANSLATORS: Refers to changing the scale of a node in the 3D editor. + set_message(TTR("Scaling:") + " (" + String::num(motion_snapped.x, snap_step_decimals) + ", " + String::num(motion_snapped.y, snap_step_decimals) + ", " + String::num(motion_snapped.z, snap_step_decimals) + ")"); for (List::Element *E = selection.front(); E; E = E->next()) { @@ -1752,7 +1753,8 @@ void SpatialEditorViewport::_sinput(const Ref &p_event) { } Vector3 motion_snapped = motion; motion_snapped.snap(Vector3(snap, snap, snap)); - set_message(TTR("Translating: ") + "(" + String::num(motion_snapped.x, snap_step_decimals) + ", " + + // TRANSLATORS: Refers to changing the position of a node in the 3D editor. + set_message(TTR("Translating:") + " (" + String::num(motion_snapped.x, snap_step_decimals) + ", " + String::num(motion_snapped.y, snap_step_decimals) + ", " + String::num(motion_snapped.z, snap_step_decimals) + ")"); for (List::Element *E = selection.front(); E; E = E->next()) { @@ -6737,6 +6739,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { p->connect("id_pressed", this, "_menu_item_pressed"); view_menu = memnew(MenuButton); + // TRANSLATORS: Noun, name of the 2D/3D View menus. view_menu->set_text(TTR("View")); view_menu->set_switch_on_hover(true); hbc_menu->add_child(view_menu); diff --git a/editor/plugins/sprite_editor_plugin.cpp b/editor/plugins/sprite_editor_plugin.cpp index 0bab52f886e..d751ff54161 100644 --- a/editor/plugins/sprite_editor_plugin.cpp +++ b/editor/plugins/sprite_editor_plugin.cpp @@ -538,7 +538,7 @@ SpriteEditor::SpriteEditor() { debug_uv_dialog->connect("confirmed", this, "_create_node"); HBoxContainer *hb = memnew(HBoxContainer); - hb->add_child(memnew(Label(TTR("Simplification: ")))); + hb->add_child(memnew(Label(TTR("Simplification:")))); simplification = memnew(SpinBox); simplification->set_min(0.01); simplification->set_max(10.00); @@ -546,7 +546,7 @@ SpriteEditor::SpriteEditor() { simplification->set_value(2); hb->add_child(simplification); hb->add_spacer(); - hb->add_child(memnew(Label(TTR("Shrink (Pixels): ")))); + hb->add_child(memnew(Label(TTR("Shrink (Pixels):")))); shrink_pixels = memnew(SpinBox); shrink_pixels->set_min(0); shrink_pixels->set_max(10); @@ -554,7 +554,7 @@ SpriteEditor::SpriteEditor() { shrink_pixels->set_value(0); hb->add_child(shrink_pixels); hb->add_spacer(); - hb->add_child(memnew(Label(TTR("Grow (Pixels): ")))); + hb->add_child(memnew(Label(TTR("Grow (Pixels):")))); grow_pixels = memnew(SpinBox); grow_pixels->set_min(0); grow_pixels->set_max(10); diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index ec369b7e312..6edd944ecfd 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -175,7 +175,7 @@ public: String get_title() { if (remote_object_id) { - return TTR("Remote ") + String(type_name) + ": " + itos(remote_object_id); + return vformat(TTR("Remote %s:"), String(type_name)) + " " + itos(remote_object_id); } else { return ""; } diff --git a/modules/gdnative/gdnative_library_singleton_editor.cpp b/modules/gdnative/gdnative_library_singleton_editor.cpp index 8145e31495f..a9d51f5ceb3 100644 --- a/modules/gdnative/gdnative_library_singleton_editor.cpp +++ b/modules/gdnative/gdnative_library_singleton_editor.cpp @@ -203,7 +203,7 @@ GDNativeLibrarySingletonEditor::GDNativeLibrarySingletonEditor() { libraries->set_column_title(0, TTR("Library")); libraries->set_column_title(1, TTR("Status")); libraries->set_hide_root(true); - add_margin_child(TTR("Libraries: "), libraries, true); + add_margin_child(TTR("Libraries:"), libraries, true); updating = false; libraries->connect("item_edited", this, "_item_edited"); EditorFileSystem::get_singleton()->connect("filesystem_changed", this, "_discover_singletons"); diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index 1a2f8458fe8..3ff1c47f307 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -1690,7 +1690,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p //if no exit bit was set, and has sequence outputs, guess next node if (output >= node->sequence_output_count) { r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; - error_str = RTR("Node returned an invalid sequence output: ") + itos(output); + error_str = RTR("Node returned an invalid sequence output:") + " " + itos(output); error = true; break; } @@ -1760,7 +1760,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p // check for stack overflow if (flow_stack_pos + 1 >= flow_max) { r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; - error_str = RTR("Stack overflow with stack depth: ") + itos(output); + error_str = RTR("Stack overflow with stack depth:") + " " + itos(output); error = true; break; } diff --git a/modules/visual_script/visual_script_flow_control.cpp b/modules/visual_script/visual_script_flow_control.cpp index eb7681f80a6..af946b74f9a 100644 --- a/modules/visual_script/visual_script_flow_control.cpp +++ b/modules/visual_script/visual_script_flow_control.cpp @@ -381,7 +381,7 @@ public: if (!valid) { r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; - r_error_str = RTR("Input type not iterable: ") + Variant::get_type_name(p_inputs[0]->get_type()); + r_error_str = RTR("Input type not iterable:") + " " + Variant::get_type_name(p_inputs[0]->get_type()); return 0; } @@ -404,7 +404,7 @@ public: if (!valid) { r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; - r_error_str = RTR("Iterator became invalid: ") + Variant::get_type_name(p_inputs[0]->get_type()); + r_error_str = RTR("Iterator became invalid:") + " " + Variant::get_type_name(p_inputs[0]->get_type()); return 0; } diff --git a/modules/visual_script/visual_script_nodes.cpp b/modules/visual_script/visual_script_nodes.cpp index 3515012460c..2c1fd91985b 100644 --- a/modules/visual_script/visual_script_nodes.cpp +++ b/modules/visual_script/visual_script_nodes.cpp @@ -1011,9 +1011,9 @@ public: r_error_str = *p_outputs[0]; } else { if (unary) { - r_error_str = String(op_names[op]) + RTR(": Invalid argument of type: ") + Variant::get_type_name(p_inputs[0]->get_type()); + r_error_str = String(op_names[op]) + ": " + RTR("Invalid argument of type:") + " " + Variant::get_type_name(p_inputs[0]->get_type()); } else { - r_error_str = String(op_names[op]) + RTR(": Invalid arguments: ") + "A: " + Variant::get_type_name(p_inputs[0]->get_type()) + " B: " + Variant::get_type_name(p_inputs[1]->get_type()); + r_error_str = String(op_names[op]) + ": " + RTR("Invalid arguments:") + " A: " + Variant::get_type_name(p_inputs[0]->get_type()) + ", B: " + Variant::get_type_name(p_inputs[1]->get_type()); } } } @@ -1226,7 +1226,7 @@ public: virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { if (!instance->get_variable(variable, p_outputs[0])) { r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; - r_error_str = RTR("VariableGet not found in script: ") + "'" + String(variable) + "'"; + r_error_str = RTR("VariableGet not found in script:") + " '" + String(variable) + "'"; return 0; } return 0; @@ -1336,7 +1336,7 @@ public: virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Variant::CallError &r_error, String &r_error_str) { if (!instance->set_variable(variable, *p_inputs[0])) { r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; - r_error_str = RTR("VariableSet not found in script: ") + "'" + String(variable) + "'"; + r_error_str = RTR("VariableSet not found in script:") + " '" + String(variable) + "'"; } return 0;