diff --git a/scene/2d/canvas_modulate.cpp b/scene/2d/canvas_modulate.cpp index cc0db2da779..6a74cb1d913 100644 --- a/scene/2d/canvas_modulate.cpp +++ b/scene/2d/canvas_modulate.cpp @@ -62,7 +62,7 @@ String CanvasModulate::get_configuration_warning() const { get_tree()->get_nodes_in_group("_canvas_modulate_"+itos(get_canvas().get_id()),&nodes); if (nodes.size()>1) { - return TTR("Only one visible CanvasModulate is allowed per scene (or set of instanced scenes). The first one created will work, while the rest will be ignored."); + return TTR("Only one visible CanvasModulate is allowed per scene (or set of instanced scenes). The first created one will work, while the rest will be ignored."); } return String(); diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp index dee67a829fd..41ca7b1d0f3 100644 --- a/scene/2d/path_2d.cpp +++ b/scene/2d/path_2d.cpp @@ -243,7 +243,7 @@ String PathFollow2D::get_configuration_warning() const { return String(); if (!get_parent() || !get_parent()->cast_to()) { - return TTR("PathFolow2D only works when set as a child of a Path2D node."); + return TTR("PathFollow2D only works when set as a child of a Path2D node."); } return String(); diff --git a/scene/2d/sprite.cpp b/scene/2d/sprite.cpp index aebb9a4c289..3e6384ea2ca 100644 --- a/scene/2d/sprite.cpp +++ b/scene/2d/sprite.cpp @@ -540,7 +540,7 @@ String ViewportSprite::get_configuration_warning() const { Viewport *vp = n->cast_to(); if (!vp->is_set_as_render_target()) { - return TTR("The Viewport set in the path property must be set as 'render taget' in order for this sprite to work"); + return TTR("The Viewport set in the path property must be set as 'render target' in order for this sprite to work."); } } } diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 2a057fc4243..ebc8d49422b 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -2407,7 +2407,7 @@ String Viewport::get_configuration_warning() const { if (get_parent() && !get_parent()->cast_to() && !render_target) { - return TTR("This viewport is not set as render target. If you intend for it to display it's contents directly to the screen, make it a child of a Control so it can obtain a size. Otherwise, make it a RenderTarget and assign it's internal texture to some node for display."); + return TTR("This viewport is not set as render target. If you intend for it to display its contents directly to the screen, make it a child of a Control so it can obtain a size. Otherwise, make it a RenderTarget and assign its internal texture to some node for display."); } return String(); diff --git a/tools/editor/addon_editor_plugin.cpp b/tools/editor/addon_editor_plugin.cpp index 3b74330c1e9..ee0b4b595fd 100644 --- a/tools/editor/addon_editor_plugin.cpp +++ b/tools/editor/addon_editor_plugin.cpp @@ -1085,7 +1085,7 @@ EditorAddonLibrary::EditorAddonLibrary() { - search_hb->add_child( memnew( Label(TTR("Search: ")))); + search_hb->add_child( memnew( Label(TTR("Search:")+" "))); filter =memnew( LineEdit ); search_hb->add_child(filter); filter->set_h_size_flags(SIZE_EXPAND_FILL); @@ -1112,7 +1112,7 @@ EditorAddonLibrary::EditorAddonLibrary() { HBoxContainer *search_hb2 = memnew( HBoxContainer ); library_main->add_child(search_hb2); - search_hb2->add_child( memnew( Label("Sort: "))); + search_hb2->add_child( memnew( Label(TTR("Sort:")+" "))); sort = memnew( OptionButton ); for(int i=0;iadd_item(sort_text[i]); @@ -1123,26 +1123,26 @@ EditorAddonLibrary::EditorAddonLibrary() { sort->set_h_size_flags(SIZE_EXPAND_FILL); reverse = memnew( CheckBox); - reverse->set_text("Reverse"); + reverse->set_text(TTR("Reverse")); search_hb2->add_child(reverse); search_hb2->add_child(memnew(VSeparator)); //search_hb2->add_spacer(); - search_hb2->add_child( memnew( Label("Category: "))); + search_hb2->add_child( memnew( Label(TTR("Category:")+" "))); categories = memnew( OptionButton ); - categories->add_item("All"); + categories->add_item(TTR("All")); search_hb2->add_child(categories); categories->set_h_size_flags(SIZE_EXPAND_FILL); //search_hb2->add_spacer(); search_hb2->add_child(memnew(VSeparator)); - search_hb2->add_child( memnew( Label("Site: "))); + search_hb2->add_child( memnew( Label(TTR("Site:")+" "))); repository = memnew( OptionButton ); - repository->add_item(TTR("Godot")); + repository->add_item("Godot"); search_hb2->add_child(repository); repository->set_h_size_flags(SIZE_EXPAND_FILL); @@ -1232,7 +1232,7 @@ EditorAddonLibrary::EditorAddonLibrary() { asset_open = memnew( EditorFileDialog ); asset_open->set_access(EditorFileDialog::ACCESS_FILESYSTEM); - asset_open->add_filter("*.zip ; Assets ZIP File"); + asset_open->add_filter("*.zip ; "+TTR("Assets ZIP File")); asset_open->set_mode(EditorFileDialog::MODE_OPEN_FILE); add_child(asset_open); asset_open->connect("file_selected",this,"_asset_file_selected"); diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp index f4fda7ba6ec..b4798725107 100644 --- a/tools/editor/animation_editor.cpp +++ b/tools/editor/animation_editor.cpp @@ -889,7 +889,7 @@ void AnimationKeyEditor::_menu_track(int p_type) { case TRACK_MENU_SET_ALL_TRANS_OUTIN: t=-2.0; break; } - undo_redo->create_action(TTR("Set Transitions to: ")+rtos(t)); + undo_redo->create_action(TTR("Set Transitions to:")+" "+rtos(t)); for(Map::Element *E=selection.back();E;E=E->prev()) { @@ -2096,7 +2096,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) { /* if (ofsx < remove_icon->get_width()) { - undo_redo->create_action(TTR("Remove Anim Track")); + undo_redo->create_action("Remove Anim Track"); undo_redo->add_do_method(animation.ptr(),"remove_track",idx); undo_redo->add_undo_method(animation.ptr(),"add_track",animation->track_get_type(idx),idx); undo_redo->add_undo_method(animation.ptr(),"track_set_path",idx,animation->track_get_path(idx)); @@ -2129,7 +2129,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) { if (ofsx < move_down_icon->get_width()) { if (idx < animation->get_track_count() -1) { - undo_redo->create_action(TTR("Move Anim Track Down")); + undo_redo->create_action("Move Anim Track Down"); undo_redo->add_do_method(animation.ptr(),"track_move_up",idx); undo_redo->add_undo_method(animation.ptr(),"track_move_down",idx+1); undo_redo->commit_action(); @@ -2142,7 +2142,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) { if (ofsx < move_up_icon->get_width()) { if (idx >0) { - undo_redo->create_action(TTR("Move Anim Track Up")); + undo_redo->create_action("Move Anim Track Up"); undo_redo->add_do_method(animation.ptr(),"track_move_down",idx); undo_redo->add_undo_method(animation.ptr(),"track_move_up",idx-1); undo_redo->commit_action(); @@ -2893,7 +2893,7 @@ void AnimationKeyEditor::_notification(int p_what) { optimize_dialog->connect("confirmed",this,"_animation_optimize"); menu_track->get_popup()->add_child(tpp); - //menu_track->get_popup()->add_submenu_item(TTR("Set Transitions.."),"Transitions"); + //menu_track->get_popup()->add_submenu_item("Set Transitions..","Transitions"); //menu_track->get_popup()->add_separator(); menu_track->get_popup()->add_item(TTR("Optimize Animation"),TRACK_MENU_OPTIMIZE); menu_track->get_popup()->add_item(TTR("Clean-Up Animation"),TRACK_MENU_CLEAN_UP); @@ -3113,9 +3113,9 @@ void AnimationKeyEditor::_query_insert(const InsertData& p_id) { if (bool(EDITOR_DEF("animation/confirm_insert_track",true))) { //potential new key, does not exist if (insert_data.size()==1) - insert_confirm->set_text(TTR("Create NEW track for ")+p_id.query+TTR(" and insert key?")); + insert_confirm->set_text(vformat(TTR("Create NEW track for %s and insert key?"),p_id.query)); else - insert_confirm->set_text(TTR("Create ")+itos(insert_data.size())+TTR(" NEW tracks and insert keys?")); + insert_confirm->set_text(vformat(TTR("Create %i NEW tracks and insert keys?"),insert_data.size())); insert_confirm->get_ok()->set_text(TTR("Create")); insert_confirm->popup_centered_minsize(); @@ -3510,7 +3510,7 @@ void AnimationKeyEditor::_insert_delay() { return; } - undo_redo->create_action(TTR("Anim Insert")); + undo_redo->create_action(TTR("Anim Insert")); int last_track = animation->get_track_count(); bool advance=false; @@ -3818,7 +3818,7 @@ AnimationKeyEditor::AnimationKeyEditor() { hb->add_child( memnew( VSeparator ) ); Label *l = memnew( Label ); - l->set_text(TTR("Len(s):")); + l->set_text(TTR("Length (s):")); hb->add_child(l); length = memnew( SpinBox ); @@ -3833,7 +3833,7 @@ AnimationKeyEditor::AnimationKeyEditor() { length->connect("value_changed",this,"_animation_len_changed"); l = memnew( Label ); - l->set_text(TTR("Step(s):")); + l->set_text(TTR("Step (s):")); hb->add_child(l); step = memnew( SpinBox ); @@ -3929,7 +3929,7 @@ AnimationKeyEditor::AnimationKeyEditor() { /*keying = memnew( Button ); keying->set_toggle_mode(true); - //keying->set_text(TTR("Keys")); + //keying->set_text("Keys"); keying->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_END,60); keying->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_END,10); keying->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_BEGIN,55); @@ -3939,7 +3939,7 @@ AnimationKeyEditor::AnimationKeyEditor() { */ /* l = memnew( Label ); - l->set_text(TTR("Base: ")); + l->set_text("Base: "); l->set_pos(Point2(0,3)); // dr_panel->add_child(l);*/ @@ -4089,10 +4089,10 @@ AnimationKeyEditor::AnimationKeyEditor() { cleanup_vb->add_child(cleanup_tracks); cleanup_all = memnew( CheckButton ); - cleanup_all->set_text(TTR("Clean-Up all animations")); + cleanup_all->set_text(TTR("Clean-up all animations")); cleanup_vb->add_child(cleanup_all); - cleanup_dialog->set_title(TTR("Clean up Animation(s) (NO UNDO!)")); + cleanup_dialog->set_title(TTR("Clean-Up Animation(s) (NO UNDO!)")); cleanup_dialog->get_ok()->set_text(TTR("Clean-Up")); cleanup_dialog->connect("confirmed",this,"_menu_track",varray(TRACK_MENU_CLEAN_UP_CONFIRM)); diff --git a/tools/editor/call_dialog.cpp b/tools/editor/call_dialog.cpp index 2ab9a79d3b8..0c6c64a33bc 100644 --- a/tools/editor/call_dialog.cpp +++ b/tools/editor/call_dialog.cpp @@ -239,7 +239,7 @@ void CallDialog::set_object(Object *p_object,StringName p_selected) { return_value->clear(); _update_method_list(); - method_label->set_text(TTR("Method List For ' ")+p_object->get_type()+" ':"); + method_label->set_text(vformat(TTR("Method List For '%s':"),p_object->get_type())); } CallDialog::CallDialog() { @@ -323,7 +323,7 @@ CallDialog::CallDialog() { label->set_begin( Point2( 15,54) ); label->set_end( Point2( 16,44) ); - label->set_text(TTR("Parameters:")); + label->set_text("Parameters:"); add_child(label); */ diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp index 970a0477c19..24c763a58f3 100644 --- a/tools/editor/code_editor.cpp +++ b/tools/editor/code_editor.cpp @@ -216,7 +216,7 @@ void FindReplaceDialog::_replace() { text_edit->set_v_scroll(vsval); // text_edit->set_h_scroll(hsval); - error_label->set_text(TTR("Replaced ")+itos(rc)+TTR(" ocurrence(s).")); + error_label->set_text(vformat(TTR("Replaced %i ocurrence(s)."),rc)); //hide(); @@ -274,7 +274,7 @@ bool FindReplaceDialog::_search() { return true; } else { - set_error(TTR("Not Found!")); + set_error(TTR("Not found!")); return false; } @@ -498,7 +498,7 @@ FindReplaceDialog::FindReplaceDialog() { void CodeTextEditor::_line_col_changed() { - String text = String()+TTR("Line: ")+itos(text_editor->cursor_get_line()+1)+TTR(", Col: ")+itos(text_editor->cursor_get_column()); + String text = String()+TTR("Line:")+" "+itos(text_editor->cursor_get_line()+1)+", "+TTR("Col:")+" "+itos(text_editor->cursor_get_column()); line_col->set_text(text); } diff --git a/tools/editor/connections_dialog.cpp b/tools/editor/connections_dialog.cpp index 3795860472d..b99cd12f65a 100644 --- a/tools/editor/connections_dialog.cpp +++ b/tools/editor/connections_dialog.cpp @@ -294,8 +294,8 @@ void ConnectDialog::_bind_methods() { ConnectDialog::ConnectDialog() { - int margin = get_constant("margin",TTR("Dialogs")); - int button_margin = get_constant("button_margin",TTR("Dialogs")); + int margin = get_constant("margin","Dialogs"); + int button_margin = get_constant("button_margin","Dialogs"); Label * label = memnew( Label ); @@ -416,7 +416,7 @@ ConnectDialog::ConnectDialog() { /*dst_method_list = memnew( MenuButton ); - dst_method_list->set_text(TTR("List..")); + dst_method_list->set_text("List.."); dst_method_list->set_anchor( MARGIN_RIGHT, ANCHOR_END ); dst_method_list->set_anchor( MARGIN_LEFT, ANCHOR_END ); dst_method_list->set_anchor( MARGIN_TOP, ANCHOR_END ); @@ -429,7 +429,7 @@ ConnectDialog::ConnectDialog() { make_callback = memnew( CheckButton ); make_callback->set_toggle_mode(true); make_callback->set_pressed( EDITOR_DEF("text_editor/create_signal_callbacks",true)); - make_callback->set_text(TTR("Make Function ")); + make_callback->set_text(TTR("Make Function")); dstm_hb->add_child(make_callback); deferred = memnew( CheckButton ); @@ -447,7 +447,7 @@ ConnectDialog::ConnectDialog() { realtime->set_anchor( MARGIN_RIGHT, ANCHOR_END ); realtime->set_begin( Point2( 120, button_margin-10 ) ); realtime->set_end( Point2( 80, margin ) ); - realtime->set_text(TTR("Realtime")); + realtime->set_text("Realtime"); add_child(realtime); */ @@ -465,7 +465,7 @@ ConnectDialog::ConnectDialog() { add_child(error); error->get_ok()->set_text(TTR("Close")); get_ok()->set_text(TTR("Connect")); -// error->get_cancel()->set_text(TTR("Close")); +// error->get_cancel()->set_text("Close"); @@ -511,7 +511,7 @@ void ConnectionsDialog::_connect() { StringArray args = it->get_metadata(0).operator Dictionary()["args"]; int flags = CONNECT_PERSIST | (defer?CONNECT_DEFERRED:0) | (oshot?CONNECT_ONESHOT:0); - undo_redo->create_action(TTR("Connect '")+signal+"' to '"+String(dst_method)+"'"); + undo_redo->create_action(vformat(TTR("Connect '%s' to '%s'"),signal,String(dst_method))); undo_redo->add_do_method(node,"connect",signal,target,dst_method,binds,flags); undo_redo->add_undo_method(node,"disconnect",signal,target,dst_method); undo_redo->add_do_method(this,"update_tree"); @@ -610,7 +610,7 @@ void ConnectionsDialog::_remove_confirm() { Dictionary meta=selected->get_metadata(0); - undo_redo->create_action(TTR("Remove Subscription")); + undo_redo->create_action("Remove Subscription"); undo_redo->add_do_method(node,"unsubscribe_path_event",meta["from_event"].operator String(),meta["from_path"].operator NodePath(),meta["to_method"].operator String()); undo_redo->add_undo_method(node,"subscribe_path_event_persist",meta["from_event"].operator String(),meta["from_path"].operator NodePath(),meta["to_method"].operator String(),Array(),false); undo_redo->add_do_method(this,"update_tree"); diff --git a/tools/editor/create_dialog.cpp b/tools/editor/create_dialog.cpp index c156b1b2de3..151208ace0f 100644 --- a/tools/editor/create_dialog.cpp +++ b/tools/editor/create_dialog.cpp @@ -251,7 +251,7 @@ void CreateDialog::_notification(int p_what) { void CreateDialog::set_base_type(const String& p_base) { base_type=p_base; - set_title(TTR("Create New ")+p_base); + set_title(TTR("Create New")+" "+p_base); _update_search(); } @@ -541,7 +541,7 @@ void CreateDialog::_bind_methods() { void CreateDialog::set_base_type(const String& p_base) { - set_title(TTR("Create ")+p_base+" Type"); + set_title(vformat("Create %s Type",p_base)); if (base==p_base) return; @@ -562,14 +562,14 @@ CreateDialog::CreateDialog() { add_child(vbc); set_child_rect(vbc); - get_ok()->set_text(TTR("Create")); + get_ok()->set_text("Create"); tree = memnew( Tree ); - vbc->add_margin_child(TTR("Type:"),tree,true); + vbc->add_margin_child("Type:",tree,true); //tree->set_hide_root(true); filter = memnew( LineEdit ); - vbc->add_margin_child(TTR("Filter:"),filter); + vbc->add_margin_child("Filter:",filter); base="Node"; set_as_toplevel(true); diff --git a/tools/editor/dependency_editor.cpp b/tools/editor/dependency_editor.cpp index 784315522c2..eeb08e8e45f 100644 --- a/tools/editor/dependency_editor.cpp +++ b/tools/editor/dependency_editor.cpp @@ -27,7 +27,7 @@ void DependencyEditor::_load_pressed(Object* p_item,int p_cell,int p_button){ String fname = ti->get_text(0); replacing = ti->get_text(1); - search->set_title(TTR("Search Replacement For: ")+replacing.get_file()); + search->set_title(TTR("Search Replacement For:")+" "+replacing.get_file()); search->clear_filters(); List ext; @@ -180,7 +180,7 @@ void DependencyEditor::_update_list() { String name = path.get_file(); Ref icon; - if (has_icon(type,TTR("EditorIcons"))) { + if (has_icon(type,"EditorIcons")) { icon=get_icon(type,"EditorIcons"); } else { icon=get_icon("Object","EditorIcons"); @@ -209,15 +209,15 @@ void DependencyEditor::edit(const String& p_path) { editing=p_path; - set_title(TTR("Dependencies For: ")+p_path.get_file()); + set_title(TTR("Dependencies For:")+" "+p_path.get_file()); _update_list(); popup_centered_ratio(); if (EditorNode::get_singleton()->is_scene_open(p_path)) { - EditorNode::get_singleton()->show_warning(TTR("Scene '")+p_path.get_file()+"' is currently being edited.\nChanges will not take effect unless reloaded."); + EditorNode::get_singleton()->show_warning(vformat(TTR("Scene '%s' is currently being edited.\nChanges will not take effect unless reloaded."),p_path.get_file())); } else if (ResourceCache::has(p_path)) { - EditorNode::get_singleton()->show_warning(TTR("Resource '")+p_path.get_file()+"' is in use.\nChanges will take effect when reloaded."); + EditorNode::get_singleton()->show_warning(vformat(TTR("Resource '%s' is in use.\nChanges will take effect when reloaded."),p_path.get_file())); } } @@ -301,7 +301,7 @@ void DependencyEditorOwners::_fill_owners(EditorFileSystemDirectory *efsd) { Ref icon; String type=efsd->get_file_type(i); - if (!has_icon(type,TTR("EditorIcons"))) { + if (!has_icon(type,"EditorIcons")) { icon=get_icon("Object","EditorIcons"); } else { icon=get_icon(type,"EditorIcons"); @@ -319,7 +319,7 @@ void DependencyEditorOwners::show(const String& p_path) { _fill_owners(EditorFileSystem::get_singleton()->get_filesystem()); popup_centered_ratio(); - set_title(TTR("Owners Of: ")+p_path.get_file()); + set_title(TTR("Owners Of:")+" "+p_path.get_file()); } @@ -362,7 +362,7 @@ void DependencyRemoveDialog::_fill_owners(EditorFileSystemDirectory *efsd) { Ref icon; String type=efsd->get_file_type(i); - if (!has_icon(type,TTR("EditorIcons"))) { + if (!has_icon(type,"EditorIcons")) { icon=get_icon("Object","EditorIcons"); } else { icon=get_icon(type,"EditorIcons"); @@ -448,7 +448,7 @@ void DependencyErrorDialog::show(const String& p_for_file,const Vector & for_file=p_for_file; - set_title(TTR("Error loading: ")+p_for_file.get_file()); + set_title(TTR("Error loading:")+" "+p_for_file.get_file()); files->clear(); TreeItem *root = files->create_item(NULL); @@ -461,7 +461,7 @@ void DependencyErrorDialog::show(const String& p_for_file,const Vector & type=report[i].get_slice("::",1); Ref icon; - if (!has_icon(type,TTR("EditorIcons"))) { + if (!has_icon(type,"EditorIcons")) { icon=get_icon("Object","EditorIcons"); } else { icon=get_icon(type,"EditorIcons"); @@ -523,7 +523,7 @@ void OrphanResourcesDialog::ok_pressed() { if (paths.empty()) return; - delete_confirm->set_text(TTR("Permanently Delete ")+itos(paths.size())+" Item(s) ? (No Undo!!)"); + delete_confirm->set_text(vformat(TTR("Permanently delete %i item(s)? (No undo!)"),paths.size())); delete_confirm->popup_centered_minsize(); } @@ -580,7 +580,7 @@ bool OrphanResourcesDialog::_fill_owners(EditorFileSystemDirectory *efsd,HashMap String type=efsd->get_file_type(i); Ref icon; - if (has_icon(type,TTR("EditorIcons"))) { + if (has_icon(type,"EditorIcons")) { icon=get_icon(type,"EditorIcons"); } else { icon=get_icon("Object","EditorIcons"); diff --git a/tools/editor/editor_file_dialog.cpp b/tools/editor/editor_file_dialog.cpp index 8c16955d9f4..b9d4949018a 100644 --- a/tools/editor/editor_file_dialog.cpp +++ b/tools/editor/editor_file_dialog.cpp @@ -677,7 +677,7 @@ void EditorFileDialog::update_filters() { if (max_filtersadd_item(TTR("All Recognized ( ")+all_filters+" )"); + filter->add_item(TTR("All Recognized")+" ( "+all_filters+" )"); } for(int i=0;ichange_dir(".."); } else { - ERR_PRINTS(TTR("Can't go into subdir: ")+E->get()); + ERR_PRINTS(TTR("Cannot go into subdir:")+" "+E->get()); } p_progress.update(idx,total); diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp index a8cb1a57304..616037c5455 100644 --- a/tools/editor/editor_help.cpp +++ b/tools/editor/editor_help.cpp @@ -519,7 +519,7 @@ EditorHelpIndex::EditorHelpIndex() { search_box->connect("input_event", this, "_sbox_input"); class_list = memnew( Tree ); - vbc->add_margin_child(TTR("Class List: "), class_list, true); + vbc->add_margin_child(TTR("Class List:")+" ", class_list, true); class_list->set_v_size_flags(SIZE_EXPAND_FILL); class_list->connect("item_activated",this,"_tree_item_selected"); @@ -710,7 +710,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { class_desc->push_font(doc_title_font); class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); - class_desc->add_text(TTR("Class: ")); + class_desc->add_text(TTR("Class:")+" "); class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/base_type_color")); _add_text(p_class); class_desc->pop(); @@ -722,7 +722,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); class_desc->push_font(doc_title_font); - class_desc->add_text(TTR("Inherits: ")); + class_desc->add_text(TTR("Inherits:")+" "); class_desc->pop(); class_desc->pop(); @@ -756,7 +756,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { if (!found) { class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); class_desc->push_font(doc_title_font); - class_desc->add_text("Inherited by: "); + class_desc->add_text(TTR("Inherited by:")+" "); class_desc->pop(); class_desc->pop(); diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp index 91357e0f804..25dced4745e 100644 --- a/tools/editor/editor_import_export.cpp +++ b/tools/editor/editor_import_export.cpp @@ -240,12 +240,12 @@ static void _edit_files_with_filter(DirAccess *da,const List& p_filters, for(const List::Element *F=p_filters.front();F;F=F->next()) { if (fullpath.matchn(F->get())) { - String act = TTR("Added: "); + String act = TTR("Added:")+" "; if (!exclude) { r_list.insert(fullpath); } else { - act = TTR("Removed: "); + act = TTR("Removed:")+" "; r_list.erase(fullpath); } @@ -866,7 +866,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func Error err = plugin->import2(dst_file,imd,get_image_compression(),true); if (err) { - EditorNode::add_io_error(TTR("Error saving atlas! ")+dst_file.get_file()); + EditorNode::add_io_error(TTR("Error saving atlas:")+" "+dst_file.get_file()); return ERR_CANT_CREATE; } @@ -916,7 +916,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func String path = EditorSettings::get_singleton()->get_settings_path()+"/tmp/tmpatlas.atex"; Error err = ResourceSaver::save(path,atex); if (err!=OK) { - EditorNode::add_io_error(TTR("Could not save atlas subtexture: ")+path); + EditorNode::add_io_error(TTR("Could not save atlas subtexture:")+" "+path); return ERR_CANT_CREATE; } Vector data = FileAccess::get_file_as_array(path); @@ -1157,7 +1157,7 @@ Error EditorExportPlatform::save_pack_file(void *p_userdata,const String& p_path MD5Final(&ctx); pd->f->store_buffer(ctx.digest,16); } - pd->ep->step(TTR("Storing File: ")+p_path,2+p_file*100/p_total,false); + pd->ep->step(TTR("Storing File:")+" "+p_path,2+p_file*100/p_total,false); pd->count++; pd->ftmp->store_buffer(p_data.ptr(),p_data.size()); if (pd->alignment > 1) { @@ -1195,7 +1195,7 @@ Error EditorExportPlatform::save_zip_file(void *p_userdata,const String& p_path, zipWriteInFileInZip(zip,p_data.ptr(),p_data.size()); zipCloseFileInZip(zip); - zd->ep->step(TTR("Storing File: ")+p_path,2+p_file*100/p_total,false); + zd->ep->step(TTR("Storing File:")+" "+p_path,2+p_file*100/p_total,false); zd->count++; return OK; @@ -1309,7 +1309,7 @@ Error EditorExportPlatformPC::export_project(const String& p_path, bool p_debug, - EditorProgress ep("export",TTR("Exporting for ")+get_name(),102); + EditorProgress ep("export",vformat(TTR("Exporting for %s"),get_name()),102); const int BUFSIZE = 32768; diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index fc676bda7e2..7cff6dab9c6 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -432,7 +432,7 @@ void EditorNode::_rebuild_import_menu() { PopupMenu* p = import_menu->get_popup(); p->clear(); - p->add_item(TTR("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); @@ -606,15 +606,15 @@ void EditorNode::_dialog_display_file_error(String p_file,Error p_error) { case ERR_FILE_CANT_WRITE: { - accept->set_text(TTR("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(TTR("File format requested unknown: ")+p_file.extension()); + accept->set_text(TTR("Requested file format unknown:")+" "+p_file.extension()); } break; default: { - accept->set_text(TTR("Error Saving.")); + accept->set_text(TTR("Error while saving.")); }break; } @@ -1071,8 +1071,8 @@ void EditorNode::_import_action(const String& p_action) { current_option=-1; //accept->get_cancel()->hide(); - accept->get_ok()->set_text(TTR("Ugh")); - accept->set_text(TTR("Error importing scene.")); + accept->get_ok()->set_text("Ugh"); + accept->set_text("Error importing scene."); accept->popup_centered(Size2(300,70));; return; } @@ -1087,8 +1087,8 @@ void EditorNode::_import_action(const String& p_action) { memdelete(src); //accept->get_cancel()->hide(); - accept->get_ok()->set_text(TTR("Ugh")); - accept->set_text(TTR("Error load scene to update.")); + accept->get_ok()->set_text("Ugh"); + accept->set_text("Error load scene to update."); accept->popup_centered(Size2(300,70));; return; } @@ -1128,8 +1128,8 @@ void EditorNode::_import(const String &p_file) { current_option=-1; //accept->get_cancel()->hide(); - accept->get_ok()->set_text(TTR("Ugh")); - accept->set_text(TTR("Error importing scene.")); + accept->get_ok()->set_text("Ugh"); + accept->set_text("Error importing scene."); accept->popup_centered(Size2(300,70));; return; } @@ -1251,7 +1251,7 @@ void EditorNode::_dialog_action(String p_file) { current_option=-1; //accept->get_cancel()->hide(); accept->get_ok()->set_text(TTR("I see..")); - accept->set_text(TTR("Can't load MeshLibrary for merging!.")); + accept->set_text(TTR("Can't load MeshLibrary for merging!")); accept->popup_centered_minsize(); return; } @@ -1268,7 +1268,7 @@ void EditorNode::_dialog_action(String p_file) { if (err) { accept->get_ok()->set_text(TTR("I see..")); - accept->set_text(TTR("Error saving MeshLibrary!.")); + accept->set_text(TTR("Error saving MeshLibrary!")); accept->popup_centered_minsize(); return; } @@ -1286,7 +1286,7 @@ void EditorNode::_dialog_action(String p_file) { current_option=-1; //accept->get_cancel()->hide(); accept->get_ok()->set_text(TTR("I see..")); - accept->set_text(TTR("Can't load TileSet for merging!.")); + accept->set_text(TTR("Can't load TileSet for merging!")); accept->popup_centered_minsize(); return; } @@ -1304,7 +1304,7 @@ void EditorNode::_dialog_action(String p_file) { if (err) { accept->get_ok()->set_text(TTR("I see..")); - accept->set_text(TTR("Error saving TileSet!.")); + accept->set_text(TTR("Error saving TileSet!")); accept->popup_centered_minsize(); return; } @@ -1328,7 +1328,7 @@ void EditorNode::_dialog_action(String p_file) { } int ret = unzGoToFirstFile(pkg); - int fc=0; //coun them + int fc=0; //count them while(ret==UNZ_OK) { fc++; @@ -1368,7 +1368,7 @@ void EditorNode::_dialog_action(String p_file) { file=file.get_file(); - p.step(TTR("Importing: ")+file,fc); + p.step(TTR("Importing:")+" "+file,fc); print_line("IMPORT "+file); FileAccess *f = FileAccess::open(EditorSettings::get_singleton()->get_settings_path()+"/templates/"+file,FileAccess::WRITE); @@ -1454,7 +1454,7 @@ void EditorNode::_dialog_action(String p_file) { _update_layouts_menu(); if (p_file=="Default") { - show_warning(TTR("Restored Default layout to base settings.")); + show_warning(TTR("Restored default layout to base settings.")); } } break; @@ -1769,7 +1769,7 @@ void EditorNode::_edit_current() { } //p->add_separator(); - //p->add_item(TTR("All Methods"),OBJECT_CALL_METHOD); + //p->add_item("All Methods",OBJECT_CALL_METHOD); update_keying(); @@ -1832,7 +1832,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) { current_option=-1; //accept->get_cancel()->hide(); accept->get_ok()->set_text(TTR("I see..")); - accept->set_text(TTR("No scene to run exists.")); + accept->set_text(TTR("There is no defined scene to run.")); accept->popup_centered_minsize(); return; } @@ -1896,7 +1896,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) { current_option=-1; //accept->get_cancel()->hide(); accept->get_ok()->set_text(TTR("I see..")); - accept->set_text(TTR("Current scene was never saved, please save scene before running.")); + accept->set_text(TTR("Current scene was never saved, please save it prior to running.")); accept->popup_centered_minsize(); return; } @@ -1998,11 +1998,12 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { switch( p_option ) { case FILE_NEW_SCENE: { + // TODO: Drop such obsolete commented code /* if (!p_confirmed) { - confirmation->get_ok()->set_text(TTR("Yes")); + confirmation->get_ok()->set_text("Yes"); //confirmation->get_cancel()->show(); - confirmation->set_text(TTR("Start a New Scene? (Current will be lost)")); + confirmation->set_text("Start a New Scene? (Current will be lost)"); confirmation->popup_centered_minsize(); break; }*/ @@ -2058,7 +2059,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { //quick_open->popup("Resource", false, true); - //quick_open->set_title(TTR("Quick Search File..")); + //quick_open->set_title("Quick Search File.."); scenes_dock->focus_on_filter(); } break; @@ -2221,7 +2222,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { current_option=-1; //confirmation->get_cancel()->hide(); - accept->get_ok()->set_text(TTR("I see..")); + accept->get_ok()->set_text("I see.."); accept->set_text("This operation can't be done without a tree root."); accept->popup_centered(Size2(300,70));; break; @@ -2243,8 +2244,8 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { } else { current_option=-1; //confirmation->get_cancel()->hide(); - accept->get_ok()->set_text(TTR("I see..")); - accept->set_text(TTR("Please save the scene first.")); + accept->get_ok()->set_text("I see.."); + accept->set_text("Please save the scene first."); accept->popup_centered(Size2(300,70));; break; @@ -2259,7 +2260,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { String target = export_db->get_current_platform(); Ref exporter = export_db->get_exporter(target); if (exporter.is_null()) { - accept->set_text(TTR("No exporter for platform '")+target+"' yet."); + accept->set_text("No exporter for platform '"+target+"' yet."); accept->popup_centered(Size2(300,70));; return; } @@ -2343,7 +2344,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { confirmation->get_ok()->set_text(TTR("Quit")); //confirmation->get_cancel()->show(); - confirmation->set_text(TTR("Exit the Editor?")); + confirmation->set_text(TTR("Exit the editor?")); confirmation->popup_centered(Size2(180,70)); break; } @@ -2411,7 +2412,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { String filename = scene->get_filename(); if (filename==String()) { - show_warning(TTR("Can't reload a scene that was never saved..")); + show_warning(TTR("Can't reload a scene that was never saved.")); break; } @@ -2440,7 +2441,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { current_option=-1; //accept->get_cancel()->hide(); - accept->get_ok()->set_text(TTR("I see..")); + accept->get_ok()->set_text("I see.."); accept->set_text("This operation can't be done without a selected node."); accept->popup_centered(Size2(300,70));; break; @@ -2452,7 +2453,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { current_option=-1; //confirmation->get_cancel()->hide(); - accept->get_ok()->set_text(TTR("I see..")); + accept->get_ok()->set_text("I see.."); accept->set_text("This operation can't be done without a selected node."); accept->popup_centered(Size2(300,70));; break; @@ -2464,8 +2465,8 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { current_option=-1; //accept->get_cancel()->hide(); - accept->get_ok()->set_text(TTR("Ugh")); - accept->set_text(String(TTR("Error loading scene from "))+external_file); + accept->get_ok()->set_text("Ugh"); + accept->set_text("Error loading scene from "+external_file); accept->popup_centered(Size2(300,70));; return; } @@ -2473,7 +2474,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { instanced_scene->generate_instance_state(); instanced_scene->set_filename( Globals::get_singleton()->localize_path(external_file) ); - editor_data.get_undo_redo().create_action(TTR("Instance Scene")); + editor_data.get_undo_redo().create_action("Instance Scene"); editor_data.get_undo_redo().add_do_method(parent,"add_child",instanced_scene); editor_data.get_undo_redo().add_do_method(instanced_scene,"set_owner",edited_scene); editor_data.get_undo_redo().add_do_reference(instanced_scene); @@ -2708,11 +2709,11 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { if (ischecked) { file_server->stop(); //debug_button->set_icon(gui_base->get_icon("FileServer","EditorIcons")); - //debug_button->get_popup()->set_item_text( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),TTR("Enable File Server")); + //debug_button->get_popup()->set_item_text( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),"Enable File Server"); } else { file_server->start(); //debug_button->set_icon(gui_base->get_icon("FileServerActive","EditorIcons")); - //debug_button->get_popup()->set_item_text( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),TTR("Disable File Server")); + //debug_button->get_popup()->set_item_text( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),"Disable File Server"); } debug_button->get_popup()->set_item_checked( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),!ischecked); @@ -2824,9 +2825,9 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { if (!p_confirmed) { - confirmation->get_ok()->set_text(TTR("Open")); + confirmation->get_ok()->set_text("Open"); //confirmation->get_cancel()->show(); - confirmation->set_text(TTR("Current scene changed, save and re-import ?")); + confirmation->set_text("Current scene changed, save and re-import ?"); confirmation->popup_centered(Size2(300,70)); break; @@ -2839,8 +2840,8 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { current_option=-1; //accept->get_cancel()->hide(); - accept->get_ok()->set_text(TTR("I see..")); - accept->set_text(TTR("Can't import if edited scene was not saved.")); //i dont think this code will ever run + accept->get_ok()->set_text("I see.."); + accept->set_text("Can't import if edited scene was not saved."); //i dont think this code will ever run accept->popup_centered(Size2(300,70));; break; @@ -3256,7 +3257,7 @@ Error EditorNode::save_optimized_copy(const String& p_scene,const String& p_pres if (!get_edited_scene()) { get_scene()->quit(); - ERR_EXPLAIN(TTR("No scene to optimize (loading failed?")); + ERR_EXPLAIN("No scene to optimize (loading failed?)"); ERR_FAIL_V(ERR_FILE_NOT_FOUND); } @@ -3281,10 +3282,10 @@ Error EditorNode::save_optimized_copy(const String& p_scene,const String& p_pres if (!Globals::get_singleton()->has(preset)) { //accept->"()->hide(); - accept->get_ok()->set_text(TTR("I see..")); - accept->set_text(TTR("Optimizer preset not found: ")+p_preset); + accept->get_ok()->set_text("I see.."); + accept->set_text("Optimizer preset not found: "+p_preset); accept->popup_centered(Size2(300,70));; - ERR_EXPLAIN(TTR("Optimizer preset not found: ")+p_preset); + ERR_EXPLAIN("Optimizer preset not found: "+p_preset); ERR_FAIL_V(ERR_INVALID_PARAMETER); } @@ -3304,7 +3305,7 @@ Error EditorNode::save_optimized_copy(const String& p_scene,const String& p_pres } } - ERR_EXPLAIN(TTR("Preset '")+p_preset+"' references nonexistent saver: "+type); + ERR_EXPLAIN("Preset '"+p_preset+"' references nonexistent saver: "+type); ERR_FAIL_COND_V(saver.is_null(),ERR_INVALID_DATA); List keys; @@ -3339,8 +3340,8 @@ Error EditorNode::save_optimized_copy(const String& p_scene,const String& p_pres current_option=-1; //accept->get_cancel()->hide(); - accept->get_ok()->set_text(TTR("I see..")); - accept->set_text(TTR("Couldn't save scene. Likely dependencies (instances) couldn't be satisfied.")); + accept->get_ok()->set_text("I see.."); + accept->set_text("Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."); accept->popup_centered(Size2(300,70));; return ERR_INVALID_DATA; @@ -3350,8 +3351,8 @@ Error EditorNode::save_optimized_copy(const String& p_scene,const String& p_pres if (err) { //accept->"()->hide(); - accept->get_ok()->set_text(TTR("I see..")); - accept->set_text(TTR("Error saving optimized scene: ")+path); + accept->get_ok()->set_text("I see.."); + accept->set_text("Error saving optimized scene: "+path); accept->popup_centered(Size2(300,70));; ERR_FAIL_COND_V(err,err); @@ -3640,7 +3641,7 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo for (Map >::Element *E=dependency_errors.front();E;E=E->next()) { - String txt=TTR("Scene '")+E->key()+"' has broken dependencies:\n"; + String txt=vformat(TTR("Scene '%s' has broken dependencies:"),E->key())+"\n"; for(Set::Element *F=E->get().front();F;F=F->next()) { txt+="\t"+F->get()+"\n"; } @@ -3921,8 +3922,8 @@ void EditorNode::_save_optimized() { if (err) { //accept->"()->hide(); - accept->get_ok()->set_text(TTR("I see..")); - accept->set_text(TTR("Error saving optimized scene: ")+path); + accept->get_ok()->set_text("I see.."); + accept->set_text("Error saving optimized scene: "+path); accept->popup_centered(Size2(300,70));; return; @@ -4954,7 +4955,7 @@ Variant EditorNode::drag_files(const Vector& p_files, Control *p_from){ if (p_files.size()>max_files) { Label* label=memnew( Label ); - label->set_text(itos(p_files.size()-max_files)+" "+TTR("More File(s)")); + label->set_text(vformat(TTR("%i more file(s)"), p_files.size()-max_files)); files->add_child(label); } @@ -4985,7 +4986,7 @@ Variant EditorNode::drag_files_and_dirs(const Vector& p_files, Control * if (p_files.size()>max_files) { Label* label=memnew( Label ); - label->set_text(itos(p_files.size()-max_files)+" "+TTR("More File(s) and/or Directory(s)")); + label->set_text(vformat(TTR("%i more file(s) or folder(s)"), p_files.size()-max_files)); files->add_child(label); } @@ -5156,7 +5157,7 @@ EditorNode::EditorNode() { ObjectTypeDB::set_type_enabled("CollisionShape",true); ObjectTypeDB::set_type_enabled("CollisionShape2D",true); ObjectTypeDB::set_type_enabled("CollisionPolygon2D",true); - //ObjectTypeDB::set_type_enabled(TTR("BodyVolumeConvexPolygon"),true); + //ObjectTypeDB::set_type_enabled("BodyVolumeConvexPolygon",true); gui_base = memnew( Panel ); add_child(gui_base); @@ -5517,20 +5518,20 @@ EditorNode::EditorNode() { menu_panel->add_child( node_menu ); p=node_menu->get_popup(); - p->add_item(TTR("Create"),NODE_CREATE); - p->add_item(TTR("Instance"),NODE_INSTANCE); + p->add_item("Create",NODE_CREATE); + p->add_item("Instance",NODE_INSTANCE); p->add_separator(); - p->add_item(TTR("Reparent"),NODE_REPARENT); - p->add_item(TTR("Move Up"),NODE_MOVE_UP); - p->add_item(TTR("Move Down"),NODE_MOVE_DOWN); + p->add_item("Reparent",NODE_REPARENT); + p->add_item("Move Up",NODE_MOVE_UP); + p->add_item("Move Down",NODE_MOVE_DOWN); p->add_separator(); - p->add_item(TTR("Duplicate"),NODE_DUPLICATE); + p->add_item("Duplicate",NODE_DUPLICATE); p->add_separator(); - p->add_item(TTR("Remove (Branch)"),NODE_REMOVE_BRANCH); - p->add_item(TTR("Remove (Element)"),NODE_REMOVE_ELEMENT); + p->add_item("Remove (Branch)",NODE_REMOVE_BRANCH); + p->add_item("Remove (Element)",NODE_REMOVE_ELEMENT); p->add_separator(); - p->add_item(TTR("Edit Subscriptions.."),NODE_CONNECTIONS); - p->add_item(TTR("Edit Groups.."),NODE_GROUPS); + p->add_item("Edit Subscriptions..",NODE_CONNECTIONS); + p->add_item("Edit Groups..",NODE_GROUPS); resource_menu = memnew( MenuButton ); resource_menu->set_text("Resource"); @@ -5548,7 +5549,7 @@ EditorNode::EditorNode() { p->connect("item_pressed",this,"_menu_option"); tool_menu = memnew( MenuButton ); - tool_menu->set_tooltip(TTR("Miscelaneous project or scene wide tools.")); + tool_menu->set_tooltip(TTR("Miscellaneous project or scene-wide tools.")); tool_menu->set_text(TTR("Tools")); //tool_menu->set_icon(gui_base->get_icon("Save","EditorIcons")); @@ -5603,7 +5604,7 @@ EditorNode::EditorNode() { pause_button->set_icon(gui_base->get_icon("Pause","EditorIcons")); pause_button->set_focus_mode(Control::FOCUS_NONE); pause_button->connect("pressed", this,"_menu_option",make_binds(RUN_PAUSE)); - pause_button->set_tooltip(TTR("Pause the scene (F7).")); + pause_button->set_tooltip("Pause the scene (F7)."); */ stop_button = memnew( ToolButton ); play_hb->add_child(stop_button); @@ -5639,7 +5640,7 @@ EditorNode::EditorNode() { play_custom_scene_button->set_focus_mode(Control::FOCUS_NONE); play_custom_scene_button->set_icon(gui_base->get_icon("PlayCustom","EditorIcons")); play_custom_scene_button->connect("pressed", this,"_menu_option",make_binds(RUN_PLAY_CUSTOM_SCENE)); - play_custom_scene_button->set_tooltip(TTR("Play custom scene (")+keycode_get_string(KEY_MASK_CMD|KEY_MASK_SHIFT|KEY_F5)+")."); + play_custom_scene_button->set_tooltip(TTR("Play custom scene")+" ("+keycode_get_string(KEY_MASK_CMD|KEY_MASK_SHIFT|KEY_F5)+")."); debug_button = memnew( MenuButton ); debug_button->set_flat(true); @@ -5648,7 +5649,7 @@ EditorNode::EditorNode() { debug_button->set_focus_mode(Control::FOCUS_NONE); debug_button->set_icon(gui_base->get_icon("Remote","EditorIcons")); //debug_button->connect("pressed", this,"_menu_option",make_binds(RUN_LIVE_DEBUG)); - debug_button->set_tooltip(TTR("Debug Options")); + debug_button->set_tooltip(TTR("Debug options")); p=debug_button->get_popup(); p->add_check_item(TTR("Live Editing"),RUN_LIVE_DEBUG); @@ -5726,9 +5727,9 @@ EditorNode::EditorNode() { right_menu_hb->add_child( settings_menu ); p=settings_menu->get_popup(); - //p->add_item(TTR("Export Settings"),SETTINGS_EXPORT_PREFERENCES); + //p->add_item("Export Settings",SETTINGS_EXPORT_PREFERENCES); p->add_item(TTR("Editor Settings"),SETTINGS_PREFERENCES); - //p->add_item(TTR("Optimization Presets"),SETTINGS_OPTIMIZED_PRESETS); + //p->add_item("Optimization Presets",SETTINGS_OPTIMIZED_PRESETS); p->add_separator(); editor_layouts = memnew( PopupMenu ); editor_layouts->set_name("Layouts"); @@ -5786,7 +5787,7 @@ EditorNode::EditorNode() { dock_slot[DOCK_SLOT_LEFT_UR]->add_child(scene_tree_dock); #if 0 resources_dock = memnew( ResourcesDock(this) ); - resources_dock->set_name(TTR("Resources")); + resources_dock->set_name("Resources"); //top_pallete->add_child(resources_dock); dock_slot[DOCK_SLOT_RIGHT_BL]->add_child(resources_dock); //top_pallete->set_v_size_flags(Control::SIZE_EXPAND_FILL); @@ -5820,21 +5821,21 @@ EditorNode::EditorNode() { prop_editor_base->add_child(prop_editor_hb); resource_new_button = memnew( ToolButton ); - resource_new_button->set_tooltip(TTR("Create a new resource in memory and edit it")); + resource_new_button->set_tooltip(TTR("Create a new resource in memory and edit it.")); resource_new_button->set_icon(gui_base->get_icon("New","EditorIcons")); prop_editor_hb->add_child(resource_new_button); resource_new_button->connect("pressed",this,"_menu_option",varray(RESOURCE_NEW)); resource_new_button->set_focus_mode(Control::FOCUS_NONE); resource_load_button = memnew( ToolButton ); - resource_load_button->set_tooltip(TTR("Load an existing resource from disk and edit it")); + resource_load_button->set_tooltip(TTR("Load an existing resource from disk and edit it.")); resource_load_button->set_icon(gui_base->get_icon("Load","EditorIcons")); prop_editor_hb->add_child(resource_load_button); resource_load_button->connect("pressed",this,"_menu_option",varray(RESOURCE_LOAD)); resource_load_button->set_focus_mode(Control::FOCUS_NONE); resource_save_button = memnew( MenuButton ); - resource_save_button->set_tooltip(TTR("Save the currently edited resource")); + resource_save_button->set_tooltip(TTR("Save the currently edited resource.")); resource_save_button->set_icon(gui_base->get_icon("Save","EditorIcons")); prop_editor_hb->add_child(resource_save_button); resource_save_button->get_popup()->add_item(TTR("Save"),RESOURCE_SAVE); @@ -5863,7 +5864,7 @@ EditorNode::EditorNode() { editor_history_menu = memnew( MenuButton ); - editor_history_menu->set_tooltip(TTR("History of recently edited objects")); + editor_history_menu->set_tooltip(TTR("History of recently edited objects.")); editor_history_menu->set_icon( gui_base->get_icon("History","EditorIcons")); prop_editor_hb->add_child(editor_history_menu); editor_history_menu->connect("about_to_show",this,"_prepare_history"); @@ -5899,7 +5900,7 @@ EditorNode::EditorNode() { prop_editor_base->add_child(search_bar); search_bar->hide(); - Label *l = memnew( Label(TTR("Search: ")) ); + Label *l = memnew( Label(TTR("Search:")+" ") ); search_bar->add_child(l); search_box = memnew( LineEdit ); @@ -6084,7 +6085,7 @@ EditorNode::EditorNode() { about = memnew( AcceptDialog ); - about->set_title(TTR("Thanks so Much!")); + about->set_title(TTR("Thanks from the Godot community!")); //about->get_cancel()->hide(); about->get_ok()->set_text(TTR("Thanks!")); about->set_hide_on_ok(true); @@ -6104,7 +6105,7 @@ EditorNode::EditorNode() { file_templates = memnew( FileDialog ); - file_templates->set_title(TTR("Import Templates from ZIP file")); + file_templates->set_title(TTR("Import Templates From ZIP File")); gui_base->add_child( file_templates ); file_templates->set_mode(FileDialog::MODE_OPEN_FILE); diff --git a/tools/editor/editor_reimport_dialog.cpp b/tools/editor/editor_reimport_dialog.cpp index 244642b7a69..b6311a76040 100644 --- a/tools/editor/editor_reimport_dialog.cpp +++ b/tools/editor/editor_reimport_dialog.cpp @@ -32,7 +32,7 @@ void EditorReImportDialog::popup_reimport() { if (EditorFileSystem::get_singleton()->is_scanning()) { - error->set_text(TTR("Please wait for scan to complete")); + error->set_text(TTR("Please wait for scan to complete.")); error->popup_centered_minsize(); return; } @@ -92,7 +92,7 @@ void EditorReImportDialog::popup_reimport() { void EditorReImportDialog::ok_pressed() { if (EditorFileSystem::get_singleton()->is_scanning()) { - error->set_text(TTR("Please wait for scan to complete")); + error->set_text(TTR("Please wait for scan to complete.")); error->popup_centered_minsize(); return; } diff --git a/tools/editor/editor_run_script.cpp b/tools/editor/editor_run_script.cpp index 65aaf3d7342..d34cac1530a 100644 --- a/tools/editor/editor_run_script.cpp +++ b/tools/editor/editor_run_script.cpp @@ -9,12 +9,12 @@ void EditorScript::add_root_node(Node *p_node) { if (!editor) { - EditorNode::add_io_error(TTR("EditorScript::add_root_node : Write your logic in the _run() method.")); + EditorNode::add_io_error("EditorScript::add_root_node: "+TTR("Write your logic in the _run() method.")); return; } if (editor->get_edited_scene()) { - EditorNode::add_io_error(TTR("EditorScript::add_root_node : There is an edited scene already.")); + EditorNode::add_io_error("EditorScript::add_root_node: "+TTR("There is an edited scene already.")); return; } @@ -24,7 +24,7 @@ void EditorScript::add_root_node(Node *p_node) { Node *EditorScript::get_scene() { if (!editor) { - EditorNode::add_io_error(TTR("EditorScript::get_scene : Write your logic in the _run() method.")); + EditorNode::add_io_error("EditorScript::get_scene: "+TTR("Write your logic in the _run() method.")); return NULL; } @@ -36,7 +36,7 @@ void EditorScript::_run() { Ref