1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-23 15:16:17 +00:00

i18n: Misc fixes translation strings

Adds some translator comments to solve some questions raised on Weblate.
This commit is contained in:
Rémi Verschelde
2022-06-08 11:42:51 +02:00
parent 43f05bd6a0
commit c8ce7e34e2
29 changed files with 73 additions and 72 deletions

View File

@@ -2619,34 +2619,33 @@ 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_POSITION_3D: {
Vector3 t = animation->track_get_key_value(track, key_idx);
text += "Position: " + String(t) + "\n";
text += TTR("Position:") + " " + String(t) + "\n";
} break;
case Animation::TYPE_ROTATION_3D: {
Quaternion t = animation->track_get_key_value(track, key_idx);
text += "Rotation: " + String(t) + "\n";
text += TTR("Rotation:") + " " + String(t) + "\n";
} break;
case Animation::TYPE_SCALE_3D: {
Vector3 t = animation->track_get_key_value(track, key_idx);
text += "Scale: " + String(t) + "\n";
text += TTR("Scale:") + " " + String(t) + "\n";
} break;
case Animation::TYPE_BLEND_SHAPE: {
float t = animation->track_get_key_value(track, key_idx);
text += "Blend Shape: " + itos(t) + "\n";
text += TTR("Blend Shape:") + " " + itos(t) + "\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: {
@@ -2670,22 +2669,20 @@ 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";
int hm = animation->bezier_track_get_key_handle_mode(track, key_idx);
text += "Handle mode: ";
switch (hm) {
case Animation::HANDLE_MODE_FREE: {
text += "Free";
text += TTR("Handle mode: Free\n");
} break;
case Animation::HANDLE_MODE_BALANCED: {
text += "Balanced";
text += TTR("Handle mode: Balanced\n");
} break;
}
text += "\n";
} break;
case Animation::TYPE_AUDIO: {
String stream_name = "null";
@@ -2700,15 +2697,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;
@@ -5073,7 +5070,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) {