1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Add missing i18n to various strings

(cherry picked from commit 25d93200c8)
This commit is contained in:
Haoyu Qiu
2022-03-07 21:50:02 +08:00
committed by Rémi Verschelde
parent 5514126234
commit 2c3646b37b
8 changed files with 16 additions and 12 deletions

View File

@@ -5302,22 +5302,26 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
} }
} }
String track_type;
switch (animation->track_get_type(i)) { switch (animation->track_get_type(i)) {
case Animation::TYPE_TRANSFORM: case Animation::TYPE_TRANSFORM:
text += " (Transform)"; track_type = TTR("Transform");
break; break;
case Animation::TYPE_METHOD: case Animation::TYPE_METHOD:
text += " (Methods)"; track_type = TTR("Methods");
break; break;
case Animation::TYPE_BEZIER: case Animation::TYPE_BEZIER:
text += " (Bezier)"; track_type = TTR("Bezier");
break; break;
case Animation::TYPE_AUDIO: case Animation::TYPE_AUDIO:
text += " (Audio)"; track_type = TTR("Audio");
break; break;
default: { default: {
}; };
} }
if (!track_type.empty()) {
text += vformat(" (%s)", track_type);
}
TreeItem *it = track_copy_select->create_item(troot); TreeItem *it = track_copy_select->create_item(troot);
it->set_editable(0, true); it->set_editable(0, true);

View File

@@ -494,7 +494,7 @@ TreeItem *EditorHelpSearch::Runner::_create_class_item(TreeItem *p_parent, const
} else if (ClassDB::class_exists(p_doc->name) && ClassDB::is_parent_class(p_doc->name, "Object")) { } else if (ClassDB::class_exists(p_doc->name) && ClassDB::is_parent_class(p_doc->name, "Object")) {
icon = ui_service->get_icon("Object", "EditorIcons"); icon = ui_service->get_icon("Object", "EditorIcons");
} }
String tooltip = p_doc->brief_description.strip_edges(); String tooltip = DTR(p_doc->brief_description.strip_edges());
TreeItem *item = results_tree->create_item(p_parent); TreeItem *item = results_tree->create_item(p_parent);
item->set_icon(0, icon); item->set_icon(0, icon);

View File

@@ -5377,7 +5377,7 @@ void EditorNode::_add_dropped_files_recursive(const Vector<String> &p_files, Str
} }
void EditorNode::_file_access_close_error_notify(const String &p_str) { void EditorNode::_file_access_close_error_notify(const String &p_str) {
add_io_error("Unable to write to file '" + p_str + "', file in use, locked or lacking permissions."); add_io_error(vformat(TTR("Unable to write to file '%s', file in use, locked or lacking permissions."), p_str));
} }
void EditorNode::reload_scene(const String &p_path) { void EditorNode::reload_scene(const String &p_path) {

View File

@@ -560,7 +560,7 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
} }
if (!ok_on_pc) { if (!ok_on_pc) {
EditorNode::add_io_error("Warning, no suitable PC VRAM compression enabled in Project Settings. This texture will not display correctly on PC."); EditorNode::add_io_error(TTR("Warning, no suitable PC VRAM compression enabled in Project Settings. This texture will not display correctly on PC."));
} }
} else { } else {
//import normally //import normally

View File

@@ -86,7 +86,7 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven
} }
int idx = menu->get_item_count(); int idx = menu->get_item_count();
menu->add_item(vformat("Add %s", name), idx); menu->add_item(vformat(TTR("Add %s"), name), idx);
menu->set_item_metadata(idx, E->get()); menu->set_item_metadata(idx, E->get());
} }

View File

@@ -109,7 +109,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
continue; // nope continue; // nope
} }
int idx = menu->get_item_count(); int idx = menu->get_item_count();
menu->add_item(vformat("Add %s", name), idx); menu->add_item(vformat(TTR("Add %s"), name), idx);
menu->set_item_metadata(idx, E->get()); menu->set_item_metadata(idx, E->get());
} }

View File

@@ -106,7 +106,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
continue; // nope continue; // nope
} }
int idx = menu->get_item_count(); int idx = menu->get_item_count();
menu->add_item(vformat("Add %s", name), idx); menu->add_item(vformat(TTR("Add %s"), name), idx);
menu->set_item_metadata(idx, E->get()); menu->set_item_metadata(idx, E->get());
} }
Ref<AnimationNode> clipb = EditorSettings::get_singleton()->get_resource_clipboard(); Ref<AnimationNode> clipb = EditorSettings::get_singleton()->get_resource_clipboard();

View File

@@ -292,9 +292,9 @@ MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) {
cd_remove->get_ok()->connect("pressed", this, "_menu_remove_confirm"); cd_remove->get_ok()->connect("pressed", this, "_menu_remove_confirm");
cd_update = memnew(ConfirmationDialog); cd_update = memnew(ConfirmationDialog);
add_child(cd_update); add_child(cd_update);
cd_update->get_ok()->set_text("Apply without Transforms"); cd_update->get_ok()->set_text(TTR("Apply without Transforms"));
cd_update->get_ok()->connect("pressed", this, "_menu_update_confirm", varray(false)); cd_update->get_ok()->connect("pressed", this, "_menu_update_confirm", varray(false));
cd_update->add_button("Apply with Transforms")->connect("pressed", this, "_menu_update_confirm", varray(true)); cd_update->add_button(TTR("Apply with Transforms"))->connect("pressed", this, "_menu_update_confirm", varray(true));
} }
void MeshLibraryEditorPlugin::edit(Object *p_node) { void MeshLibraryEditorPlugin::edit(Object *p_node) {