Merge pull request #61802 from akien-mga/3.x-i18n-fixes

This commit is contained in:
Rémi Verschelde 2022-06-08 13:14:50 +02:00 committed by GitHub
commit 1af8d952ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 70 additions and 66 deletions

View file

@ -1946,7 +1946,7 @@ bool Expression::_execute(const Array &p_inputs, Object *p_instance, Expression:
case Expression::ENode::TYPE_INPUT: { case Expression::ENode::TYPE_INPUT: {
const Expression::InputNode *in = static_cast<const Expression::InputNode *>(p_node); const Expression::InputNode *in = static_cast<const Expression::InputNode *>(p_node);
if (in->index < 0 || in->index >= p_inputs.size()) { 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; return true;
} }
r_ret = p_inputs[in->index]; r_ret = p_inputs[in->index];

View file

@ -36,7 +36,7 @@
<description> <description>
Constructs a color from a 32-bit integer in RGBA format (each byte represents a color channel). Constructs a color from a 32-bit integer in RGBA format (each byte represents a color channel).
[codeblock] [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] [/codeblock]
</description> </description>
</method> </method>
@ -82,8 +82,8 @@
<description> <description>
Returns the most contrasting color. Returns the most contrasting color.
[codeblock] [codeblock]
var c = Color(0.3, 0.4, 0.9) var color = Color(0.3, 0.4, 0.9)
var contrasted_color = c.contrasted() # Equivalent to RGBA(204, 229, 102, 255) var contrasted_color = color.contrasted() # Equivalent to RGBA(204, 229, 102, 255)
[/codeblock] [/codeblock]
</description> </description>
</method> </method>
@ -107,7 +107,7 @@
<description> <description>
Constructs a color from an HSV profile. [code]h[/code], [code]s[/code], and [code]v[/code] are values between 0 and 1. Constructs a color from an HSV profile. [code]h[/code], [code]s[/code], and [code]v[/code] are values between 0 and 1.
[codeblock] [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] [/codeblock]
</description> </description>
</method> </method>
@ -124,8 +124,8 @@
Returns the color's grayscale representation. Returns the color's grayscale representation.
The gray value is calculated as [code](r + g + b) / 3[/code]. The gray value is calculated as [code](r + g + b) / 3[/code].
[codeblock] [codeblock]
var c = Color(0.2, 0.45, 0.82) var color = Color(0.2, 0.45, 0.82)
var gray = c.gray() # A value of 0.466667 var gray = color.gray() # A value of 0.466667
[/codeblock] [/codeblock]
</description> </description>
</method> </method>
@ -217,9 +217,9 @@
Returns the color's HTML hexadecimal color string in ARGB format (ex: [code]ff34f822[/code]). 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. Setting [code]with_alpha[/code] to [code]false[/code] excludes alpha from the hexadecimal string.
[codeblock] [codeblock]
var c = Color(1, 1, 1, 0.5) var color = Color(1, 1, 1, 0.5)
var s1 = c.to_html() # Returns "7fffffff" var s1 = color.to_html() # Returns "7fffffff"
var s2 = c.to_html(false) # Returns "ffffff" var s2 = color.to_html(false) # Returns "ffffff"
[/codeblock] [/codeblock]
</description> </description>
</method> </method>

View file

@ -302,7 +302,7 @@
<method name="get_script_create_dialog"> <method name="get_script_create_dialog">
<return type="ScriptCreateDialog" /> <return type="ScriptCreateDialog" />
<description> <description>
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]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. [b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.
</description> </description>

View file

@ -379,10 +379,10 @@
Low quality for the screen-space ambient occlusion effect (fastest). Low quality for the screen-space ambient occlusion effect (fastest).
</constant> </constant>
<constant name="SSAO_QUALITY_MEDIUM" value="1" enum="SSAOQuality"> <constant name="SSAO_QUALITY_MEDIUM" value="1" enum="SSAOQuality">
Low quality for the screen-space ambient occlusion effect. Medium quality for the screen-space ambient occlusion effect.
</constant> </constant>
<constant name="SSAO_QUALITY_HIGH" value="2" enum="SSAOQuality"> <constant name="SSAO_QUALITY_HIGH" value="2" enum="SSAOQuality">
Low quality for the screen-space ambient occlusion effect (slowest). High quality for the screen-space ambient occlusion effect (slowest).
</constant> </constant>
</constants> </constants>
</class> </class>

View file

@ -76,7 +76,7 @@
<return type="String" /> <return type="String" />
<argument index="0" name="idx" type="int" /> <argument index="0" name="idx" type="int" />
<description> <description>
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] [codeblock]
var node_path = NodePath("Path2D/PathFollow2D/Sprite") var node_path = NodePath("Path2D/PathFollow2D/Sprite")
print(node_path.get_name(0)) # Path2D print(node_path.get_name(0)) # Path2D

View file

@ -995,7 +995,7 @@
Requests the OS to open a resource with the most appropriate program. For example: 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("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("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. 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. [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS and Windows.
</description> </description>

View file

@ -4,7 +4,7 @@
Abstract base class for range-based controls. Abstract base class for range-based controls.
</brief_description> </brief_description>
<description> <description>
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.
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>

View file

@ -12,7 +12,7 @@
yield(get_tree().create_timer(1.0), "timeout") yield(get_tree().create_timer(1.0), "timeout")
print("Timer ended.") print("Timer ended.")
[/codeblock] [/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.
</description> </description>
<tutorials> <tutorials>
</tutorials> </tutorials>

View file

@ -2915,7 +2915,7 @@
get_viewport().set_attach_to_screen_rect(Rect2()) get_viewport().set_attach_to_screen_rect(Rect2())
$Viewport.set_attach_to_screen_rect(Rect2(0, 0, 600, 600)) $Viewport.set_attach_to_screen_rect(Rect2(0, 0, 600, 600))
[/codeblock] [/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].
</description> </description>
</method> </method>
<method name="viewport_create"> <method name="viewport_create">

View file

@ -220,6 +220,7 @@ void AnimationBezierTrackEdit::_notification(int p_what) {
bezier_handle_icon = get_icon("KeyBezierHandle", "EditorIcons"); bezier_handle_icon = get_icon("KeyBezierHandle", "EditorIcons");
selected_icon = get_icon("KeyBezierSelected", "EditorIcons"); selected_icon = get_icon("KeyBezierSelected", "EditorIcons");
if (handle_mode_option->get_item_count() == 0) { 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("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("BezierHandlesBalanced", "EditorIcons"), TTR("Balanced"), HANDLE_MODE_BALANCED);
handle_mode_option->add_icon_item(get_icon("BezierHandlesMirror", "EditorIcons"), TTR("Mirror"), HANDLE_MODE_MIRROR); handle_mode_option->add_icon_item(get_icon("BezierHandlesMirror", "EditorIcons"), TTR("Mirror"), HANDLE_MODE_MIRROR);

View file

@ -2495,30 +2495,29 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const {
} }
if (key_idx != -1) { 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)) { switch (animation->track_get_type(track)) {
case Animation::TYPE_TRANSFORM: { case Animation::TYPE_TRANSFORM: {
Dictionary d = animation->track_get_key_value(track, key_idx); Dictionary d = animation->track_get_key_value(track, key_idx);
if (d.has("location")) { if (d.has("location")) {
text += "Pos: " + String(d["location"]) + "\n"; text += TTR("Position:") + " " + String(d["location"]) + "\n";
} }
if (d.has("rotation")) { if (d.has("rotation")) {
text += "Rot: " + String(d["rotation"]) + "\n"; text += TTR("Rotation:") + " " + String(d["rotation"]) + "\n";
} }
if (d.has("scale")) { if (d.has("scale")) {
text += "Scale: " + String(d["scale"]) + "\n"; text += TTR("Scale:") + " " + String(d["scale"]) + "\n";
} }
} break; } break;
case Animation::TYPE_VALUE: { case Animation::TYPE_VALUE: {
const Variant &v = animation->track_get_key_value(track, key_idx); 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; Variant::Type valid_type = Variant::NIL;
text += TTR("Value:") + " " + String(v);
if (!_is_value_key_valid(v, valid_type)) { if (!_is_value_key_valid(v, valid_type)) {
text += "Value: " + String(v) + " (Invalid, expected type: " + Variant::get_type_name(valid_type) + ")\n"; text += " " + vformat(TTR("(Invalid, expected type: %s)"), Variant::get_type_name(valid_type));
} else {
text += "Value: " + String(v) + "\n";
} }
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; } break;
case Animation::TYPE_METHOD: { case Animation::TYPE_METHOD: {
@ -2542,11 +2541,11 @@ String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const {
} break; } break;
case Animation::TYPE_BEZIER: { case Animation::TYPE_BEZIER: {
float h = animation->bezier_track_get_key_value(track, key_idx); 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); 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); Vector2 oh = animation->bezier_track_get_key_out_handle(track, key_idx);
text += "Out-Handle: " + oh + "\n"; text += TTR("Out-Handle:") + " " + oh + "\n";
} break; } break;
case Animation::TYPE_AUDIO: { case Animation::TYPE_AUDIO: {
String stream_name = "null"; 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); 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); 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; } break;
case Animation::TYPE_ANIMATION: { case Animation::TYPE_ANIMATION: {
String name = animation->animation_track_get_key_animation(track, key_idx); String name = animation->animation_track_get_key_animation(track, key_idx);
text += "Animation Clip: " + name + "\n"; text += TTR("Animation Clip:") + " " + name + "\n";
} break; } break;
} }
return text; 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) { void AnimationTrackEditor::_key_selected(int p_key, bool p_single, int p_track) {

View file

@ -1217,7 +1217,7 @@ void EditorAudioBuses::_load_default_layout() {
} }
edited_path = layout_path; 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); AudioServer::get_singleton()->set_bus_layout(state);
_update_buses(); _update_buses();
EditorNode::get_singleton()->get_undo_redo()->clear_history(); 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; 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); AudioServer::get_singleton()->set_bus_layout(state);
_update_buses(); _update_buses();
EditorNode::get_singleton()->get_undo_redo()->clear_history(); 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; 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(); _update_buses();
EditorNode::get_singleton()->get_undo_redo()->clear_history(); EditorNode::get_singleton()->get_undo_redo()->clear_history();
call_deferred("_select_layout"); call_deferred("_select_layout");
@ -1288,7 +1288,7 @@ EditorAudioBuses::EditorAudioBuses() {
file = memnew(Label); file = memnew(Label);
String layout_path = ProjectSettings::get_singleton()->get("audio/default_bus_layout"); 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_clip_text(true);
file->set_h_size_flags(SIZE_EXPAND_FILL); file->set_h_size_flags(SIZE_EXPAND_FILL);
top_hb->add_child(file); top_hb->add_child(file);

View file

@ -665,6 +665,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
/* 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); _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"); hints["project_manager/sorting_order"] = PropertyInfo(Variant::INT, "project_manager/sorting_order", PROPERTY_HINT_ENUM, "Name,Path,Last Modified");

View file

@ -1427,7 +1427,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
name = "Mesh " + itos(step); 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; int *ret_cache_data = cache_data;
unsigned int ret_cache_size = cache_size; unsigned int ret_cache_size = cache_size;

View file

@ -1669,8 +1669,10 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor, AnimationPlay
onion_skinning = memnew(MenuButton); onion_skinning = memnew(MenuButton);
onion_skinning->set_tooltip(TTR("Onion Skinning Options")); onion_skinning->set_tooltip(TTR("Onion Skinning Options"));
onion_skinning->get_popup()->add_separator(TTR("Directions")); 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()->add_check_item(TTR("Past"), ONION_SKINNING_PAST);
onion_skinning->get_popup()->set_item_checked(onion_skinning->get_popup()->get_item_count() - 1, true); 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_check_item(TTR("Future"), ONION_SKINNING_FUTURE);
onion_skinning->get_popup()->add_separator(TTR("Depth")); onion_skinning->get_popup()->add_separator(TTR("Depth"));
onion_skinning->get_popup()->add_radio_check_item(TTR("1 step"), ONION_SKINNING_1_STEP); onion_skinning->get_popup()->add_radio_check_item(TTR("1 step"), ONION_SKINNING_1_STEP);

View file

@ -6126,6 +6126,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
hb->add_child(memnew(VSeparator)); hb->add_child(memnew(VSeparator));
view_menu = memnew(MenuButton); view_menu = memnew(MenuButton);
// TRANSLATORS: Noun, name of the 2D/3D View menus.
view_menu->set_text(TTR("View")); view_menu->set_text(TTR("View"));
hb->add_child(view_menu); hb->add_child(view_menu);
view_menu->get_popup()->connect("id_pressed", this, "_popup_callback"); view_menu->get_popup()->connect("id_pressed", this, "_popup_callback");

View file

@ -423,11 +423,8 @@ ResourcePreloaderEditorPlugin::ResourcePreloaderEditorPlugin(EditorNode *p_node)
preloader_editor = memnew(ResourcePreloaderEditor); preloader_editor = memnew(ResourcePreloaderEditor);
preloader_editor->set_custom_minimum_size(Size2(0, 250) * EDSCALE); 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(); button->hide();
//preloader_editor->set_anchor( MARGIN_TOP, Control::ANCHOR_END);
//preloader_editor->set_margin( MARGIN_TOP, 120 );
} }
ResourcePreloaderEditorPlugin::~ResourcePreloaderEditorPlugin() { ResourcePreloaderEditorPlugin::~ResourcePreloaderEditorPlugin() {

View file

@ -1630,6 +1630,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
Vector3 motion_snapped = motion; Vector3 motion_snapped = motion;
motion_snapped.snap(Vector3(snap, snap, snap)); motion_snapped.snap(Vector3(snap, snap, snap));
// This might not be necessary anymore after issue #288 is solved (in 4.0?). // This might not be necessary anymore after issue #288 is solved (in 4.0?).
// 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) + ", " + 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) + ")"); String::num(motion_snapped.y, snap_step_decimals) + ", " + String::num(motion_snapped.z, snap_step_decimals) + ")");
@ -1752,6 +1753,7 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
} }
Vector3 motion_snapped = motion; Vector3 motion_snapped = motion;
motion_snapped.snap(Vector3(snap, snap, snap)); motion_snapped.snap(Vector3(snap, snap, snap));
// 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) + ", " + 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) + ")"); String::num(motion_snapped.y, snap_step_decimals) + ", " + String::num(motion_snapped.z, snap_step_decimals) + ")");
@ -6737,6 +6739,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
p->connect("id_pressed", this, "_menu_item_pressed"); p->connect("id_pressed", this, "_menu_item_pressed");
view_menu = memnew(MenuButton); view_menu = memnew(MenuButton);
// TRANSLATORS: Noun, name of the 2D/3D View menus.
view_menu->set_text(TTR("View")); view_menu->set_text(TTR("View"));
view_menu->set_switch_on_hover(true); view_menu->set_switch_on_hover(true);
hbc_menu->add_child(view_menu); hbc_menu->add_child(view_menu);

View file

@ -175,7 +175,7 @@ public:
String get_title() { String get_title() {
if (remote_object_id) { 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 { } else {
return "<null>"; return "<null>";
} }

View file

@ -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 no exit bit was set, and has sequence outputs, guess next node
if (output >= node->sequence_output_count) { if (output >= node->sequence_output_count) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; 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; error = true;
break; break;
} }
@ -1760,7 +1760,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
// check for stack overflow // check for stack overflow
if (flow_stack_pos + 1 >= flow_max) { if (flow_stack_pos + 1 >= flow_max) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; 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; error = true;
break; break;
} }

View file

@ -381,7 +381,7 @@ public:
if (!valid) { if (!valid) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; 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; return 0;
} }
@ -404,7 +404,7 @@ public:
if (!valid) { if (!valid) {
r_error.error = Variant::CallError::CALL_ERROR_INVALID_METHOD; 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; return 0;
} }

View file

@ -1011,9 +1011,9 @@ public:
r_error_str = *p_outputs[0]; r_error_str = *p_outputs[0];
} else { } else {
if (unary) { 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 { } 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());
} }
} }
} }