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/addon_editor_plugin.cpp | 12 +- tools/editor/animation_editor.cpp | 166 ++++---- tools/editor/array_property_edit.cpp | 6 +- tools/editor/call_dialog.cpp | 14 +- tools/editor/code_editor.cpp | 40 +- tools/editor/connections_dialog.cpp | 54 +-- tools/editor/create_dialog.cpp | 16 +- tools/editor/dependency_editor.cpp | 58 +-- tools/editor/editor_data.cpp | 6 +- tools/editor/editor_dir_dialog.cpp | 12 +- tools/editor/editor_file_dialog.cpp | 42 +- tools/editor/editor_file_system.cpp | 14 +- tools/editor/editor_help.cpp | 42 +- tools/editor/editor_import_export.cpp | 44 +- tools/editor/editor_log.cpp | 2 +- tools/editor/editor_node.cpp | 452 ++++++++++----------- tools/editor/editor_plugin_settings.cpp | 4 +- tools/editor/editor_reimport_dialog.cpp | 16 +- tools/editor/editor_run_script.cpp | 6 +- tools/editor/editor_settings.cpp | 12 +- tools/editor/editor_sub_scene.cpp | 6 +- tools/editor/file_type_cache.cpp | 2 +- tools/editor/fileserver/editor_file_server.cpp | 10 +- tools/editor/groups_editor.cpp | 14 +- tools/editor/import_settings.cpp | 16 +- .../io_plugins/editor_font_import_plugin.cpp | 44 +- .../io_plugins/editor_mesh_import_plugin.cpp | 18 +- .../io_plugins/editor_sample_import_plugin.cpp | 28 +- .../io_plugins/editor_scene_import_plugin.cpp | 180 ++++---- .../io_plugins/editor_scene_importer_fbxconv.cpp | 46 +-- .../io_plugins/editor_texture_import_plugin.cpp | 146 +++---- .../editor_translation_import_plugin.cpp | 34 +- tools/editor/multi_node_edit.cpp | 2 +- .../plugins/animation_player_editor_plugin.cpp | 110 ++--- .../plugins/animation_player_editor_plugin.h | 2 +- .../plugins/animation_tree_editor_plugin.cpp | 82 ++-- .../editor/plugins/animation_tree_editor_plugin.h | 2 +- tools/editor/plugins/baked_light_baker.cpp | 28 +- tools/editor/plugins/baked_light_editor_plugin.cpp | 12 +- tools/editor/plugins/camera_editor_plugin.cpp | 2 +- tools/editor/plugins/canvas_item_editor_plugin.cpp | 126 +++--- .../plugins/collision_polygon_2d_editor_plugin.cpp | 14 +- .../plugins/collision_polygon_editor_plugin.cpp | 12 +- .../plugins/collision_shape_2d_editor_plugin.cpp | 2 +- tools/editor/plugins/color_ramp_editor_plugin.cpp | 4 +- tools/editor/plugins/control_editor_plugin.cpp | 12 +- tools/editor/plugins/control_editor_plugin.h | 2 +- .../plugins/cube_grid_theme_editor_plugin.cpp | 18 +- tools/editor/plugins/item_list_editor_plugin.cpp | 12 +- .../plugins/light_occluder_2d_editor_plugin.cpp | 18 +- tools/editor/plugins/mesh_editor_plugin.cpp | 42 +- tools/editor/plugins/multimesh_editor_plugin.cpp | 60 +-- .../plugins/navigation_polygon_editor_plugin.cpp | 18 +- .../editor/plugins/particles_2d_editor_plugin.cpp | 14 +- tools/editor/plugins/particles_editor_plugin.cpp | 28 +- tools/editor/plugins/path_2d_editor_plugin.cpp | 28 +- tools/editor/plugins/path_editor_plugin.cpp | 20 +- tools/editor/plugins/polygon_2d_editor_plugin.cpp | 50 +-- .../plugins/resource_preloader_editor_plugin.cpp | 36 +- tools/editor/plugins/rich_text_editor_plugin.cpp | 6 +- tools/editor/plugins/rich_text_editor_plugin.h | 2 +- tools/editor/plugins/sample_editor_plugin.cpp | 2 +- .../plugins/sample_library_editor_plugin.cpp | 30 +- .../editor/plugins/sample_player_editor_plugin.cpp | 2 +- tools/editor/plugins/script_editor_plugin.cpp | 127 +++--- tools/editor/plugins/shader_editor_plugin.cpp | 32 +- .../editor/plugins/shader_graph_editor_plugin.cpp | 382 ++++++++--------- tools/editor/plugins/spatial_editor_plugin.cpp | 174 ++++---- .../editor/plugins/sprite_frames_editor_plugin.cpp | 56 +-- .../editor/plugins/sprite_region_editor_plugin.cpp | 16 +- tools/editor/plugins/sprite_region_editor_plugin.h | 2 +- tools/editor/plugins/stream_editor_plugin.h | 2 +- tools/editor/plugins/style_box_editor_plugin.cpp | 2 +- tools/editor/plugins/theme_editor_plugin.cpp | 64 +-- tools/editor/plugins/tile_map_editor_plugin.cpp | 22 +- tools/editor/plugins/tile_set_editor_plugin.cpp | 20 +- tools/editor/project_export.cpp | 190 ++++----- tools/editor/project_manager.cpp | 84 ++-- tools/editor/project_settings.cpp | 192 ++++----- tools/editor/property_editor.cpp | 80 ++-- tools/editor/pvrtc_compress.cpp | 6 +- tools/editor/quick_open.cpp | 6 +- tools/editor/reparent_dialog.cpp | 12 +- tools/editor/resources_dock.cpp | 20 +- tools/editor/run_settings_dialog.cpp | 14 +- tools/editor/scene_tree_dock.cpp | 90 ++-- tools/editor/scene_tree_editor.cpp | 32 +- tools/editor/scenes_dock.cpp | 46 +-- tools/editor/script_create_dialog.cpp | 46 +-- tools/editor/script_editor_debugger.cpp | 74 ++-- tools/editor/settings_config_dialog.cpp | 18 +- tools/editor/spatial_editor_gizmos.cpp | 36 +- 92 files changed, 2102 insertions(+), 2103 deletions(-) (limited to 'tools') diff --git a/tools/editor/addon_editor_plugin.cpp b/tools/editor/addon_editor_plugin.cpp index 4dfb8ff553..3b74330c1e 100644 --- a/tools/editor/addon_editor_plugin.cpp +++ b/tools/editor/addon_editor_plugin.cpp @@ -257,7 +257,7 @@ EditorAddonLibraryItemDescription::EditorAddonLibraryItemDescription() { previews->add_child(preview_hb); get_ok()->set_text("Install"); - get_cancel()->set_text("Close"); + get_cancel()->set_text(TTR("Close")); @@ -1085,24 +1085,24 @@ EditorAddonLibrary::EditorAddonLibrary() { - search_hb->add_child( memnew( Label("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); filter->connect("text_entered",this,"_search"); - search = memnew( Button("Search")); + search = memnew( Button(TTR("Search"))); search->connect("pressed",this,"_search"); search_hb->add_child(search); search_hb->add_child(memnew( VSeparator )); Button * open_asset = memnew( Button ); - open_asset->set_text("Import"); + open_asset->set_text(TTR("Import")); search_hb->add_child(open_asset); open_asset->connect("pressed",this,"_asset_open"); Button * plugins = memnew( Button ); - plugins->set_text("Plugins"); + plugins->set_text(TTR("Plugins")); search_hb->add_child(plugins); plugins->connect("pressed",this,"_manage_plugins"); @@ -1142,7 +1142,7 @@ EditorAddonLibrary::EditorAddonLibrary() { search_hb2->add_child( memnew( Label("Site: "))); repository = memnew( OptionButton ); - repository->add_item("Godot"); + repository->add_item(TTR("Godot")); search_hb2->add_child(repository); repository->set_h_size_flags(SIZE_EXPAND_FILL); diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp index 091bc701cc..f4fda7ba6e 100644 --- a/tools/editor/animation_editor.cpp +++ b/tools/editor/animation_editor.cpp @@ -148,9 +148,9 @@ private: String txt=String::num(exp,2); if (mode==MODE_DISABLED) { - txt="Disabled"; + txt=TTR("Disabled"); } else if (mode==MODE_MULTIPLE) { - txt+=" - All Selection"; + txt+=" - "+TTR("All Selection"); } f->draw(ci,Point2(10,10+f->get_ascent()),txt,color); @@ -317,7 +317,7 @@ public: int existing = animation->track_find_key(track,new_time,true); setting=true; - undo_redo->create_action("Move Add Key",false); + undo_redo->create_action(TTR("Move Add Key"),false); Variant val = animation->track_get_key_value(track,key); float trans = animation->track_get_key_transition(track,key); @@ -345,7 +345,7 @@ public: float val = p_value; float prev_val = animation->track_get_key_transition(track,key); setting=true; - undo_redo->create_action("Anim Change Transition",true); + undo_redo->create_action(TTR("Anim Change Transition"),true); undo_redo->add_do_method(animation.ptr(),"track_set_key_transition",track,key,val); undo_redo->add_undo_method(animation.ptr(),"track_set_key_transition",track,key,prev_val); undo_redo->add_do_method(this,"_update_obj",animation); @@ -366,7 +366,7 @@ public: Dictionary d_new = d_old; d_new[p_name]=p_value; setting=true; - undo_redo->create_action("Anim Change Transform"); + undo_redo->create_action(TTR("Anim Change Transform")); undo_redo->add_do_method(animation.ptr(),"track_set_key_value",track,key,d_new); undo_redo->add_undo_method(animation.ptr(),"track_set_key_value",track,key,d_old); undo_redo->add_do_method(this,"_update_obj",animation); @@ -388,7 +388,7 @@ public: } setting=true; - undo_redo->create_action("Anim Change Value",true); + undo_redo->create_action(TTR("Anim Change Value"),true); Variant prev = animation->track_get_key_value(track,key); undo_redo->add_do_method(animation.ptr(),"track_set_key_value",track,key,value); undo_redo->add_undo_method(animation.ptr(),"track_set_key_value",track,key,prev); @@ -464,7 +464,7 @@ public: } } - undo_redo->create_action("Anim Change Call",mergeable); + undo_redo->create_action(TTR("Anim Change Call"),mergeable); Variant prev = animation->track_get_key_value(track,key); setting=true; undo_redo->add_do_method(animation.ptr(),"track_set_key_value",track,key,d_new); @@ -683,7 +683,7 @@ void AnimationKeyEditor::_menu_add_track(int p_type) { case ADD_TRACK_MENU_ADD_VALUE_TRACK: case ADD_TRACK_MENU_ADD_TRANSFORM_TRACK: { - undo_redo->create_action("Anim Add Track"); + undo_redo->create_action(TTR("Anim Add Track")); undo_redo->add_do_method(animation.ptr(),"add_track",p_type); undo_redo->add_do_method(animation.ptr(),"track_set_path",animation->get_track_count(),"."); undo_redo->add_undo_method(animation.ptr(),"remove_track",animation->get_track_count()); @@ -711,7 +711,7 @@ void AnimationKeyEditor::_menu_track(int p_type) { int idx=selected_track; if (idx>0 && idxget_track_count()) { - undo_redo->create_action("Move Anim Track Up"); + undo_redo->create_action(TTR("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(); @@ -724,7 +724,7 @@ void AnimationKeyEditor::_menu_track(int p_type) { int idx=selected_track; if (idx>=0 && idxget_track_count()-1) { - undo_redo->create_action("Move Anim Track Down"); + undo_redo->create_action(TTR("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(); @@ -736,7 +736,7 @@ void AnimationKeyEditor::_menu_track(int p_type) { int idx=selected_track; if (idx>=0 && idxget_track_count()) { - undo_redo->create_action("Remove Anim Track"); + undo_redo->create_action(TTR("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)); @@ -792,7 +792,7 @@ void AnimationKeyEditor::_menu_track(int p_type) { int start_track = p_type==TRACK_MENU_DUPLICATE_TRANSPOSE ? selected_track : top_track; - undo_redo->create_action("Anim Duplicate Keys"); + undo_redo->create_action(TTR("Anim Duplicate Keys")); List > new_selection_values; @@ -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("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()) { @@ -1045,7 +1045,7 @@ void AnimationKeyEditor::_cleanup_animation(Ref p_animation) { void AnimationKeyEditor::_animation_optimize() { - print_line("OPTIMIZE!"); + animation->optimize(optimize_linear_error->get_val(),optimize_angular_error->get_val(),optimize_max_angle->get_val()); track_editor->update(); undo_redo->clear_history(); @@ -1599,7 +1599,7 @@ void AnimationKeyEditor::_track_editor_draw() { void AnimationKeyEditor::_track_name_changed(const String& p_name) { ERR_FAIL_COND(!animation.is_valid()); - undo_redo->create_action("Anim Track Rename"); + undo_redo->create_action(TTR("Anim Track Rename")); undo_redo->add_do_method(animation.ptr(),"track_set_path",track_name_editing,p_name); undo_redo->add_undo_method(animation.ptr(),"track_set_path",track_name_editing,animation->track_get_path(track_name_editing)); undo_redo->commit_action(); @@ -1615,7 +1615,7 @@ void AnimationKeyEditor::_track_menu_selected(int p_idx) { if (interp_editing!=-1) { ERR_FAIL_INDEX(interp_editing,animation->get_track_count()); - undo_redo->create_action("Anim Track Change Interpolation"); + undo_redo->create_action(TTR("Anim Track Change Interpolation")); undo_redo->add_do_method(animation.ptr(),"track_set_interpolation_type",interp_editing,p_idx); undo_redo->add_undo_method(animation.ptr(),"track_set_interpolation_type",interp_editing,animation->track_get_interpolation_type(interp_editing)); undo_redo->commit_action(); @@ -1625,7 +1625,7 @@ void AnimationKeyEditor::_track_menu_selected(int p_idx) { ERR_FAIL_INDEX(cont_editing,animation->get_track_count()); - undo_redo->create_action("Anim Track Change Value Mode"); + undo_redo->create_action(TTR("Anim Track Change Value Mode")); undo_redo->add_do_method(animation.ptr(),"value_track_set_continuous",cont_editing,p_idx); undo_redo->add_undo_method(animation.ptr(),"value_track_set_continuous",cont_editing,animation->value_track_is_continuous(cont_editing)); undo_redo->commit_action(); @@ -1717,9 +1717,9 @@ void AnimationKeyEditor::_curve_transition_changed(float p_what) { if (selection.size()==0) return; if (selection.size()==1) - undo_redo->create_action("Edit Node Curve",true); + undo_redo->create_action(TTR("Edit Node Curve"),true); else - undo_redo->create_action("Edit Selection Curve",true); + undo_redo->create_action(TTR("Edit Selection Curve"),true); for(Map::Element *E=selection.front();E;E=E->next()) { @@ -1862,7 +1862,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) { } else if (p_input.key.scancode==KEY_DELETE && p_input.key.pressed && click.click==ClickOver::CLICK_NONE) { if (selection.size()) { - undo_redo->create_action("Anim Delete Keys"); + undo_redo->create_action(TTR("Anim Delete Keys")); 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("Remove Anim Track"); + undo_redo->create_action(TTR("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("Move Anim Track Down"); + undo_redo->create_action(TTR("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("Move Anim Track Up"); + undo_redo->create_action(TTR("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(); @@ -2254,7 +2254,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) { } - undo_redo->create_action("Anim Add Key"); + undo_redo->create_action(TTR("Anim Add Key")); undo_redo->add_do_method(animation.ptr(),"track_insert_key",idx,pos,newval,1); undo_redo->add_undo_method(animation.ptr(),"track_remove_key_at_pos",idx,pos); @@ -2419,7 +2419,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) { - undo_redo->create_action("Anim Move Keys"); + undo_redo->create_action(TTR("Anim Move Keys")); List<_AnimMoveRestore> to_restore; @@ -2872,31 +2872,31 @@ void AnimationKeyEditor::_notification(int p_what) { menu_add_track->get_popup()->add_icon_item(get_icon("KeyCall","EditorIcons"),"Add Call Func Track",ADD_TRACK_MENU_ADD_CALL_TRACK); menu_track->set_icon(get_icon("Tools","EditorIcons")); - menu_track->get_popup()->add_item("Scale Selection",TRACK_MENU_SCALE); - menu_track->get_popup()->add_item("Scale From Cursor",TRACK_MENU_SCALE_PIVOT); + menu_track->get_popup()->add_item(TTR("Scale Selection"),TRACK_MENU_SCALE); + menu_track->get_popup()->add_item(TTR("Scale From Cursor"),TRACK_MENU_SCALE_PIVOT); menu_track->get_popup()->add_separator(); - menu_track->get_popup()->add_item("Duplicate Selection",TRACK_MENU_DUPLICATE); - menu_track->get_popup()->add_item("Duplicate Transposed",TRACK_MENU_DUPLICATE_TRANSPOSE); + menu_track->get_popup()->add_item(TTR("Duplicate Selection"),TRACK_MENU_DUPLICATE); + menu_track->get_popup()->add_item(TTR("Duplicate Transposed"),TRACK_MENU_DUPLICATE_TRANSPOSE); menu_track->get_popup()->add_separator(); - menu_track->get_popup()->add_item("Goto Next Step",TRACK_MENU_NEXT_STEP,KEY_MASK_CMD|KEY_RIGHT); - menu_track->get_popup()->add_item("Goto Prev Step",TRACK_MENU_PREV_STEP,KEY_MASK_CMD|KEY_LEFT); + menu_track->get_popup()->add_item(TTR("Goto Next Step"),TRACK_MENU_NEXT_STEP,KEY_MASK_CMD|KEY_RIGHT); + menu_track->get_popup()->add_item(TTR("Goto Prev Step"),TRACK_MENU_PREV_STEP,KEY_MASK_CMD|KEY_LEFT); menu_track->get_popup()->add_separator(); PopupMenu *tpp = memnew( PopupMenu ); - tpp->add_item("Linear",TRACK_MENU_SET_ALL_TRANS_LINEAR); - tpp->add_item("Constant",TRACK_MENU_SET_ALL_TRANS_CONSTANT); - tpp->add_item("In",TRACK_MENU_SET_ALL_TRANS_IN); - tpp->add_item("Out",TRACK_MENU_SET_ALL_TRANS_OUT); - tpp->add_item("In-Out",TRACK_MENU_SET_ALL_TRANS_INOUT); - tpp->add_item("Out-In",TRACK_MENU_SET_ALL_TRANS_OUTIN); - tpp->set_name("Transitions"); + tpp->add_item(TTR("Linear"),TRACK_MENU_SET_ALL_TRANS_LINEAR); + tpp->add_item(TTR("Constant"),TRACK_MENU_SET_ALL_TRANS_CONSTANT); + tpp->add_item(TTR("In"),TRACK_MENU_SET_ALL_TRANS_IN); + tpp->add_item(TTR("Out"),TRACK_MENU_SET_ALL_TRANS_OUT); + tpp->add_item(TTR("In-Out"),TRACK_MENU_SET_ALL_TRANS_INOUT); + tpp->add_item(TTR("Out-In"),TRACK_MENU_SET_ALL_TRANS_OUTIN); + tpp->set_name(TTR("Transitions")); tpp->connect("item_pressed",this,"_menu_track"); optimize_dialog->connect("confirmed",this,"_animation_optimize"); menu_track->get_popup()->add_child(tpp); - //menu_track->get_popup()->add_submenu_item("Set Transitions..","Transitions"); + //menu_track->get_popup()->add_submenu_item(TTR("Set Transitions.."),"Transitions"); //menu_track->get_popup()->add_separator(); - menu_track->get_popup()->add_item("Optimize Animation",TRACK_MENU_OPTIMIZE); - menu_track->get_popup()->add_item("Clean-Up Animation",TRACK_MENU_CLEAN_UP); + 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); curve_linear->set_icon(get_icon("CurveLinear","EditorIcons")); curve_in->set_icon(get_icon("CurveIn","EditorIcons")); @@ -3113,11 +3113,11 @@ 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("Create NEW track for "+p_id.query+" and insert key?"); + insert_confirm->set_text(TTR("Create NEW track for ")+p_id.query+TTR(" and insert key?")); else - insert_confirm->set_text("Create "+itos(insert_data.size())+" NEW tracks and insert keys?"); + insert_confirm->set_text(TTR("Create ")+itos(insert_data.size())+TTR(" NEW tracks and insert keys?")); - insert_confirm->get_ok()->set_text("Create"); + insert_confirm->get_ok()->set_text(TTR("Create")); insert_confirm->popup_centered_minsize(); insert_query=true; } else { @@ -3289,7 +3289,7 @@ void AnimationKeyEditor::insert_value_key(const String& p_property,const Variant void AnimationKeyEditor::_confirm_insert_list() { - undo_redo->create_action("Anim Create & Insert"); + undo_redo->create_action(TTR("Anim Create & Insert")); int last_track = animation->get_track_count(); while(insert_data.size()) { @@ -3310,7 +3310,7 @@ int AnimationKeyEditor::_confirm_insert(InsertData p_id,int p_last_track) { if (p_id.track_idx<0) { created=true; - undo_redo->create_action("Anim Insert Track & Key"); + undo_redo->create_action(TTR("Anim Insert Track & Key")); bool continuous=false; if (p_id.type==Animation::TYPE_VALUE) { @@ -3345,7 +3345,7 @@ int AnimationKeyEditor::_confirm_insert(InsertData p_id,int p_last_track) { undo_redo->add_do_method(animation.ptr(),"value_track_set_continuous",p_id.track_idx,continuous); } else { - undo_redo->create_action("Anim Insert Key"); + undo_redo->create_action(TTR("Anim Insert Key")); } float time = timeline_pos; @@ -3422,7 +3422,7 @@ void AnimationKeyEditor::_animation_len_changed(float p_len) { if (!animation.is_null()) { - undo_redo->create_action("Change Anim Len"); + undo_redo->create_action(TTR("Change Anim Len")); undo_redo->add_do_method(animation.ptr(),"set_length",p_len); undo_redo->add_undo_method(animation.ptr(),"set_length",animation->get_length()); undo_redo->add_do_method(this,"_animation_len_update"); @@ -3451,7 +3451,7 @@ void AnimationKeyEditor::_animation_loop_changed() { if (!animation.is_null()) { - undo_redo->create_action("Change Anim Loop"); + undo_redo->create_action(TTR("Change Anim Loop")); undo_redo->add_do_method(animation.ptr(),"set_loop",loop->is_pressed()); undo_redo->add_undo_method(animation.ptr(),"set_loop",!loop->is_pressed()); undo_redo->commit_action(); @@ -3462,7 +3462,7 @@ void AnimationKeyEditor::_animation_loop_changed() { void AnimationKeyEditor::_create_value_item(int p_type) { - undo_redo->create_action("Anim Create Typed Value Key"); + undo_redo->create_action(TTR("Anim Create Typed Value Key")); Variant::CallError ce; Variant v = Variant::construct(Variant::Type(p_type),NULL,0,ce); @@ -3510,7 +3510,7 @@ void AnimationKeyEditor::_insert_delay() { return; } - undo_redo->create_action("Anim Insert"); + undo_redo->create_action(TTR("Anim Insert")); int last_track = animation->get_track_count(); bool advance=false; @@ -3589,7 +3589,7 @@ void AnimationKeyEditor::_scale() { - undo_redo->create_action("Anim Scale Keys"); + undo_redo->create_action(TTR("Anim Scale Keys")); List<_AnimMoveRestore> to_restore; @@ -3685,7 +3685,7 @@ void AnimationKeyEditor::_scale() { void AnimationKeyEditor::_add_call_track(const NodePath& p_base) { - print_line("BASE IS "+String(p_base)); + Node* base = EditorNode::get_singleton()->get_edited_scene(); if (!base) return; @@ -3698,7 +3698,7 @@ void AnimationKeyEditor::_add_call_track(const NodePath& p_base) { //print_line("root: "+String(root->get_path())); //print_line("path: "+String(path)); - undo_redo->create_action("Anim Add Call Track"); + undo_redo->create_action(TTR("Anim Add Call Track")); undo_redo->add_do_method(animation.ptr(),"add_track",Animation::TYPE_METHOD); undo_redo->add_do_method(animation.ptr(),"track_set_path",animation->get_track_count(),path); undo_redo->add_undo_method(animation.ptr(),"remove_track",animation->get_track_count()); @@ -3801,7 +3801,7 @@ AnimationKeyEditor::AnimationKeyEditor() { zoomicon = memnew( TextureFrame ); hb->add_child(zoomicon); - zoomicon->set_tooltip("Animation zoom."); + zoomicon->set_tooltip(TTR("Animation zoom.")); zoom = memnew( HSlider ); //hb->add_child(zoom); @@ -3813,12 +3813,12 @@ AnimationKeyEditor::AnimationKeyEditor() { zoom->set_stretch_ratio(2); hb->add_child(zoom); zoom->connect("value_changed",this,"_scroll_changed"); - zoom->set_tooltip("Animation zoom."); + zoom->set_tooltip(TTR("Animation zoom.")); hb->add_child( memnew( VSeparator ) ); Label *l = memnew( Label ); - l->set_text("Len(s):"); + l->set_text(TTR("Len(s):")); hb->add_child(l); length = memnew( SpinBox ); @@ -3827,13 +3827,13 @@ AnimationKeyEditor::AnimationKeyEditor() { length->set_step(0.01); length->set_h_size_flags(SIZE_EXPAND_FILL); length->set_stretch_ratio(1); - length->set_tooltip("Animation length (in seconds)."); + length->set_tooltip(TTR("Animation length (in seconds).")); hb->add_child(length); length->connect("value_changed",this,"_animation_len_changed"); l = memnew( Label ); - l->set_text("Step(s):"); + l->set_text(TTR("Step(s):")); hb->add_child(l); step = memnew( SpinBox ); @@ -3843,7 +3843,7 @@ AnimationKeyEditor::AnimationKeyEditor() { step->set_val(0.0); step->set_h_size_flags(SIZE_EXPAND_FILL); step->set_stretch_ratio(1); - step->set_tooltip("Cursor step snap (in seconds)."); + step->set_tooltip(TTR("Cursor step snap (in seconds).")); hb->add_child(step); step->connect("value_changed",this,"_step_changed"); @@ -3852,42 +3852,42 @@ AnimationKeyEditor::AnimationKeyEditor() { loop->set_toggle_mode(true); loop->connect("pressed",this,"_animation_loop_changed"); hb->add_child(loop); - loop->set_tooltip("Enable/Disable looping in animation."); + loop->set_tooltip(TTR("Enable/Disable looping in animation.")); hb->add_child( memnew( VSeparator ) ); menu_add_track = memnew( MenuButton ); hb->add_child(menu_add_track); menu_add_track->get_popup()->connect("item_pressed",this,"_menu_add_track"); - menu_add_track->set_tooltip("Add new tracks."); + menu_add_track->set_tooltip(TTR("Add new tracks.")); move_up_button = memnew( ToolButton ); hb->add_child(move_up_button); move_up_button->connect("pressed",this,"_menu_track",make_binds(TRACK_MENU_MOVE_UP)); move_up_button->set_focus_mode(FOCUS_NONE); move_up_button->set_disabled(true); - move_up_button->set_tooltip("Move current track up."); + move_up_button->set_tooltip(TTR("Move current track up.")); move_down_button = memnew( ToolButton ); hb->add_child(move_down_button); move_down_button->connect("pressed",this,"_menu_track",make_binds(TRACK_MENU_MOVE_DOWN)); move_down_button->set_focus_mode(FOCUS_NONE); move_down_button->set_disabled(true); - move_down_button->set_tooltip("Move current track down."); + move_down_button->set_tooltip(TTR("Move current track down.")); remove_button = memnew( ToolButton ); hb->add_child(remove_button); remove_button->connect("pressed",this,"_menu_track",make_binds(TRACK_MENU_REMOVE)); remove_button->set_focus_mode(FOCUS_NONE); remove_button->set_disabled(true); - remove_button->set_tooltip("Remove selected track."); + remove_button->set_tooltip(TTR("Remove selected track.")); hb->add_child(memnew( VSeparator )); menu_track = memnew( MenuButton ); hb->add_child(menu_track); menu_track->get_popup()->connect("item_pressed",this,"_menu_track"); - menu_track->set_tooltip("Track tools"); + menu_track->set_tooltip(TTR("Track tools")); edit_button = memnew( ToolButton ); edit_button->set_toggle_mode(true); @@ -3895,11 +3895,11 @@ AnimationKeyEditor::AnimationKeyEditor() { edit_button->set_disabled(true); hb->add_child(edit_button); - edit_button->set_tooltip("Enable editing of individual keys by clicking them."); + edit_button->set_tooltip(TTR("Enable editing of individual keys by clicking them.")); optimize_dialog = memnew( ConfirmationDialog ); add_child(optimize_dialog); - optimize_dialog->set_title("Anim. Optimizer"); + optimize_dialog->set_title(TTR("Anim. Optimizer")); VBoxContainer *optimize_vb = memnew( VBoxContainer ); optimize_dialog->add_child(optimize_vb); optimize_dialog->set_child_rect(optimize_vb); @@ -3908,28 +3908,28 @@ AnimationKeyEditor::AnimationKeyEditor() { optimize_linear_error->set_min(0.001); optimize_linear_error->set_step(0.001); optimize_linear_error->set_val(0.05); - optimize_vb->add_margin_child("Max. Linear Error:",optimize_linear_error); + optimize_vb->add_margin_child(TTR("Max. Linear Error:"),optimize_linear_error); optimize_angular_error = memnew( SpinBox ); optimize_angular_error->set_max(1.0); optimize_angular_error->set_min(0.001); optimize_angular_error->set_step(0.001); optimize_angular_error->set_val(0.01); - optimize_vb->add_margin_child("Max. Angular Error:",optimize_angular_error); + optimize_vb->add_margin_child(TTR("Max. Angular Error:"),optimize_angular_error); optimize_max_angle = memnew( SpinBox ); - optimize_vb->add_margin_child("Max Optimizable Angle:",optimize_max_angle); + optimize_vb->add_margin_child(TTR("Max Optimizable Angle:"),optimize_max_angle); optimize_max_angle->set_max(360.0); optimize_max_angle->set_min(0.0); optimize_max_angle->set_step(0.1); optimize_max_angle->set_val(22); - optimize_dialog->get_ok()->set_text("Optimize"); + optimize_dialog->get_ok()->set_text(TTR("Optimize")); /*keying = memnew( Button ); keying->set_toggle_mode(true); - //keying->set_text("Keys"); + //keying->set_text(TTR("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("Base: "); + l->set_text(TTR("Base: ")); l->set_pos(Point2(0,3)); // dr_panel->add_child(l);*/ @@ -3978,7 +3978,7 @@ AnimationKeyEditor::AnimationKeyEditor() { key_editor = memnew( PropertyEditor ); key_editor->set_area_as_parent_rect(); key_editor->hide_top_label(); - key_editor->set_name("Key"); + key_editor->set_name(TTR("Key")); key_editor_tab->add_child(key_editor); key_edit = memnew( AnimationKeyEdit ); @@ -3992,7 +3992,7 @@ AnimationKeyEditor::AnimationKeyEditor() { type_menu->connect("item_pressed",this,"_create_value_item"); VBoxContainer *curve_vb = memnew( VBoxContainer ); - curve_vb->set_name("Transition"); + curve_vb->set_name(TTR("Transition")); HBoxContainer *curve_hb = memnew( HBoxContainer ); curve_vb->add_child(curve_hb); @@ -4065,13 +4065,13 @@ AnimationKeyEditor::AnimationKeyEditor() { scale->set_min(-99999); scale->set_max(99999); scale->set_step(0.001); - vbc->add_margin_child("Scale Ratio:",scale); + vbc->add_margin_child(TTR("Scale Ratio:"),scale); scale_dialog->connect("confirmed",this,"_scale"); add_child(scale_dialog); call_select = memnew( SceneTreeDialog ); add_child(call_select); - call_select->set_title("Call Functions in Which Node?"); + call_select->set_title(TTR("Call Functions in Which Node?")); cleanup_dialog = memnew( ConfirmationDialog ); add_child(cleanup_dialog); @@ -4079,21 +4079,21 @@ AnimationKeyEditor::AnimationKeyEditor() { cleanup_dialog->add_child(cleanup_vb); cleanup_dialog->set_child_rect(cleanup_vb); cleanup_keys = memnew( CheckButton ); - cleanup_keys->set_text("Remove invalid keys"); + cleanup_keys->set_text(TTR("Remove invalid keys")); cleanup_keys->set_pressed(true); cleanup_vb->add_child(cleanup_keys); cleanup_tracks = memnew( CheckButton ); - cleanup_tracks->set_text("Remove unresolved and empty tracks"); + cleanup_tracks->set_text(TTR("Remove unresolved and empty tracks")); cleanup_tracks->set_pressed(true); cleanup_vb->add_child(cleanup_tracks); cleanup_all = memnew( CheckButton ); - cleanup_all->set_text("Clean-Up all animations"); + cleanup_all->set_text(TTR("Clean-Up all animations")); cleanup_vb->add_child(cleanup_all); - cleanup_dialog->set_title("Clean up Animation(s) (NO UNDO!)"); - cleanup_dialog->get_ok()->set_text("Clean-Up"); + 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/array_property_edit.cpp b/tools/editor/array_property_edit.cpp index 66c2782da5..1ff6e644d7 100644 --- a/tools/editor/array_property_edit.cpp +++ b/tools/editor/array_property_edit.cpp @@ -64,7 +64,7 @@ bool ArrayPropertyEdit::_set(const StringName& p_name, const Variant& p_value){ return true; UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); - ur->create_action("Resize Array"); + ur->create_action(TTR("Resize Array")); ur->add_do_method(this,"_set_size",newsize); ur->add_undo_method(this,"_set_size",size); if (newsizeget_undo_redo(); - ur->create_action("Change Array Value Type"); + ur->create_action(TTR("Change Array Value Type")); ur->add_do_method(this,"_set_value",idx,new_value); ur->add_undo_method(this,"_set_value",idx,value); ur->add_do_method(this,"_notif_change"); @@ -126,7 +126,7 @@ bool ArrayPropertyEdit::_set(const StringName& p_name, const Variant& p_value){ Variant value = arr.get(idx); UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); - ur->create_action("Change Array Value"); + ur->create_action(TTR("Change Array Value")); ur->add_do_method(this,"_set_value",idx,p_value); ur->add_undo_method(this,"_set_value",idx,value); ur->add_do_method(this,"_notif_changev",p_name); diff --git a/tools/editor/call_dialog.cpp b/tools/editor/call_dialog.cpp index c5e9cdfa0d..2ab9a79d3b 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("Method List For ' "+p_object->get_type()+" ':"); + method_label->set_text(TTR("Method List For ' ")+p_object->get_type()+" ':"); } CallDialog::CallDialog() { @@ -253,7 +253,7 @@ CallDialog::CallDialog() { call->set_anchor( MARGIN_BOTTOM, ANCHOR_END ); call->set_begin( Point2( 70, 29 ) ); call->set_end( Point2( 15, 15 ) ); - call->set_text("Call"); + call->set_text(TTR("Call")); add_child(call); @@ -262,7 +262,7 @@ CallDialog::CallDialog() { cancel->set_anchor( MARGIN_BOTTOM, ANCHOR_END ); cancel->set_begin( Point2( 15, 29 ) ); cancel->set_end( Point2( 70, 15 ) ); - cancel->set_text("Close"); + cancel->set_text(TTR("Close")); add_child(cancel); @@ -291,21 +291,21 @@ CallDialog::CallDialog() { add_child(property_editor); method_label = memnew( Label ); method_label->set_pos( Point2( 15,25) ); - method_label->set_text("Method List:"); + method_label->set_text(TTR("Method List:")); add_child(method_label); Label *label = memnew( Label ); label->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.53 ); label->set_anchor_and_margin( MARGIN_TOP, ANCHOR_BEGIN, 25 ); - label->set_text("Arguments:"); + label->set_text(TTR("Arguments:")); add_child(label); return_label = memnew( Label ); return_label->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.53 ); return_label->set_anchor_and_margin( MARGIN_TOP, ANCHOR_END, 85 ); - return_label->set_text("Return:"); + return_label->set_text(TTR("Return:")); add_child(return_label); @@ -323,7 +323,7 @@ CallDialog::CallDialog() { label->set_begin( Point2( 15,54) ); label->set_end( Point2( 16,44) ); - label->set_text("Parameters:"); + label->set_text(TTR("Parameters:")); add_child(label); */ diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp index cf8f40430b..970a0477c1 100644 --- a/tools/editor/code_editor.cpp +++ b/tools/editor/code_editor.cpp @@ -58,9 +58,9 @@ void GotoLineDialog::ok_pressed() { GotoLineDialog::GotoLineDialog() { - set_title("Go to Line"); + set_title(TTR("Go to Line")); Label *l = memnew(Label); - l->set_text("Line Number:"); + l->set_text(TTR("Line Number:")); l->set_pos(Point2(5,5)); add_child(l); @@ -78,13 +78,13 @@ GotoLineDialog::GotoLineDialog() { void FindReplaceDialog::popup_search() { - set_title("Search"); + set_title(TTR("Search")); replace_mc->hide(); replace_label->hide(); replace_vb->hide(); skip->hide(); popup_centered(Point2(300,190)); - get_ok()->set_text("Find"); + get_ok()->set_text(TTR("Find")); search_text->grab_focus(); if (text_edit->is_selection_active() && ( text_edit->get_selection_from_line() == text_edit->get_selection_to_line())) { @@ -98,7 +98,7 @@ void FindReplaceDialog::popup_search() { void FindReplaceDialog::popup_replace() { - set_title("Replace"); + set_title(TTR("Replace")); bool do_selection=(text_edit->is_selection_active() && text_edit->get_selection_from_line() < text_edit->get_selection_to_line()); set_replace_selection_only(do_selection); @@ -121,12 +121,12 @@ void FindReplaceDialog::popup_replace() { if (prompt->is_pressed()) { skip->show(); - get_ok()->set_text("Next"); + get_ok()->set_text(TTR("Next")); selection_only->set_disabled(true); } else { skip->hide(); - get_ok()->set_text("Replace"); + get_ok()->set_text(TTR("Replace")); selection_only->set_disabled(false); } @@ -216,7 +216,7 @@ void FindReplaceDialog::_replace() { text_edit->set_v_scroll(vsval); // text_edit->set_h_scroll(hsval); - error_label->set_text("Replaced "+itos(rc)+" ocurrence(s)."); + error_label->set_text(TTR("Replaced ")+itos(rc)+TTR(" ocurrence(s).")); //hide(); @@ -274,7 +274,7 @@ bool FindReplaceDialog::_search() { return true; } else { - set_error("Not Found!"); + set_error(TTR("Not Found!")); return false; } @@ -284,12 +284,12 @@ void FindReplaceDialog::_prompt_changed() { if (prompt->is_pressed()) { skip->show(); - get_ok()->set_text("Next"); + get_ok()->set_text(TTR("Next")); selection_only->set_disabled(true); } else { skip->hide(); - get_ok()->set_text("Replace"); + get_ok()->set_text(TTR("Replace")); selection_only->set_disabled(false); } } @@ -404,14 +404,14 @@ FindReplaceDialog::FindReplaceDialog() { search_text = memnew( LineEdit ); - vb->add_margin_child("Search",search_text); + vb->add_margin_child(TTR("Search"),search_text); search_text->connect("text_entered", this,"_search_text_entered"); //search_text->set_self_opacity(0.7); replace_label = memnew( Label); - replace_label->set_text("Replace By"); + replace_label->set_text(TTR("Replace By")); vb->add_child(replace_label); replace_mc= memnew( MarginContainer); vb->add_child(replace_mc); @@ -436,15 +436,15 @@ FindReplaceDialog::FindReplaceDialog() { svb ->add_child(memnew(Label)); whole_words = memnew( CheckButton ); - whole_words->set_text("Whole Words"); + whole_words->set_text(TTR("Whole Words")); svb->add_child(whole_words); case_sensitive = memnew( CheckButton ); - case_sensitive->set_text("Case Sensitive"); + case_sensitive->set_text(TTR("Case Sensitive")); svb->add_child(case_sensitive); backwards = memnew( CheckButton ); - backwards->set_text("Backwards"); + backwards->set_text(TTR("Backwards")); svb->add_child(backwards); opt_mg = memnew( MarginContainer ); @@ -456,12 +456,12 @@ FindReplaceDialog::FindReplaceDialog() { rvb ->add_child(memnew(Label)); prompt = memnew( CheckButton ); - prompt->set_text("Prompt On Replace"); + prompt->set_text(TTR("Prompt On Replace")); rvb->add_child(prompt); prompt->connect("pressed", this,"_prompt_changed"); selection_only = memnew( CheckButton ); - selection_only->set_text("Selection Only"); + selection_only->set_text(TTR("Selection Only")); rvb->add_child(selection_only); @@ -475,7 +475,7 @@ FindReplaceDialog::FindReplaceDialog() { skip->set_anchor( MARGIN_BOTTOM, ANCHOR_END ); skip->set_begin( Point2( 70, button_margin ) ); skip->set_end( Point2( 10, margin ) ); - skip->set_text("Skip"); + skip->set_text(TTR("Skip")); add_child(skip); skip->connect("pressed", this,"_skip_pressed"); @@ -498,7 +498,7 @@ FindReplaceDialog::FindReplaceDialog() { void CodeTextEditor::_line_col_changed() { - String text = String()+"Line: "+itos(text_editor->cursor_get_line()+1)+", 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 962062ae01..3795860472 100644 --- a/tools/editor/connections_dialog.cpp +++ b/tools/editor/connections_dialog.cpp @@ -176,7 +176,7 @@ void ConnectDialog::ok_pressed() { if (dst_method->get_text()=="") { - error->set_text("Method in target Node must be specified!"); + error->set_text(TTR("Method in target Node must be specified!")); error->popup_centered_minsize(); return; } @@ -294,20 +294,20 @@ void ConnectDialog::_bind_methods() { ConnectDialog::ConnectDialog() { - int margin = get_constant("margin","Dialogs"); - int button_margin = get_constant("button_margin","Dialogs"); + int margin = get_constant("margin",TTR("Dialogs")); + int button_margin = get_constant("button_margin",TTR("Dialogs")); Label * label = memnew( Label ); label->set_pos( Point2( 8,11) ); - label->set_text("Connect To Node:"); + label->set_text(TTR("Connect To Node:")); add_child(label); label = memnew( Label ); label->set_anchor( MARGIN_LEFT, ANCHOR_RATIO ); label->set_pos( Point2( 0.5,11) ); - label->set_text("Binds (Extra Params):"); + label->set_text(TTR("Binds (Extra Params):")); add_child(label); @@ -360,7 +360,7 @@ ConnectDialog::ConnectDialog() { add_bind->set_anchor( MARGIN_LEFT, ANCHOR_RATIO ); add_bind->set_begin( Point2( 0.76,32) ); add_bind->set_end( Point2( 0.84,33 ) ); - add_bind->set_text("Add"); + add_bind->set_text(TTR("Add")); add_child(add_bind); add_bind->connect("pressed",this,"_add_bind"); @@ -369,7 +369,7 @@ ConnectDialog::ConnectDialog() { del_bind->set_anchor( MARGIN_LEFT, ANCHOR_RATIO ); del_bind->set_begin( Point2( 0.85,32) ); del_bind->set_end( Point2( 15,33 ) ); - del_bind->set_text("Remove"); + del_bind->set_text(TTR("Remove")); add_child(del_bind); del_bind->connect("pressed",this,"_remove_bind"); @@ -378,7 +378,7 @@ ConnectDialog::ConnectDialog() { label->set_anchor( MARGIN_TOP, ANCHOR_END ); label->set_begin( Point2( 8,124) ); label->set_end( Point2( 15,99) ); - label->set_text("Path To Node:"); + label->set_text(TTR("Path To Node:")); add_child(label); @@ -397,7 +397,7 @@ ConnectDialog::ConnectDialog() { label->set_anchor( MARGIN_BOTTOM, ANCHOR_END ); label->set_begin( Point2( 8,78 ) ); label->set_end( Point2( 15,52 ) ); - label->set_text("Method In Node:"); + label->set_text(TTR("Method In Node:")); add_child(label); @@ -416,7 +416,7 @@ ConnectDialog::ConnectDialog() { /*dst_method_list = memnew( MenuButton ); - dst_method_list->set_text("List.."); + dst_method_list->set_text(TTR("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,15 +429,15 @@ 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("Make Function "); + make_callback->set_text(TTR("Make Function ")); dstm_hb->add_child(make_callback); deferred = memnew( CheckButton ); - deferred->set_text("Deferred"); + deferred->set_text(TTR("Deferred")); dstm_hb->add_child(deferred); oneshot = memnew( CheckButton ); - oneshot->set_text("Oneshot"); + oneshot->set_text(TTR("Oneshot")); dstm_hb->add_child(oneshot); /* @@ -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("Realtime"); + realtime->set_text(TTR("Realtime")); add_child(realtime); */ @@ -463,9 +463,9 @@ ConnectDialog::ConnectDialog() { error = memnew( ConfirmationDialog ); add_child(error); - error->get_ok()->set_text("Close"); - get_ok()->set_text("Connect"); -// error->get_cancel()->set_text("Close"); + error->get_ok()->set_text(TTR("Close")); + get_ok()->set_text(TTR("Connect")); +// error->get_cancel()->set_text(TTR("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("Connect '"+signal+"' to '"+String(dst_method)+"'"); + undo_redo->create_action(TTR("Connect '")+signal+"' to '"+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"); @@ -572,7 +572,7 @@ void ConnectionsDialog::ok_pressed() { Connection c=item->get_metadata(0); ERR_FAIL_COND(c.source!=node); //shouldn't happen but...bugcheck - undo_redo->create_action("Create Subscription"); + undo_redo->create_action(TTR("Create Subscription")); undo_redo->add_do_method(node,"disconnect",c.signal,c.target,c.method); undo_redo->add_undo_method(node,"connect",c.signal,c.target,c.method,Vector(),c.flags); 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("Remove Subscription"); + undo_redo->create_action(TTR("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"); @@ -773,7 +773,7 @@ void ConnectionsDialog::update_tree() { } } - get_ok()->set_text("Connect"); + get_ok()->set_text(TTR("Connect")); get_ok()->set_disabled(true); } @@ -789,17 +789,17 @@ void ConnectionsDialog::_something_selected() { TreeItem *item = tree->get_selected(); if (!item) { //no idea how this happened, but disable - get_ok()->set_text("Connect.."); + get_ok()->set_text(TTR("Connect..")); get_ok()->set_disabled(true); } else if (item->get_parent()==tree->get_root() || item->get_parent()->get_parent()==tree->get_root()) { //a signal - connect - get_ok()->set_text("Connect.."); + get_ok()->set_text(TTR("Connect..")); get_ok()->set_disabled(false); } else { //a slot- disconnect - get_ok()->set_text("Disconnect"); + get_ok()->set_text(TTR("Disconnect")); get_ok()->set_disabled(false); } @@ -820,7 +820,7 @@ void ConnectionsDialog::_bind_methods() { ConnectionsDialog::ConnectionsDialog(EditorNode *p_editor) { editor=p_editor; - set_title("Edit Connections.."); + set_title(TTR("Edit Connections..")); set_hide_on_ok(false); VBoxContainer *vbc = memnew( VBoxContainer ); @@ -833,7 +833,7 @@ ConnectionsDialog::ConnectionsDialog(EditorNode *p_editor) { tree->set_columns(1); tree->set_select_mode(Tree::SELECT_ROW); tree->set_hide_root(true); - vbc->add_margin_child("Connections:",tree,true); + vbc->add_margin_child(TTR("Connections:"),tree,true); // add_child(tree); @@ -858,7 +858,7 @@ ConnectionsDialog::ConnectionsDialog(EditorNode *p_editor) { remove_confirm->connect("confirmed", this,"_remove_confirm"); connect_dialog->connect("connected", this,"_connect"); tree->connect("item_selected", this,"_something_selected"); - get_cancel()->set_text("Close"); + get_cancel()->set_text(TTR("Close")); } diff --git a/tools/editor/create_dialog.cpp b/tools/editor/create_dialog.cpp index 35688917fb..c156b1b2de 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("Create New "+p_base); + set_title(TTR("Create New ")+p_base); _update_search(); } @@ -316,12 +316,12 @@ CreateDialog::CreateDialog() { add_child(vbc); set_child_rect(vbc); search_box = memnew( LineEdit ); - vbc->add_margin_child("Search:",search_box); + vbc->add_margin_child(TTR("Search:"),search_box); search_box->connect("text_changed",this,"_text_changed"); search_box->connect("input_event",this,"_sbox_input"); search_options = memnew( Tree ); - vbc->add_margin_child("Matches:",search_options,true); - get_ok()->set_text("Create"); + vbc->add_margin_child(TTR("Matches:"),search_options,true); + get_ok()->set_text(TTR("Create")); get_ok()->set_disabled(true); register_text_enter(search_box); set_hide_on_ok(false); @@ -541,7 +541,7 @@ void CreateDialog::_bind_methods() { void CreateDialog::set_base_type(const String& p_base) { - set_title("Create "+p_base+" Type"); + set_title(TTR("Create ")+p_base+" Type"); if (base==p_base) return; @@ -562,14 +562,14 @@ CreateDialog::CreateDialog() { add_child(vbc); set_child_rect(vbc); - get_ok()->set_text("Create"); + get_ok()->set_text(TTR("Create")); tree = memnew( Tree ); - vbc->add_margin_child("Type:",tree,true); + vbc->add_margin_child(TTR("Type:"),tree,true); //tree->set_hide_root(true); filter = memnew( LineEdit ); - vbc->add_margin_child("Filter:",filter); + vbc->add_margin_child(TTR("Filter:"),filter); base="Node"; set_as_toplevel(true); diff --git a/tools/editor/dependency_editor.cpp b/tools/editor/dependency_editor.cpp index 7e63cfb1b4..784315522c 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("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,"EditorIcons")) { + if (has_icon(type,TTR("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("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("Scene '"+p_path.get_file()+"' is currently being edited.\nChanges will not take effect unless reloaded."); + EditorNode::get_singleton()->show_warning(TTR("Scene '")+p_path.get_file()+"' is currently being edited.\nChanges will not take effect unless reloaded."); } else if (ResourceCache::has(p_path)) { - EditorNode::get_singleton()->show_warning("Resource '"+p_path.get_file()+"' is in use.\nChanges will take effect when reloaded."); + EditorNode::get_singleton()->show_warning(TTR("Resource '")+p_path.get_file()+"' is in use.\nChanges will take effect when reloaded."); } } @@ -233,7 +233,7 @@ void DependencyEditor::_bind_methods() { DependencyEditor::DependencyEditor() { VBoxContainer *vb = memnew( VBoxContainer ); - vb->set_name("Dependencies"); + vb->set_name(TTR("Dependencies")); add_child(vb); set_child_rect(vb); @@ -246,10 +246,10 @@ DependencyEditor::DependencyEditor() { tree->connect("button_pressed",this,"_load_pressed"); HBoxContainer *hbc = memnew( HBoxContainer ); - Label *label = memnew( Label("Dependencies:")); + Label *label = memnew( Label(TTR("Dependencies:"))); hbc->add_child(label); hbc->add_spacer(); - fixdeps = memnew( Button("Fix Broken")); + fixdeps = memnew( Button(TTR("Fix Broken"))); hbc->add_child(fixdeps); fixdeps->connect("pressed",this,"_fix_all"); @@ -261,11 +261,11 @@ DependencyEditor::DependencyEditor() { mc->add_child(tree); vb->add_child(mc); - set_title("Dependency Editor"); + set_title(TTR("Dependency Editor")); search = memnew( EditorFileDialog ); search->connect("file_selected",this,"_searched"); search->set_mode(EditorFileDialog::MODE_OPEN_FILE); - search->set_title("Search Replacement Resource:"); + search->set_title(TTR("Search Replacement Resource:")); add_child(search); } @@ -301,7 +301,7 @@ void DependencyEditorOwners::_fill_owners(EditorFileSystemDirectory *efsd) { Ref icon; String type=efsd->get_file_type(i); - if (!has_icon(type,"EditorIcons")) { + if (!has_icon(type,TTR("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("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,"EditorIcons")) { + if (!has_icon(type,TTR("EditorIcons"))) { icon=get_icon("Object","EditorIcons"); } else { icon=get_icon(type,"EditorIcons"); @@ -405,7 +405,7 @@ void DependencyRemoveDialog::show(const Vector &to_erase) { popup_centered_minsize(Size2(500,220)); } else { owners->hide(); - text->set_text("Remove selected files from the project? (no undo)"); + text->set_text(TTR("Remove selected files from the project? (no undo)")); popup_centered_minsize(Size2(400,100)); } @@ -437,7 +437,7 @@ DependencyRemoveDialog::DependencyRemoveDialog() { owners->set_hide_root(true); vb->add_child(owners); owners->set_v_size_flags(SIZE_EXPAND_FILL); - get_ok()->set_text("Remove"); + get_ok()->set_text(TTR("Remove")); } @@ -448,7 +448,7 @@ void DependencyErrorDialog::show(const String& p_for_file,const Vector & for_file=p_for_file; - set_title("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,"EditorIcons")) { + if (!has_icon(type,TTR("EditorIcons"))) { icon=get_icon("Object","EditorIcons"); } else { icon=get_icon(type,"EditorIcons"); @@ -496,18 +496,18 @@ DependencyErrorDialog::DependencyErrorDialog() { files = memnew( Tree ); files->set_hide_root(true); - vb->add_margin_child("Scene failed to load due to missing dependencies:",files,true); + vb->add_margin_child(TTR("Scene failed to load due to missing dependencies:"),files,true); files->set_v_size_flags(SIZE_EXPAND_FILL); - get_ok()->set_text("Open Anyway"); + get_ok()->set_text(TTR("Open Anyway")); text = memnew( Label ); vb->add_child(text); - text->set_text("Which action should be taken?"); + text->set_text(TTR("Which action should be taken?")); - fdep=add_button("Fix Dependencies",true,"fixdeps"); + fdep=add_button(TTR("Fix Dependencies"),true,"fixdeps"); - set_title("Errors loading!"); + set_title(TTR("Errors loading!")); } @@ -523,7 +523,7 @@ void OrphanResourcesDialog::ok_pressed() { if (paths.empty()) return; - delete_confirm->set_text("Permanently Delete "+itos(paths.size())+" Item(s) ? (No Undo!!)"); + delete_confirm->set_text(TTR("Permanently Delete ")+itos(paths.size())+" Item(s) ? (No Undo!!)"); 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,"EditorIcons")) { + if (has_icon(type,TTR("EditorIcons"))) { icon=get_icon(type,"EditorIcons"); } else { icon=get_icon("Object","EditorIcons"); @@ -676,13 +676,13 @@ OrphanResourcesDialog::OrphanResourcesDialog(){ files->set_column_expand(0,true); files->set_column_expand(1,false); files->set_column_title(0,"Resource"); - files->set_column_title(1,"Owns"); + files->set_column_title(1,TTR("Owns")); files->set_hide_root(true); - vbc->add_margin_child("Resources Without Explicit Ownership:",files,true); - set_title("Orphan Resource Explorer"); + vbc->add_margin_child(TTR("Resources Without Explicit Ownership:"),files,true); + set_title(TTR("Orphan Resource Explorer")); delete_confirm = memnew( ConfirmationDialog ); - delete_confirm->set_text("Delete selected files?"); - get_ok()->set_text("Delete"); + delete_confirm->set_text(TTR("Delete selected files?")); + get_ok()->set_text(TTR("Delete")); add_child(delete_confirm); dep_edit = memnew( DependencyEditor ); add_child(dep_edit); diff --git a/tools/editor/editor_data.cpp b/tools/editor/editor_data.cpp index 8bb2d60cab..4c4fecdd83 100644 --- a/tools/editor/editor_data.cpp +++ b/tools/editor/editor_data.cpp @@ -569,12 +569,12 @@ bool EditorData::check_and_update_scene(int p_idx) { Ref pscene; pscene.instance(); - EditorProgress ep("update_scene","Updating Scene",2); - ep.step("Storing local changes..",0); + EditorProgress ep("update_scene",TTR("Updating Scene"),2); + ep.step(TTR("Storing local changes.."),0); //pack first, so it stores diffs to previous version of saved scene Error err = pscene->pack(edited_scene[p_idx].root); ERR_FAIL_COND_V(err!=OK,false); - ep.step("Updating scene..",1); + ep.step(TTR("Updating scene.."),1); Node *new_scene = pscene->instance(true); ERR_FAIL_COND_V(!new_scene,false); diff --git a/tools/editor/editor_dir_dialog.cpp b/tools/editor/editor_dir_dialog.cpp index 1a92a61882..395c4ba680 100644 --- a/tools/editor/editor_dir_dialog.cpp +++ b/tools/editor/editor_dir_dialog.cpp @@ -208,7 +208,7 @@ EditorDirDialog::EditorDirDialog() { updating=false; - set_title("Choose a Directory"); + set_title(TTR("Choose a Directory")); set_hide_on_ok(false); tree = memnew( Tree ); @@ -216,11 +216,11 @@ EditorDirDialog::EditorDirDialog() { set_child_rect(tree); tree->connect("item_activated",this,"_ok"); - makedir = add_button("Create Folder",OS::get_singleton()->get_swap_ok_cancel()?true:false,"makedir"); + makedir = add_button(TTR("Create Folder"),OS::get_singleton()->get_swap_ok_cancel()?true:false,"makedir"); makedir->connect("pressed",this,"_make_dir"); makedialog = memnew( ConfirmationDialog ); - makedialog->set_title("Create Folder"); + makedialog->set_title(TTR("Create Folder")); add_child(makedialog); VBoxContainer *makevb= memnew( VBoxContainer ); @@ -228,14 +228,14 @@ EditorDirDialog::EditorDirDialog() { makedialog->set_child_rect(makevb); makedirname = memnew( LineEdit ); - makevb->add_margin_child("Name:",makedirname); + makevb->add_margin_child(TTR("Name:"),makedirname); makedialog->register_text_enter(makedirname); makedialog->connect("confirmed",this,"_make_dir_confirm"); mkdirerr = memnew( AcceptDialog ); - mkdirerr->set_text("Could not create folder."); + mkdirerr->set_text(TTR("Could not create folder.")); add_child(mkdirerr); - get_ok()->set_text("Choose"); + get_ok()->set_text(TTR("Choose")); } diff --git a/tools/editor/editor_file_dialog.cpp b/tools/editor/editor_file_dialog.cpp index a889c76a69..8c16955d9f 100644 --- a/tools/editor/editor_file_dialog.cpp +++ b/tools/editor/editor_file_dialog.cpp @@ -353,7 +353,7 @@ void EditorFileDialog::_action_pressed() { } if (dir_access->file_exists(f)) { - confirm_save->set_text("File Exists, Overwrite?"); + confirm_save->set_text(TTR("File Exists, Overwrite?")); confirm_save->popup_centered(Size2(200,80)); } else { @@ -677,7 +677,7 @@ void EditorFileDialog::update_filters() { if (max_filtersadd_item("All Recognized ( "+all_filters+" )"); + filter->add_item(TTR("All Recognized ( ")+all_filters+" )"); } for(int i=0;iadd_item("( "+flt+" )"); } - filter->add_item("All Files (*)"); + filter->add_item(TTR("All Files (*)")); } @@ -767,11 +767,11 @@ void EditorFileDialog::set_mode(Mode p_mode) { mode=p_mode; switch(mode) { - case MODE_OPEN_FILE: get_ok()->set_text("Open"); set_title("Open a File"); makedir->hide(); break; - case MODE_OPEN_FILES: get_ok()->set_text("Open"); set_title("Open File(s)"); makedir->hide(); break; - case MODE_OPEN_DIR: get_ok()->set_text("Open"); set_title("Open a Directory"); makedir->show(); break; - case MODE_OPEN_ANY: get_ok()->set_text("Open"); set_title("Open a File or Directory"); makedir->show(); break; - case MODE_SAVE_FILE: get_ok()->set_text("Save"); set_title("Save a File"); makedir->show(); break; + case MODE_OPEN_FILE: get_ok()->set_text(TTR("Open")); set_title("Open a File"); makedir->hide(); break; + case MODE_OPEN_FILES: get_ok()->set_text(TTR("Open")); set_title("Open File(s)"); makedir->hide(); break; + case MODE_OPEN_DIR: get_ok()->set_text(TTR("Open")); set_title("Open a Directory"); makedir->show(); break; + case MODE_OPEN_ANY: get_ok()->set_text(TTR("Open")); set_title("Open a File or Directory"); makedir->show(); break; + case MODE_SAVE_FILE: get_ok()->set_text(TTR("Save")); set_title("Save a File"); makedir->show(); break; } if (mode==MODE_OPEN_FILES) { @@ -1212,7 +1212,7 @@ EditorFileDialog::EditorFileDialog() { set_child_rect(vbc); mode=MODE_SAVE_FILE; - set_title("Save a File"); + set_title(TTR("Save a File")); HBoxContainer *pathhb = memnew( HBoxContainer ); @@ -1258,13 +1258,13 @@ EditorFileDialog::EditorFileDialog() { drives->connect("item_selected",this,"_select_drive"); makedir = memnew( Button ); - makedir->set_text("Create Folder"); + makedir->set_text(TTR("Create Folder")); makedir->connect("pressed",this,"_make_dir"); pathhb->add_child(makedir); list_hb = memnew( HBoxContainer ); - vbc->add_margin_child("Path:",pathhb); + vbc->add_margin_child(TTR("Path:"),pathhb); vbc->add_child(list_hb); list_hb->set_v_size_flags(SIZE_EXPAND_FILL); @@ -1272,7 +1272,7 @@ EditorFileDialog::EditorFileDialog() { list_hb->add_child(fav_vb); HBoxContainer *fav_hb = memnew( HBoxContainer ); fav_vb->add_child(fav_hb); - fav_hb->add_child(memnew(Label("Favorites:"))); + fav_hb->add_child(memnew(Label(TTR("Favorites:")))); fav_hb->add_spacer(); fav_up = memnew( ToolButton ); fav_hb->add_child(fav_up); @@ -1292,7 +1292,7 @@ EditorFileDialog::EditorFileDialog() { favorites->connect("item_selected",this,"_favorite_selected"); recent = memnew( ItemList ); - fav_vb->add_margin_child("Recent:",recent,true); + fav_vb->add_margin_child(TTR("Recent:"),recent,true); recent->connect("item_selected",this,"_recent_selected"); VBoxContainer *item_vb = memnew( VBoxContainer ); @@ -1301,7 +1301,7 @@ EditorFileDialog::EditorFileDialog() { item_list = memnew( ItemList ); item_list->set_v_size_flags(SIZE_EXPAND_FILL); - item_vb->add_margin_child("Directories & Files:",item_list,true); + item_vb->add_margin_child(TTR("Directories & Files:"),item_list,true); HBoxContainer* filter_hb = memnew( HBoxContainer ); item_vb->add_child(filter_hb); @@ -1313,7 +1313,7 @@ EditorFileDialog::EditorFileDialog() { preview_vb = memnew( VBoxContainer ); filter_hb->add_child(preview_vb); CenterContainer *prev_cc = memnew( CenterContainer ); - preview_vb->add_margin_child("Preview:",prev_cc); + preview_vb->add_margin_child(TTR("Preview:"),prev_cc); preview = memnew( TextureFrame ); prev_cc->add_child(preview); preview_vb->hide(); @@ -1321,12 +1321,12 @@ EditorFileDialog::EditorFileDialog() { file = memnew(LineEdit); //add_child(file); - filter_vb->add_margin_child("File:",file); + filter_vb->add_margin_child(TTR("File:"),file); filter = memnew( OptionButton ); //add_child(filter); - filter_vb->add_margin_child("Filter:",filter); + filter_vb->add_margin_child(TTR("Filter:"),filter); filter->set_clip_text(true);//too many extensions overflow it dir_access = DirAccess::create(DirAccess::ACCESS_RESOURCES); @@ -1351,21 +1351,21 @@ EditorFileDialog::EditorFileDialog() { confirm_save->connect("confirmed", this,"_save_confirm_pressed"); makedialog = memnew( ConfirmationDialog ); - makedialog->set_title("Create Folder"); + makedialog->set_title(TTR("Create Folder")); VBoxContainer *makevb= memnew( VBoxContainer ); makedialog->add_child(makevb); makedialog->set_child_rect(makevb); makedirname = memnew( LineEdit ); - makevb->add_margin_child("Name:",makedirname); + makevb->add_margin_child(TTR("Name:"),makedirname); add_child(makedialog); makedialog->register_text_enter(makedirname); makedialog->connect("confirmed",this,"_make_dir_confirm"); mkdirerr = memnew( AcceptDialog ); - mkdirerr->set_text("Could not create folder."); + mkdirerr->set_text(TTR("Could not create folder.")); add_child(mkdirerr); exterr = memnew( AcceptDialog ); - exterr->set_text("Must use a valid extension."); + exterr->set_text(TTR("Must use a valid extension.")); add_child(exterr); diff --git a/tools/editor/editor_file_system.cpp b/tools/editor/editor_file_system.cpp index 05e8a559b7..9b30436507 100644 --- a/tools/editor/editor_file_system.cpp +++ b/tools/editor/editor_file_system.cpp @@ -314,7 +314,7 @@ void EditorFileSystem::_scan_filesystem() { - EditorProgressBG scan_progress("efs","ScanFS",1000); + EditorProgressBG scan_progress("efs",TTR("ScanFS"),1000); ScanProgress sp; sp.low=0; @@ -609,7 +609,7 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir,DirAccess da->change_dir(".."); } else { - ERR_PRINTS("Can't go into subdir: "+E->get()); + ERR_PRINTS(TTR("Can't go into subdir: ")+E->get()); } p_progress.update(idx,total); @@ -823,7 +823,7 @@ void EditorFileSystem::_thread_func_sources(void *_userdata) { EditorFileSystem *efs = (EditorFileSystem*)_userdata; if (efs->filesystem) { - EditorProgressBG pr("sources","ScanSources",1000); + EditorProgressBG pr("sources",TTR("ScanSources"),1000); ScanProgress sp; sp.progress=≺ sp.hi=1; @@ -851,7 +851,7 @@ void EditorFileSystem::scan_sources() { if (!use_threads) { if (filesystem) { - EditorProgressBG pr("sources","ScanSources",1000); + EditorProgressBG pr("sources",TTR("ScanSources"),1000); ScanProgress sp; sp.progress=≺ sp.hi=1; @@ -873,7 +873,7 @@ void EditorFileSystem::scan_sources() { s.priority=Thread::PRIORITY_LOW; thread_sources = Thread::create(_thread_func_sources,this,s); //tree->hide(); - //print_line("SCAN BEGIN!"); + //print_line(TTR("SCAN BEGIN!")); //progress->show(); } @@ -900,7 +900,7 @@ void EditorFileSystem::_notification(int p_what) { Thread::wait_to_finish(thread); memdelete(thread); thread=NULL; - WARN_PRINT("Scan thread aborted..."); + WARN_PRINTS(TTR("Scan thread aborted...")); set_process(false); } @@ -1247,7 +1247,7 @@ void EditorFileSystem::update_file(const String& p_file) { } - //print_line("UPDATING: "+p_file); + //print_line(TTR("UPDATING: ")+p_file); fs->files[cpos]->type=type; fs->files[cpos]->modified_time=FileAccess::get_modified_time(p_file); fs->files[cpos]->meta=_get_meta(p_file); diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp index 7a8805a5a1..1439209faa 100644 --- a/tools/editor/editor_help.cpp +++ b/tools/editor/editor_help.cpp @@ -318,20 +318,20 @@ EditorHelpSearch::EditorHelpSearch() { search_box = memnew( LineEdit ); sb_hb->add_child(search_box); search_box->set_h_size_flags(SIZE_EXPAND_FILL); - Button *sb = memnew( Button("Search")); + Button *sb = memnew( Button(TTR("Search"))); sb->connect("pressed",this,"_update_search"); sb_hb->add_child(sb); - vbc->add_margin_child("Search:",sb_hb); + vbc->add_margin_child(TTR("Search:"),sb_hb); search_box->connect("text_changed",this,"_text_changed"); search_box->connect("input_event",this,"_sbox_input"); search_options = memnew( Tree ); - vbc->add_margin_child("Matches:",search_options,true); - get_ok()->set_text("Open"); + vbc->add_margin_child(TTR("Matches:"),search_options,true); + get_ok()->set_text(TTR("Open")); get_ok()->set_disabled(true); register_text_enter(search_box); set_hide_on_ok(false); search_options->connect("item_activated",this,"_confirmed"); - set_title("Search Classes"); + set_title(TTR("Search Classes")); // search_options->set_hide_root(true); @@ -510,7 +510,7 @@ EditorHelpIndex::EditorHelpIndex() { set_child_rect(vbc); search_box = memnew( LineEdit ); - vbc->add_margin_child("Search:", search_box); + vbc->add_margin_child(TTR("Search:"), search_box); search_box->set_h_size_flags(SIZE_EXPAND_FILL); register_text_enter(search_box); @@ -519,12 +519,12 @@ EditorHelpIndex::EditorHelpIndex() { search_box->connect("input_event", this, "_sbox_input"); class_list = memnew( Tree ); - vbc->add_margin_child("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"); - get_ok()->set_text("Open"); + get_ok()->set_text(TTR("Open")); } @@ -618,7 +618,7 @@ void EditorHelp::_class_desc_select(const String& p_select) { -// print_line("LINK: "+p_select); +// print_line(TTR("LINK: ")+p_select); if (p_select.begins_with("#")) { //_goto_desc(p_select.substr(1,p_select.length())); emit_signal("go_to_help","class_name:"+p_select.substr(1,p_select.length())); @@ -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("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("Inherits: "); + class_desc->add_text(TTR("Inherits: ")); class_desc->pop(); class_desc->pop(); @@ -787,7 +787,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("Brief Description:"); + class_desc->add_text(TTR("Brief Description:")); class_desc->pop(); class_desc->pop(); @@ -810,7 +810,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("Public Methods:"); + class_desc->add_text(TTR("Public Methods:")); class_desc->pop(); class_desc->pop(); @@ -895,7 +895,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("Members:"); + class_desc->add_text(TTR("Members:")); class_desc->pop(); class_desc->pop(); class_desc->add_newline(); @@ -939,7 +939,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("GUI Theme Items:"); + class_desc->add_text(TTR("GUI Theme Items:")); class_desc->pop(); class_desc->pop(); class_desc->add_newline(); @@ -981,7 +981,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("Signals:"); + class_desc->add_text(TTR("Signals:")); class_desc->pop(); class_desc->pop(); @@ -1046,7 +1046,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("Constants:"); + class_desc->add_text(TTR("Constants:")); class_desc->pop(); class_desc->pop(); class_desc->push_indent(1); @@ -1091,7 +1091,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { description_line=class_desc->get_line_count()-2; class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color")); class_desc->push_font(doc_title_font); - class_desc->add_text("Description:"); + class_desc->add_text(TTR("Description:")); class_desc->pop(); class_desc->pop(); @@ -1112,7 +1112,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("Method Description:"); + class_desc->add_text(TTR("Method Description:")); class_desc->pop(); class_desc->pop(); @@ -1650,8 +1650,8 @@ EditorHelp::EditorHelp() { search_dialog->set_child_rect(search_vb); search = memnew( LineEdit ); search_dialog->register_text_enter(search); - search_vb->add_margin_child("Search Text",search); - search_dialog->get_ok()->set_text("Find"); + search_vb->add_margin_child(TTR("Search Text"),search); + search_dialog->get_ok()->set_text(TTR("Find")); search_dialog->connect("confirmed",this,"_search_cbk"); search_dialog->set_hide_on_ok(false); search_dialog->set_self_opacity(0.8); diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp index bdf1726d85..2b14d80521 100644 --- a/tools/editor/editor_import_export.cpp +++ b/tools/editor/editor_import_export.cpp @@ -220,7 +220,7 @@ static void _edit_files_with_filter(DirAccess *da,const List& p_filters, String f = da->get_next(); while(f!="") { - print_line("HOHO: "+f); + print_line(TTR("HOHO: ")+f); if (da->current_is_dir()) dirs.push_back(f); else @@ -233,19 +233,19 @@ static void _edit_files_with_filter(DirAccess *da,const List& p_filters, if (!r.ends_with("/")) r+="/"; - print_line("AT: "+r); + print_line(TTR("AT: ")+r); for(List::Element *E=files.front();E;E=E->next()) { String fullpath=r+E->get(); for(const List::Element *F=p_filters.front();F;F=F->next()) { if (fullpath.matchn(F->get())) { - String act = "Added: "; + String act = TTR("Added: "); if (!exclude) { r_list.insert(fullpath); } else { - act = "Removed: "; + act = TTR("Removed: "); r_list.erase(fullpath); } @@ -410,15 +410,15 @@ Vector EditorExportPlatform::get_dependencies(bool p_bundles) const EditorImportExport::get_singleton()->get_export_file_list(&toexport); - print_line("TO EXPORT: "+itos(toexport.size())); + print_line(TTR("TO EXPORT: ")+itos(toexport.size())); for (List::Element *E=toexport.front();E;E=E->next()) { - print_line("DEP: "+String(E->get())); + print_line(TTR("DEP: ")+String(E->get())); exported.insert(E->get()); if (p_bundles && EditorImportExport::get_singleton()->get_export_file_action(E->get())==EditorImportExport::ACTION_BUNDLE) { - print_line("NO BECAUSE OF BUNDLE!"); + print_line(TTR("NO BECAUSE OF BUNDLE!")); continue; //no dependencies needed to be copied } @@ -747,7 +747,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func FileAccess *f=NULL; if (!FileAccess::exists(EditorSettings::get_singleton()->get_settings_path()+"/tmp/atlas-"+md5)) { - print_line("NO MD5 INVALID"); + print_line(TTR("NO MD5 INVALID")); atlas_valid=false; } @@ -766,7 +766,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func atlas_valid=false; if (!atlas_valid) - print_line("JSON INVALID"); + print_line(TTR("JSON INVALID")); } @@ -775,7 +775,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func //check md5 of list of image /names/ if (f->get_line().strip_edges()!=image_list_md5) { atlas_valid=false; - print_line("IMAGE MD5 INVALID!"); + print_line(TTR("IMAGE MD5 INVALID!")); } } @@ -792,7 +792,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func if (slices.size()!=10) { atlas_valid=false; - print_line("CANT SLICE IN 10"); + print_line(TTR("CANT SLICE IN 10")); break; } uint64_t mod_time = slices[0].to_int64(); @@ -804,7 +804,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func if (image_md5!=file_md5) { atlas_valid=false; - print_line("IMAGE INVALID "+slices[0]); + print_line(TTR("IMAGE INVALID ")+slices[0]); break; } else { resave_deps=true; @@ -825,7 +825,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func f=NULL; } - print_line("ATLAS VALID? "+itos(atlas_valid)+" RESAVE DEPS? "+itos(resave_deps)); + print_line(TTR("ATLAS VALID? ")+itos(atlas_valid)+" RESAVE DEPS? "+itos(resave_deps)); if (!atlas_valid) { rects.clear(); //oh well, atlas is not valid. need to make new one.... @@ -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("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("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); @@ -1016,7 +1016,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func if (remap_files.size()) { Vector remapsprop; for(Map::Element *E=remap_files.front();E;E=E->next()) { - print_line("REMAP: "+String(E->key())+" -> "+E->get()); + print_line(TTR("REMAP: ")+String(E->key())+" -> "+E->get()); remapsprop.push_back(E->key()); remapsprop.push_back(E->get()); } @@ -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("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("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; @@ -1203,7 +1203,7 @@ Error EditorExportPlatform::save_zip_file(void *p_userdata,const String& p_path, Error EditorExportPlatform::save_zip(const String& p_path, bool p_make_bundles) { - EditorProgress ep("savezip","Packing",102); + EditorProgress ep("savezip",TTR("Packing"),102); //FileAccess *tmp = FileAccess::open(tmppath,FileAccess::WRITE); @@ -1226,7 +1226,7 @@ Error EditorExportPlatform::save_zip(const String& p_path, bool p_make_bundles) Error EditorExportPlatform::save_pack(FileAccess *dst,bool p_make_bundles, int p_alignment) { - EditorProgress ep("savepack","Packing",102); + EditorProgress ep("savepack",TTR("Packing"),102); String tmppath = EditorSettings::get_singleton()->get_settings_path()+"/tmp/packtmp"; FileAccess *tmp = FileAccess::open(tmppath,FileAccess::WRITE); @@ -1309,13 +1309,13 @@ Error EditorExportPlatformPC::export_project(const String& p_path, bool p_debug, - EditorProgress ep("export","Exporting for "+get_name(),102); + EditorProgress ep("export",TTR("Exporting for ")+get_name(),102); const int BUFSIZE = 32768; - ep.step("Setting Up..",0); + ep.step(TTR("Setting Up.."),0); String exe_path=""; diff --git a/tools/editor/editor_log.cpp b/tools/editor/editor_log.cpp index bcdafbb06a..8d977b881b 100644 --- a/tools/editor/editor_log.cpp +++ b/tools/editor/editor_log.cpp @@ -185,7 +185,7 @@ EditorLog::EditorLog() { clearbutton = memnew( Button ); hb->add_child(clearbutton); - clearbutton->set_text("Clear"); + clearbutton->set_text(TTR("Clear")); clearbutton->connect("pressed", this,"_clear_request"); ec = memnew( Control); diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 09f85b99f6..691269a220 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