aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/spatial_editor_gizmos.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/spatial_editor_gizmos.cpp')
-rw-r--r--tools/editor/spatial_editor_gizmos.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/tools/editor/spatial_editor_gizmos.cpp b/tools/editor/spatial_editor_gizmos.cpp
index 3414e8048..b7fc72211 100644
--- a/tools/editor/spatial_editor_gizmos.cpp
+++ b/tools/editor/spatial_editor_gizmos.cpp
@@ -731,9 +731,9 @@ Vector3 EditorSpatialGizmo::get_handle_pos(int p_idx) const {
String LightSpatialGizmo::get_handle_name(int p_idx) const {
if (p_idx==0)
- return "Radius";
+ return TTR("Radius");
else
- return "Aperture";
+ return TTR("Aperture");
}
@@ -830,14 +830,14 @@ void LightSpatialGizmo::commit_handle(int p_idx,const Variant& p_restore,bool p_
} else if (p_idx==0) {
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
- ur->create_action("Change Light Radius");
+ ur->create_action(TTR("Change Light Radius"));
ur->add_do_method(light,"set_parameter",Light::PARAM_RADIUS,light->get_parameter(Light::PARAM_RADIUS));
ur->add_undo_method(light,"set_parameter",Light::PARAM_RADIUS,p_restore);
ur->commit_action();
} else if (p_idx==1) {
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
- ur->create_action("Change Light Radius");
+ ur->create_action(TTR("Change Light Radius"));
ur->add_do_method(light,"set_parameter",Light::PARAM_SPOT_ANGLE,light->get_parameter(Light::PARAM_SPOT_ANGLE));
ur->add_undo_method(light,"set_parameter",Light::PARAM_SPOT_ANGLE,p_restore);
ur->commit_action();
@@ -1030,9 +1030,9 @@ LightSpatialGizmo::LightSpatialGizmo(Light* p_light){
String CameraSpatialGizmo::get_handle_name(int p_idx) const {
if (camera->get_projection()==Camera::PROJECTION_PERSPECTIVE) {
- return "FOV";
+ return TTR("FOV");
} else {
- return "Size";
+ return TTR("Size");
}
}
Variant CameraSpatialGizmo::get_handle_value(int p_idx) const{
@@ -1080,7 +1080,7 @@ void CameraSpatialGizmo::commit_handle(int p_idx,const Variant& p_restore,bool p
camera->set("fov",p_restore);
} else {
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
- ur->create_action("Change Camera FOV");
+ ur->create_action(TTR("Change Camera FOV"));
ur->add_do_property(camera,"fov",camera->get_fov());
ur->add_undo_property(camera,"fov",p_restore);
ur->commit_action();
@@ -1093,7 +1093,7 @@ void CameraSpatialGizmo::commit_handle(int p_idx,const Variant& p_restore,bool p
camera->set("size",p_restore);
} else {
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
- ur->create_action("Change Camera Size");
+ ur->create_action(TTR("Change Camera Size"));
ur->add_do_property(camera,"size",camera->get_size());
ur->add_undo_property(camera,"size",p_restore);
ur->commit_action();
@@ -1695,22 +1695,22 @@ String CollisionShapeSpatialGizmo::get_handle_name(int p_idx) const {
if (s->cast_to<SphereShape>()) {
- return "Radius";
+ return TTR("Radius");
}
if (s->cast_to<BoxShape>()) {
- return "Extents";
+ return TTR("Extents");
}
if (s->cast_to<CapsuleShape>()) {
- return p_idx==0?"Radius":"Height";
+ return p_idx==0?TTR("Radius"):"Height";
}
if (s->cast_to<RayShape>()) {
- return "Length";
+ return TTR("Length");
}
return "";
@@ -1838,7 +1838,7 @@ void CollisionShapeSpatialGizmo::commit_handle(int p_idx,const Variant& p_restor
}
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
- ur->create_action("Change Sphere Shape Radius");
+ ur->create_action(TTR("Change Sphere Shape Radius"));
ur->add_do_method(ss.ptr(),"set_radius",ss->get_radius());
ur->add_undo_method(ss.ptr(),"set_radius",p_restore);
ur->commit_action();
@@ -1854,7 +1854,7 @@ void CollisionShapeSpatialGizmo::commit_handle(int p_idx,const Variant& p_restor
}
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
- ur->create_action("Change Box Shape Extents");
+ ur->create_action(TTR("Change Box Shape Extents"));
ur->add_do_method(ss.ptr(),"set_extents",ss->get_extents());
ur->add_undo_method(ss.ptr(),"set_extents",p_restore);
ur->commit_action();
@@ -1873,11 +1873,11 @@ void CollisionShapeSpatialGizmo::commit_handle(int p_idx,const Variant& p_restor
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
if (p_idx==0) {
- ur->create_action("Change Capsule Shape Radius");
+ ur->create_action(TTR("Change Capsule Shape Radius"));
ur->add_do_method(ss.ptr(),"set_radius",ss->get_radius());
ur->add_undo_method(ss.ptr(),"set_radius",p_restore);
} else {
- ur->create_action("Change Capsule Shape Height");
+ ur->create_action(TTR("Change Capsule Shape Height"));
ur->add_do_method(ss.ptr(),"set_height",ss->get_height());
ur->add_undo_method(ss.ptr(),"set_height",p_restore);
@@ -1896,7 +1896,7 @@ void CollisionShapeSpatialGizmo::commit_handle(int p_idx,const Variant& p_restor
}
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
- ur->create_action("Change Ray Shape Length");
+ ur->create_action(TTR("Change Ray Shape Length"));
ur->add_do_method(ss.ptr(),"set_length",ss->get_length());
ur->add_undo_method(ss.ptr(),"set_length",p_restore);
ur->commit_action();
@@ -2243,7 +2243,7 @@ void VisibilityNotifierGizmo::commit_handle(int p_idx,const Variant& p_restore,b
}
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
- ur->create_action("Change Notifier Extents");
+ ur->create_action(TTR("Change Notifier Extents"));
ur->add_do_method(notifier,"set_aabb",notifier->get_aabb());
ur->add_undo_method(notifier,"set_aabb",p_restore);
ur->commit_action();