|
@@ -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";
|
|
|
|
- } 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;
|
|
} 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) {
|