diff options
Diffstat (limited to 'editor/animation_track_editor.cpp')
-rw-r--r-- | editor/animation_track_editor.cpp | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index e01e6e1811..d81d629780 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -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) { |