From 567cb691ec49844101247bb9dc34bc2722f6af4f Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 3 May 2016 22:25:37 -0300 Subject: Modified editor strings to be translatable in the future --- tools/editor/editor_node.cpp | 452 +++++++++++++++++++++---------------------- 1 file changed, 226 insertions(+), 226 deletions(-) (limited to 'tools/editor/editor_node.cpp') diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 09f85b99f..691269a22 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -432,13 +432,13 @@ void EditorNode::_rebuild_import_menu() { PopupMenu* p = import_menu->get_popup(); p->clear(); - p->add_item("Node from scene", FILE_IMPORT_SUBSCENE); + p->add_item(TTR("Node from scene"), FILE_IMPORT_SUBSCENE); p->add_separator(); for (int i = 0; i < editor_import_export->get_import_plugin_count(); i++) { p->add_item(editor_import_export->get_import_plugin(i)->get_visible_name(), IMPORT_PLUGIN_BASE + i); } p->add_separator(); - p->add_item("Re-Import..", SETTINGS_IMPORT); + p->add_item(TTR("Re-Import.."), SETTINGS_IMPORT); } void EditorNode::_node_renamed() { @@ -503,7 +503,7 @@ void EditorNode::save_resource_in_path(const Ref& p_resource,const Str Error err = ResourceSaver::save(path,p_resource,flg|ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS); if (err!=OK) { - accept->set_text("Error saving resource!"); + accept->set_text(TTR("Error saving resource!")); accept->popup_centered_minsize(); return; } @@ -564,7 +564,7 @@ void EditorNode::save_resource_as(const Ref& p_resource) { } file->popup_centered_ratio(); - file->set_title("Save Resource As.."); + file->set_title(TTR("Save Resource As..")); } @@ -586,21 +586,21 @@ void EditorNode::_dialog_display_file_error(String p_file,Error p_error) { current_option=-1; //accept->"()->hide(); - accept->get_ok()->set_text("I see.."); + accept->get_ok()->set_text(TTR("I see..")); switch(p_error) { case ERR_FILE_CANT_WRITE: { - accept->set_text("Can't open file for writing: "+p_file.extension()); + accept->set_text(TTR("Can't open file for writing: ")+p_file.extension()); } break; case ERR_FILE_UNRECOGNIZED: { - accept->set_text("File format requested unknown: "+p_file.extension()); + accept->set_text(TTR("File format requested unknown: ")+p_file.extension()); } break; default: { - accept->set_text("Error Saving."); + accept->set_text(TTR("Error Saving.")); }break; } @@ -788,7 +788,7 @@ bool EditorNode::_find_and_save_resource(RES res,Map& processed,int32_ if (res->get_path().is_resource_file()) { if (changed || subchanged) { //save - print_line("Also saving modified external resource: "+res->get_path()); + print_line(TTR("Also saving modified external resource: ")+res->get_path()); Error err = ResourceSaver::save(res->get_path(),res,flags); } @@ -896,8 +896,8 @@ void EditorNode::_save_scene_with_preview(String p_file) { int c2d=0; int c3d=0; - EditorProgress save("save","Saving Scene",4); - save.step("Analyzing",0); + EditorProgress save("save",TTR("Saving Scene"),4); + save.step(TTR("Analyzing"),0); _find_node_types(editor_data.get_edited_scene_root(),c2d,c3d); RID viewport; @@ -910,7 +910,7 @@ void EditorNode::_save_scene_with_preview(String p_file) { is2d=false; } - save.step("Creating Thumbnail",1); + save.step(TTR("Creating Thumbnail"),1); //current view? int screen =-1; for(int i=0;iviewport_queue_screen_capture(viewport); - save.step("Creating Thumbnail",2); - save.step("Creating Thumbnail",3); + save.step(TTR("Creating Thumbnail"),2); + save.step(TTR("Creating Thumbnail"),3); Image img = VS::get_singleton()->viewport_get_screen_capture(viewport); int preview_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");; int width,height; @@ -959,7 +959,7 @@ void EditorNode::_save_scene_with_preview(String p_file) { if (screen!=-1) { _editor_select(screen); } - save.step("Saving Scene",4); + save.step(TTR("Saving Scene"),4); _save_scene(p_file); } @@ -973,7 +973,7 @@ void EditorNode::_save_scene(String p_file) { current_option=-1; //accept->get_cancel()->hide(); - accept->get_ok()->set_text("I see.."); + accept->get_ok()->set_text(TTR("I see..")); accept->set_text("This operation can't be done without a tree root."); accept->popup_centered_minsize(); return; @@ -1006,8 +1006,8 @@ void EditorNode::_save_scene(String p_file) { current_option=-1; //accept->get_cancel()->hide(); - accept->get_ok()->set_text("I see.."); - accept->set_text("Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."); + accept->get_ok()->set_text(TTR("I see..")); + accept->set_text(TTR("Couldn't save scene. Likely dependencies (instances) couldn't be satisfied.")); accept->popup_centered_minsize(); return; } @@ -1057,8 +1057,8 @@ void EditorNode::_import_action(const String& p_action) { current_option=-1; //accept->get_cancel()->hide(); - accept->get_ok()->set_text("Ugh"); - accept->set_text("Error importing scene."); + accept->get_ok()->set_text(TTR("Ugh")); + accept->set_text(TTR("Error importing scene.")); accept->popup_centered(Size2(300,70));; return; } @@ -1073,8 +1073,8 @@ void EditorNode::_import_action(const String& p_action) { memdelete(src); //accept->get_cancel()->hide(); - accept->get_ok()->set_text("Ugh"); - accept->set_text("Error load scene to update."); + accept->get_ok()->set_text(TTR("Ugh")); + accept->set_text(TTR("Error load scene to update.")); accept->popup_centered(Size2(300,70));; return; } @@ -1114,8 +1114,8 @@ void EditorNode::_import(const String &p_file) { current_option=-1; //accept->get_cancel()->hide(); - accept->get_ok()->set_text("Ugh"); - accept->set_text("Error importing scene."); + accept->get_ok()->set_text(TTR("Ugh")); + accept->set_text(TTR("Error importing scene.")); accept->popup_centered(Size2(300,70));; return; } @@ -1156,7 +1156,7 @@ void EditorNode::_dialog_action(String p_file) { current_option=-1; //accept->get_cancel()->hide(); accept->get_ok()->set_text("ok :("); - accept->set_text("Failed to load resource."); + accept->set_text(TTR("Failed to load resource.")); return; }; @@ -1181,7 +1181,7 @@ void EditorNode::_dialog_action(String p_file) { } break; case FILE_RUN_SCRIPT: { - print_line("RUN: "+p_file); + print_line(TTR("RUN: ")+p_file); Ref