summaryrefslogtreecommitdiffstats
path: root/editor/plugins
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2019-12-27 10:31:55 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2019-12-30 10:36:31 +0800
commit8cf941a8cb6ea5cf778bba12ec34261edc7ff0bb (patch)
tree9bc08f8527bb98c95e45603847d64bec31c2ba81 /editor/plugins
parentb8e8f4942d5ae49d4661ed685486abcc8b5cbd55 (diff)
downloadredot-engine-8cf941a8cb6ea5cf778bba12ec34261edc7ff0bb.tar.gz
Makes more editor strings translatable
* Title of Sprite Editor convert preview dialogs * Title of UV Channel Debug dialog * Various editor warnings * GridMap popup menu item "Paste Selects" * Tileset editor shape button texts * MeshLibrary update confirmation text
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp2
-rw-r--r--editor/plugins/mesh_instance_editor_plugin.cpp2
-rw-r--r--editor/plugins/mesh_library_editor_plugin.cpp2
-rw-r--r--editor/plugins/script_text_editor.cpp2
-rw-r--r--editor/plugins/sprite_editor_plugin.cpp8
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp2
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp4
7 files changed, 11 insertions, 11 deletions
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index f627cdf5d8..425bfc5eb5 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -262,7 +262,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
if (connecting_to_node != StringName()) {
if (state_machine->has_transition(connecting_from, connecting_to_node)) {
- EditorNode::get_singleton()->show_warning("Transition exists!");
+ EditorNode::get_singleton()->show_warning(TTR("Transition exists!"));
} else {
diff --git a/editor/plugins/mesh_instance_editor_plugin.cpp b/editor/plugins/mesh_instance_editor_plugin.cpp
index 22df8fd8f4..5b5b2a0607 100644
--- a/editor/plugins/mesh_instance_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_editor_plugin.cpp
@@ -456,7 +456,7 @@ MeshInstanceEditor::MeshInstanceEditor() {
add_child(err_dialog);
debug_uv_dialog = memnew(AcceptDialog);
- debug_uv_dialog->set_title("UV Channel Debug");
+ debug_uv_dialog->set_title(TTR("UV Channel Debug"));
add_child(debug_uv_dialog);
debug_uv = memnew(Control);
debug_uv->set_custom_minimum_size(Size2(600, 600) * EDSCALE);
diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp
index fc3ca38104..1e4dd9d6bf 100644
--- a/editor/plugins/mesh_library_editor_plugin.cpp
+++ b/editor/plugins/mesh_library_editor_plugin.cpp
@@ -241,7 +241,7 @@ void MeshLibraryEditor::_menu_cbk(int p_option) {
} break;
case MENU_OPTION_UPDATE_FROM_SCENE: {
- cd->set_text("Update from existing scene?:\n" + String(mesh_library->get_meta("_editor_source_scene")));
+ cd->set_text(vformat(TTR("Update from existing scene?:\n%s"), String(mesh_library->get_meta("_editor_source_scene"))));
cd->popup_centered(Size2(500, 60));
} break;
}
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index c57ffa8ee3..35ca97b427 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -1559,7 +1559,7 @@ void ScriptTextEditor::drop_data_fw(const Point2 &p_point, const Variant &p_data
Node *sn = _find_script_node(get_tree()->get_edited_scene_root(), get_tree()->get_edited_scene_root(), script);
if (!sn) {
- EditorNode::get_singleton()->show_warning("Can't drop nodes because script '" + get_name() + "' is not used in this scene.");
+ EditorNode::get_singleton()->show_warning(vformat(TTR("Can't drop nodes because script '%s' is not used in this scene."), get_name()));
return;
}
diff --git a/editor/plugins/sprite_editor_plugin.cpp b/editor/plugins/sprite_editor_plugin.cpp
index 40734cffc4..b3864081d9 100644
--- a/editor/plugins/sprite_editor_plugin.cpp
+++ b/editor/plugins/sprite_editor_plugin.cpp
@@ -125,7 +125,7 @@ void SpriteEditor::_menu_option(int p_option) {
case MENU_OPTION_CONVERT_TO_MESH_2D: {
debug_uv_dialog->get_ok()->set_text(TTR("Create Mesh2D"));
- debug_uv_dialog->set_title("Mesh2D Preview");
+ debug_uv_dialog->set_title(TTR("Mesh2D Preview"));
_update_mesh_data();
debug_uv_dialog->popup_centered();
@@ -135,7 +135,7 @@ void SpriteEditor::_menu_option(int p_option) {
case MENU_OPTION_CONVERT_TO_POLYGON_2D: {
debug_uv_dialog->get_ok()->set_text(TTR("Create Polygon2D"));
- debug_uv_dialog->set_title("Polygon2D Preview");
+ debug_uv_dialog->set_title(TTR("Polygon2D Preview"));
_update_mesh_data();
debug_uv_dialog->popup_centered();
@@ -144,7 +144,7 @@ void SpriteEditor::_menu_option(int p_option) {
case MENU_OPTION_CREATE_COLLISION_POLY_2D: {
debug_uv_dialog->get_ok()->set_text(TTR("Create CollisionPolygon2D"));
- debug_uv_dialog->set_title("CollisionPolygon2D Preview");
+ debug_uv_dialog->set_title(TTR("CollisionPolygon2D Preview"));
_update_mesh_data();
debug_uv_dialog->popup_centered();
@@ -154,7 +154,7 @@ void SpriteEditor::_menu_option(int p_option) {
case MENU_OPTION_CREATE_LIGHT_OCCLUDER_2D: {
debug_uv_dialog->get_ok()->set_text(TTR("Create LightOccluder2D"));
- debug_uv_dialog->set_title("LightOccluder2D Preview");
+ debug_uv_dialog->set_title(TTR("LightOccluder2D Preview"));
_update_mesh_data();
debug_uv_dialog->popup_centered();
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index a4c3ff5dcd..b002585e03 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -202,7 +202,7 @@ void SpriteFramesEditor::_prepare_sprite_sheet(const String &p_file) {
Ref<Resource> texture = ResourceLoader::load(p_file);
if (!texture.is_valid()) {
- EditorNode::get_singleton()->show_warning("Unable to load images");
+ EditorNode::get_singleton()->show_warning(TTR("Unable to load images"));
ERR_FAIL_COND(!texture.is_valid());
}
if (texture != split_sheet_preview->get_texture()) {
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index 259a7c9132..66a6776a88 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -2036,10 +2036,10 @@ void TileSetEditor::_update_toggle_shape_button() {
tools[SHAPE_TOGGLE_TYPE]->hide();
} else if (concave.is_valid()) {
tools[SHAPE_TOGGLE_TYPE]->set_icon(get_icon("ConvexPolygonShape2D", "EditorIcons"));
- tools[SHAPE_TOGGLE_TYPE]->set_text("Make Convex");
+ tools[SHAPE_TOGGLE_TYPE]->set_text(TTR("Make Convex"));
} else if (convex.is_valid()) {
tools[SHAPE_TOGGLE_TYPE]->set_icon(get_icon("ConcavePolygonShape2D", "EditorIcons"));
- tools[SHAPE_TOGGLE_TYPE]->set_text("Make Concave");
+ tools[SHAPE_TOGGLE_TYPE]->set_text(TTR("Make Concave"));
} else {
// Shouldn't happen
separator_shape_toggle->hide();