summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/addon_editor_plugin.cpp12
-rw-r--r--tools/editor/animation_editor.cpp166
-rw-r--r--tools/editor/array_property_edit.cpp6
-rw-r--r--tools/editor/call_dialog.cpp14
-rw-r--r--tools/editor/code_editor.cpp40
-rw-r--r--tools/editor/connections_dialog.cpp54
-rw-r--r--tools/editor/create_dialog.cpp16
-rw-r--r--tools/editor/dependency_editor.cpp58
-rw-r--r--tools/editor/editor_data.cpp6
-rw-r--r--tools/editor/editor_dir_dialog.cpp12
-rw-r--r--tools/editor/editor_file_dialog.cpp42
-rw-r--r--tools/editor/editor_file_system.cpp14
-rw-r--r--tools/editor/editor_help.cpp42
-rw-r--r--tools/editor/editor_import_export.cpp44
-rw-r--r--tools/editor/editor_log.cpp2
-rw-r--r--tools/editor/editor_node.cpp452
-rw-r--r--tools/editor/editor_plugin_settings.cpp4
-rw-r--r--tools/editor/editor_reimport_dialog.cpp16
-rw-r--r--tools/editor/editor_run_script.cpp6
-rw-r--r--tools/editor/editor_settings.cpp12
-rw-r--r--tools/editor/editor_sub_scene.cpp6
-rw-r--r--tools/editor/file_type_cache.cpp2
-rw-r--r--tools/editor/fileserver/editor_file_server.cpp10
-rw-r--r--tools/editor/groups_editor.cpp14
-rw-r--r--tools/editor/import_settings.cpp16
-rw-r--r--tools/editor/io_plugins/editor_font_import_plugin.cpp44
-rw-r--r--tools/editor/io_plugins/editor_mesh_import_plugin.cpp18
-rw-r--r--tools/editor/io_plugins/editor_sample_import_plugin.cpp28
-rw-r--r--tools/editor/io_plugins/editor_scene_import_plugin.cpp180
-rw-r--r--tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp46
-rw-r--r--tools/editor/io_plugins/editor_texture_import_plugin.cpp146
-rw-r--r--tools/editor/io_plugins/editor_translation_import_plugin.cpp34
-rw-r--r--tools/editor/multi_node_edit.cpp2
-rw-r--r--tools/editor/plugins/animation_player_editor_plugin.cpp110
-rw-r--r--tools/editor/plugins/animation_player_editor_plugin.h2
-rw-r--r--tools/editor/plugins/animation_tree_editor_plugin.cpp82
-rw-r--r--tools/editor/plugins/animation_tree_editor_plugin.h2
-rw-r--r--tools/editor/plugins/baked_light_baker.cpp28
-rw-r--r--tools/editor/plugins/baked_light_editor_plugin.cpp12
-rw-r--r--tools/editor/plugins/camera_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.cpp126
-rw-r--r--tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp14
-rw-r--r--tools/editor/plugins/collision_polygon_editor_plugin.cpp12
-rw-r--r--tools/editor/plugins/collision_shape_2d_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/color_ramp_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/control_editor_plugin.cpp12
-rw-r--r--tools/editor/plugins/control_editor_plugin.h2
-rw-r--r--tools/editor/plugins/cube_grid_theme_editor_plugin.cpp18
-rw-r--r--tools/editor/plugins/item_list_editor_plugin.cpp12
-rw-r--r--tools/editor/plugins/light_occluder_2d_editor_plugin.cpp18
-rw-r--r--tools/editor/plugins/mesh_editor_plugin.cpp42
-rw-r--r--tools/editor/plugins/multimesh_editor_plugin.cpp60
-rw-r--r--tools/editor/plugins/navigation_polygon_editor_plugin.cpp18
-rw-r--r--tools/editor/plugins/particles_2d_editor_plugin.cpp14
-rw-r--r--tools/editor/plugins/particles_editor_plugin.cpp28
-rw-r--r--tools/editor/plugins/path_2d_editor_plugin.cpp28
-rw-r--r--tools/editor/plugins/path_editor_plugin.cpp20
-rw-r--r--tools/editor/plugins/polygon_2d_editor_plugin.cpp50
-rw-r--r--tools/editor/plugins/resource_preloader_editor_plugin.cpp36
-rw-r--r--tools/editor/plugins/rich_text_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/rich_text_editor_plugin.h2
-rw-r--r--tools/editor/plugins/sample_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/sample_library_editor_plugin.cpp30
-rw-r--r--tools/editor/plugins/sample_player_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp127
-rw-r--r--tools/editor/plugins/shader_editor_plugin.cpp32
-rw-r--r--tools/editor/plugins/shader_graph_editor_plugin.cpp382
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp174
-rw-r--r--tools/editor/plugins/sprite_frames_editor_plugin.cpp56
-rw-r--r--tools/editor/plugins/sprite_region_editor_plugin.cpp16
-rw-r--r--tools/editor/plugins/sprite_region_editor_plugin.h2
-rw-r--r--tools/editor/plugins/stream_editor_plugin.h2
-rw-r--r--tools/editor/plugins/style_box_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/theme_editor_plugin.cpp64
-rw-r--r--tools/editor/plugins/tile_map_editor_plugin.cpp22
-rw-r--r--tools/editor/plugins/tile_set_editor_plugin.cpp20
-rw-r--r--tools/editor/project_export.cpp190
-rw-r--r--tools/editor/project_manager.cpp84
-rw-r--r--tools/editor/project_settings.cpp192
-rw-r--r--tools/editor/property_editor.cpp80
-rw-r--r--tools/editor/pvrtc_compress.cpp6
-rw-r--r--tools/editor/quick_open.cpp6
-rw-r--r--tools/editor/reparent_dialog.cpp12
-rw-r--r--tools/editor/resources_dock.cpp20
-rw-r--r--tools/editor/run_settings_dialog.cpp14
-rw-r--r--tools/editor/scene_tree_dock.cpp90
-rw-r--r--tools/editor/scene_tree_editor.cpp32
-rw-r--r--tools/editor/scenes_dock.cpp46
-rw-r--r--tools/editor/script_create_dialog.cpp46
-rw-r--r--tools/editor/script_editor_debugger.cpp74
-rw-r--r--tools/editor/settings_config_dialog.cpp18
-rw-r--r--tools/editor/spatial_editor_gizmos.cpp36
92 files changed, 2102 insertions, 2103 deletions
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 && idx<animation->get_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 && 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();
@@ -736,7 +736,7 @@ void AnimationKeyEditor::_menu_track(int p_type) {
int idx=selected_track;
if (idx>=0 && idx<animation->get_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<Pair<int,float> > 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<SelectedKey,KeyInfo>::Element *E=selection.back();E;E=E->prev()) {
@@ -1045,7 +1045,7 @@ void AnimationKeyEditor::_cleanup_animation(Ref<Animation> 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<SelectedKey,KeyInfo>::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<SelectedKey,KeyInfo>::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 (newsize<size) {
@@ -109,7 +109,7 @@ bool ArrayPropertyEdit::_set(const StringName& p_name, const Variant& p_value){
Variant new_value=Variant::construct(Variant::Type(type),NULL,0,ce);
UndoRedo *ur = EditorNode::get_singleton()->get_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<Variant>(),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<String> ext;
@@ -180,7 +180,7 @@ void DependencyEditor::_update_list() {
String name = path.get_file();
Ref<Texture> 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<Texture> 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<Texture> 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<String> &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<String> &
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<String> &
type=report[i].get_slice("::",1);
Ref<Texture> 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<Texture> 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<PackedScene> 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_filters<filters.size())
all_filters+=", ...";
- filter->add_item("All Recognized ( "+all_filters+" )");
+ filter->add_item(TTR("All Recognized ( ")+all_filters+" )");
}
for(int i=0;i<filters.size();i++) {
@@ -689,7 +689,7 @@ void EditorFileDialog::update_filters() {
filter->add_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=&pr;
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=&pr;
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<String>& 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<String>& p_filters,
if (!r.ends_with("/"))
r+="/";
- print_line("AT: "+r);
+ print_line(TTR("AT: ")+r);
for(List<String>::Element *E=files.front();E;E=E->next()) {
String fullpath=r+E->get();
for(const List<String>::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<StringName> 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<StringName>::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<uint8_t> data = FileAccess::get_file_as_array(path);
@@ -1016,7 +1016,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func
if (remap_files.size()) {
Vector<String> remapsprop;
for(Map<StringName,StringName>::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<Resource>& 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<Resource>& 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<RES,bool>& 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;i<editor_table.size();i++) {
@@ -923,8 +923,8 @@ void EditorNode::_save_scene_with_preview(String p_file) {
_editor_select(is2d?EDITOR_2D:EDITOR_3D);
VS::get_singleton()->viewport_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<Script> scr = ResourceLoader::load(p_file,"Script",true);
if (scr.is_null()) {
add_io_error("Script Failed to Load:\n"+p_file);
@@ -1236,8 +1236,8 @@ void EditorNode::_dialog_action(String p_file) {
if (ml.is_null()) {
current_option=-1;
//accept->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("Can't load MeshLibrary for merging!.");
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("Can't load MeshLibrary for merging!."));
accept->popup_centered_minsize();
return;
}
@@ -1253,8 +1253,8 @@ void EditorNode::_dialog_action(String p_file) {
Error err = ResourceSaver::save(p_file,ml);
if (err) {
- accept->get_ok()->set_text("I see..");
- accept->set_text("Error saving MeshLibrary!.");
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("Error saving MeshLibrary!."));
accept->popup_centered_minsize();
return;
}
@@ -1271,8 +1271,8 @@ void EditorNode::_dialog_action(String p_file) {
if (file_export_lib_merge->is_pressed()) {
current_option=-1;
//accept->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("Can't load TileSet for merging!.");
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("Can't load TileSet for merging!."));
accept->popup_centered_minsize();
return;
}
@@ -1289,8 +1289,8 @@ void EditorNode::_dialog_action(String p_file) {
Error err = ResourceSaver::save(p_file,ml);
if (err) {
- accept->get_ok()->set_text("I see..");
- accept->set_text("Error saving TileSet!.");
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("Error saving TileSet!."));
accept->popup_centered_minsize();
return;
}
@@ -1306,8 +1306,8 @@ void EditorNode::_dialog_action(String p_file) {
current_option=-1;
//confirmation->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("Can't open export templates zip.");
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("Can't open export templates zip."));
accept->popup_centered_minsize();
return;
@@ -1324,7 +1324,7 @@ void EditorNode::_dialog_action(String p_file) {
ret = unzGoToFirstFile(pkg);
- EditorProgress p("ltask","Loading Export Templates",fc);
+ EditorProgress p("ltask",TTR("Loading Export Templates"),fc);
print_line("BEGIN IMPORT");
fc=0;
@@ -1354,7 +1354,7 @@ void EditorNode::_dialog_action(String p_file) {
file=file.get_file();
- p.step("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);
@@ -1397,7 +1397,7 @@ void EditorNode::_dialog_action(String p_file) {
if (err==ERR_CANT_OPEN) {
config.instance(); // new config
} else if (err!=OK) {
- show_warning("Error trying to save layout!");
+ show_warning(TTR("Error trying to save layout!"));
return;
}
@@ -1409,7 +1409,7 @@ void EditorNode::_dialog_action(String p_file) {
_update_layouts_menu();
if (p_file=="Default") {
- show_warning("Default editor layout overridden.");
+ show_warning(TTR("Default editor layout overridden."));
}
} break;
@@ -1423,7 +1423,7 @@ void EditorNode::_dialog_action(String p_file) {
Error err = config->load(EditorSettings::get_singleton()->get_settings_path().plus_file("editor_layouts.cfg"));
if (err!=OK || !config->has_section(p_file)) {
- show_warning("Layout name not found!");
+ show_warning(TTR("Layout name not found!"));
return;
}
@@ -1440,7 +1440,7 @@ void EditorNode::_dialog_action(String p_file) {
_update_layouts_menu();
if (p_file=="Default") {
- show_warning("Restored Default layout to base settings.");
+ show_warning(TTR("Restored Default layout to base settings."));
}
} break;
@@ -1719,16 +1719,16 @@ void EditorNode::_edit_current() {
PopupMenu *p=object_menu->get_popup();
p->clear();
- p->add_item("Copy Params",OBJECT_COPY_PARAMS);
- p->add_item("Set Params",OBJECT_PASTE_PARAMS);
+ p->add_item(TTR("Copy Params"),OBJECT_COPY_PARAMS);
+ p->add_item(TTR("Set Params"),OBJECT_PASTE_PARAMS);
p->add_separator();
- p->add_item("Paste Resource",RESOURCE_PASTE);
+ p->add_item(TTR("Paste Resource"),RESOURCE_PASTE);
if (is_resource) {
- p->add_item("Copy Resource",RESOURCE_COPY);
- p->add_item("Make Built-In",RESOURCE_UNREF);
+ p->add_item(TTR("Copy Resource"),RESOURCE_COPY);
+ p->add_item(TTR("Make Built-In"),RESOURCE_UNREF);
}
p->add_separator();
- p->add_item("Make Sub-Resources Unique",OBJECT_UNIQUE_RESOURCES);
+ p->add_item(TTR("Make Sub-Resources Unique"),OBJECT_UNIQUE_RESOURCES);
p->add_separator();
p->add_icon_item(gui_base->get_icon("Help","EditorIcons"),"Class Reference",OBJECT_REQUEST_HELP);
List<MethodInfo> methods;
@@ -1755,7 +1755,7 @@ void EditorNode::_edit_current() {
}
//p->add_separator();
- //p->add_item("All Methods",OBJECT_CALL_METHOD);
+ //p->add_item(TTR("All Methods"),OBJECT_CALL_METHOD);
update_keying();
@@ -1817,8 +1817,8 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
if (!scene) {
current_option=-1;
//accept->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("No scene to run exists.");
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("No scene to run exists."));
accept->popup_centered_minsize();
return;
}
@@ -1860,7 +1860,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
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("No main scene has ever been defined.\nSelect one from \"Project Settings\" under the 'application' category.");
accept->popup_centered_minsize();
return;
@@ -1881,8 +1881,8 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
current_option=-1;
//accept->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("Current scene was never saved, please save scene before running.");
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("Current scene was never saved, please save scene before running."));
accept->popup_centered_minsize();
return;
}
@@ -1909,8 +1909,8 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
current_option=-1;
//confirmation->get_cancel()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("Could not start subprocess!");
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("Could not start subprocess!"));
accept->popup_centered_minsize();
return;
@@ -1986,9 +1986,9 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
/*
if (!p_confirmed) {
- confirmation->get_ok()->set_text("Yes");
+ confirmation->get_ok()->set_text(TTR("Yes"));
//confirmation->get_cancel()->show();
- confirmation->set_text("Start a New Scene? (Current will be lost)");
+ confirmation->set_text(TTR("Start a New Scene? (Current will be lost)"));
confirmation->popup_centered_minsize();
break;
}*/
@@ -2023,28 +2023,28 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
if (scene) {
file->set_current_path(scene->get_filename());
};
- file->set_title(p_option==FILE_OPEN_SCENE?"Open Scene":"Open Base Scene");
+ file->set_title(p_option==FILE_OPEN_SCENE?TTR("Open Scene"):"Open Base Scene");
file->popup_centered_ratio();
} break;
case FILE_QUICK_OPEN_SCENE: {
quick_open->popup("PackedScene", true);
- quick_open->set_title("Quick Open Scene..");
+ quick_open->set_title(TTR("Quick Open Scene.."));
} break;
case FILE_QUICK_OPEN_SCRIPT: {
quick_open->popup("Script", true);
- quick_open->set_title("Quick Open Script..");
+ quick_open->set_title(TTR("Quick Open Script.."));
} break;
case FILE_QUICK_OPEN_FILE: {
quick_open->popup("Resource", false, true);
- quick_open->set_title("Quick Search File..");
+ quick_open->set_title(TTR("Quick Search File.."));
} break;
case FILE_RUN_SCRIPT: {
@@ -2062,9 +2062,9 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
case FILE_CLOSE: {
if (!p_confirmed && unsaved_cache) {
- confirmation->get_ok()->set_text("Yes");
+ confirmation->get_ok()->set_text(TTR("Yes"));
//confirmation->get_cancel()->show();
- confirmation->set_text("Close scene? (Unsaved changes will be lost)");
+ confirmation->set_text(TTR("Close scene? (Unsaved changes will be lost)"));
confirmation->popup_centered_minsize();
break;
}
@@ -2103,7 +2103,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
current_option=-1;
//confirmation->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();
break;
@@ -2141,14 +2141,14 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
}
file->popup_centered_ratio();
- file->set_title("Save Scene As..");
+ file->set_title(TTR("Save Scene As.."));
} break;
case FILE_SAVE_BEFORE_RUN: {
if (!p_confirmed) {
- accept->get_ok()->set_text("Yes");
- accept->set_text("This scene has never been saved. Save before running?");
+ accept->get_ok()->set_text(TTR("Yes"));
+ accept->set_text(TTR("This scene has never been saved. Save before running?"));
accept->popup_centered_minsize();
break;
}
@@ -2165,7 +2165,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
current_option=-1;
//confirmation->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();
break;
@@ -2183,8 +2183,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("I see..");
- accept->set_text("Please save the scene first.");
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("Please save the scene first."));
accept->popup_centered_minsize();
break;
@@ -2195,7 +2195,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
file->set_mode(EditorFileDialog::MODE_SAVE_FILE);
file->set_current_path(cpath);
- file->set_title("Save Translatable Strings");
+ file->set_title(TTR("Save Translatable Strings"));
file->popup_centered_ratio();
} break;
@@ -2206,7 +2206,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
current_option=-1;
//confirmation->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(Size2(300,70));;
break;
@@ -2228,8 +2228,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("I see..");
- accept->set_text("Please save the scene first.");
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("Please save the scene first."));
accept->popup_centered(Size2(300,70));;
break;
@@ -2244,7 +2244,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
String target = export_db->get_current_platform();
Ref<EditorExporter> exporter = export_db->get_exporter(target);
if (exporter.is_null()) {
- accept->set_text("No exporter for platform '"+target+"' yet.");
+ accept->set_text(TTR("No exporter for platform '")+target+"' yet.");
accept->popup_centered(Size2(300,70));;
return;
}
@@ -2266,7 +2266,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
current_option=-1;
//confirmation->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 scene.");
accept->popup_centered_minsize();
break;
@@ -2281,7 +2281,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
}
file_export_lib->popup_centered_ratio();
- file_export_lib->set_title("Export Mesh Library");
+ file_export_lib->set_title(TTR("Export Mesh Library"));
} break;
case FILE_EXPORT_TILESET: {
@@ -2295,7 +2295,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
}
file_export_lib->popup_centered_ratio();
- file_export_lib->set_title("Export Tile Set");
+ file_export_lib->set_title(TTR("Export Tile Set"));
} break;
@@ -2311,7 +2311,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
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 selected node.");
accept->popup_centered_minsize();
break;
@@ -2326,9 +2326,9 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
if (!p_confirmed) {
- confirmation->get_ok()->set_text("Quit");
+ confirmation->get_ok()->set_text(TTR("Quit"));
//confirmation->get_cancel()->show();
- confirmation->set_text("Exit the Editor?");
+ confirmation->set_text(TTR("Exit the Editor?"));
confirmation->popup_centered(Size2(180,70));
break;
}
@@ -2342,9 +2342,9 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
if (unsaved_cache && !p_confirmed) {
- confirmation->get_ok()->set_text("Open");
+ confirmation->get_ok()->set_text(TTR("Open"));
//confirmation->get_cancel()->show();
- confirmation->set_text("Current scene not saved. Open anyway?");
+ confirmation->set_text(TTR("Current scene not saved. Open anyway?"));
confirmation->popup_centered_minsize();
break;
@@ -2396,13 +2396,13 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
String filename = scene->get_filename();
if (filename==String()) {
- show_warning("Can't reload a scene that was never saved..");
+ show_warning(TTR("Can't reload a scene that was never saved.."));
break;
}
if (unsaved_cache && !p_confirmed) {
- confirmation->get_ok()->set_text("Revert");
- confirmation->set_text("This action cannot be undone. Revert anyway?");
+ confirmation->get_ok()->set_text(TTR("Revert"));
+ confirmation->set_text(TTR("This action cannot be undone. Revert anyway?"));
confirmation->popup_centered_minsize();
break;
}
@@ -2425,7 +2425,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
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 selected node.");
accept->popup_centered(Size2(300,70));;
break;
@@ -2437,7 +2437,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
current_option=-1;
//confirmation->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 selected node.");
accept->popup_centered(Size2(300,70));;
break;
@@ -2449,8 +2449,8 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
current_option=-1;
//accept->get_cancel()->hide();
- accept->get_ok()->set_text("Ugh");
- accept->set_text(String("Error loading scene from ")+external_file);
+ accept->get_ok()->set_text(TTR("Ugh"));
+ accept->set_text(String(TTR("Error loading scene from "))+external_file);
accept->popup_centered(Size2(300,70));;
return;
}
@@ -2458,7 +2458,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("Instance Scene");
+ editor_data.get_undo_redo().create_action(TTR("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);
@@ -2612,7 +2612,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
if (run_custom_filename.empty() || editor_run.get_status()==EditorRun::STATUS_STOP) {
_menu_option_confirm(RUN_STOP,true);
quick_run->popup("PackedScene",true);
- quick_run->set_title("Quick Run Scene..");
+ quick_run->set_title(TTR("Quick Run Scene.."));
play_custom_scene_button->set_pressed(false);
} else {
String last_custom_scene=run_custom_filename;
@@ -2666,7 +2666,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
case RUN_PROJECT_MANAGER: {
if (!p_confirmed) {
- confirmation->get_ok()->set_text("Yes");
+ confirmation->get_ok()->set_text(TTR("Yes"));
confirmation->set_text("Open Project Manager? \n(Unsaved changes will be lost)");
confirmation->popup_centered_minsize();
break;
@@ -2693,11 +2693,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),"Enable File Server");
+ //debug_button->get_popup()->set_item_text( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),TTR("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),"Disable File Server");
+ //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_checked( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),!ischecked);
@@ -2809,9 +2809,9 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
if (!p_confirmed) {
- confirmation->get_ok()->set_text("Open");
+ confirmation->get_ok()->set_text(TTR("Open"));
//confirmation->get_cancel()->show();
- confirmation->set_text("Current scene changed, save and re-import ?");
+ confirmation->set_text(TTR("Current scene changed, save and re-import ?"));
confirmation->popup_centered(Size2(300,70));
break;
@@ -2824,8 +2824,8 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
current_option=-1;
//accept->get_cancel()->hide();
- 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->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->popup_centered(Size2(300,70));;
break;
@@ -3241,7 +3241,7 @@ Error EditorNode::save_optimized_copy(const String& p_scene,const String& p_pres
if (!get_edited_scene()) {
get_scene()->quit();
- ERR_EXPLAIN("No scene to optimize (loading failed?");
+ ERR_EXPLAIN(TTR("No scene to optimize (loading failed?"));
ERR_FAIL_V(ERR_FILE_NOT_FOUND);
}
@@ -3266,10 +3266,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("I see..");
- accept->set_text("Optimizer preset not found: "+p_preset);
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("Optimizer preset not found: ")+p_preset);
accept->popup_centered(Size2(300,70));;
- ERR_EXPLAIN("Optimizer preset not found: "+p_preset);
+ ERR_EXPLAIN(TTR("Optimizer preset not found: ")+p_preset);
ERR_FAIL_V(ERR_INVALID_PARAMETER);
}
@@ -3289,7 +3289,7 @@ Error EditorNode::save_optimized_copy(const String& p_scene,const String& p_pres
}
}
- ERR_EXPLAIN("Preset '"+p_preset+"' references nonexistent saver: "+type);
+ ERR_EXPLAIN(TTR("Preset '")+p_preset+"' references nonexistent saver: "+type);
ERR_FAIL_COND_V(saver.is_null(),ERR_INVALID_DATA);
List<Variant> keys;
@@ -3324,8 +3324,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("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(Size2(300,70));;
return ERR_INVALID_DATA;
@@ -3335,8 +3335,8 @@ Error EditorNode::save_optimized_copy(const String& p_scene,const String& p_pres
if (err) {
//accept->"()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("Error saving optimized scene: "+path);
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("Error saving optimized scene: ")+path);
accept->popup_centered(Size2(300,70));;
ERR_FAIL_COND_V(err,err);
@@ -3559,8 +3559,8 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo
current_option=-1;
//accept->get_cancel()->hide();
- accept->get_ok()->set_text("Ugh");
- accept->set_text("Error loading scene, it must be inside the project path. Use 'Import' to open the scene, then save it inside the project path.");
+ accept->get_ok()->set_text(TTR("Ugh"));
+ accept->set_text(TTR("Error loading scene, it must be inside the project path. Use 'Import' to open the scene, then save it inside the project path."));
accept->popup_centered_minsize();
opening_prev=false;
return ERR_FILE_NOT_FOUND;
@@ -3588,8 +3588,8 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo
current_option=-1;
//accept->get_cancel()->hide();
- accept->get_ok()->set_text("Ugh");
- accept->set_text("Error loading scene.");
+ accept->get_ok()->set_text(TTR("Ugh"));
+ accept->set_text(TTR("Error loading scene."));
accept->popup_centered_minsize();
opening_prev=false;
@@ -3622,7 +3622,7 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo
for (Map<String,Set<String> >::Element *E=dependency_errors.front();E;E=E->next()) {
- String txt="Scene '"+E->key()+"' has broken dependencies:\n";
+ String txt=TTR("Scene '")+E->key()+"' has broken dependencies:\n";
for(Set<String>::Element *F=E->get().front();F;F=F->next()) {
txt+="\t"+F->get()+"\n";
}
@@ -3649,8 +3649,8 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo
sdata.unref();
current_option=-1;
//accept->get_cancel()->hide();
- accept->get_ok()->set_text("Ugh");
- accept->set_text("Error loading scene.");
+ accept->get_ok()->set_text(TTR("Ugh"));
+ accept->set_text(TTR("Error loading scene."));
accept->popup_centered_minsize();
opening_prev=false;
if (prev!=-1) {
@@ -3758,7 +3758,7 @@ void EditorNode::_transform_keyed(Object *sp,const String& p_sub,const Transform
void EditorNode::update_keying() {
- //print_line("KR: "+itos(p_enabled));
+ //print_line(TTR("KR: ")+itos(p_enabled));
bool valid=false;
@@ -3904,8 +3904,8 @@ void EditorNode::_save_optimized() {
if (err) {
//accept->"()->hide();
- accept->get_ok()->set_text("I see..");
- accept->set_text("Error saving optimized scene: "+path);
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("Error saving optimized scene: ")+path);
accept->popup_centered(Size2(300,70));;
return;
@@ -4589,10 +4589,10 @@ void EditorNode::_update_layouts_menu() {
overridden_default_layout=-1;
editor_layouts->set_size(Vector2());
- editor_layouts->add_item("Save Layout", SETTINGS_LAYOUT_SAVE);
- editor_layouts->add_item("Delete Layout", SETTINGS_LAYOUT_DELETE);
+ editor_layouts->add_item(TTR("Save Layout"), SETTINGS_LAYOUT_SAVE);
+ editor_layouts->add_item(TTR("Delete Layout"), SETTINGS_LAYOUT_DELETE);
editor_layouts->add_separator();
- editor_layouts->add_item("Default", SETTINGS_LAYOUT_DEFAULT);
+ editor_layouts->add_item(TTR("Default"), SETTINGS_LAYOUT_DEFAULT);
Ref<ConfigFile> config;
config.instance();
@@ -4608,7 +4608,7 @@ void EditorNode::_update_layouts_menu() {
String layout=E->get();
- if (layout=="Default") {
+ if (layout==TTR("Default")) {
editor_layouts->remove_item(editor_layouts->get_item_index(SETTINGS_LAYOUT_DEFAULT));
overridden_default_layout=editor_layouts->get_item_count();
}
@@ -4625,15 +4625,15 @@ void EditorNode::_layout_menu_option(int p_id) {
case SETTINGS_LAYOUT_SAVE: {
current_option=p_id;
- layout_dialog->set_title("Save Layout");
- layout_dialog->get_ok()->set_text("Save");
+ layout_dialog->set_title(TTR("Save Layout"));
+ layout_dialog->get_ok()->set_text(TTR("Save"));
layout_dialog->popup_centered();
} break;
case SETTINGS_LAYOUT_DELETE: {
current_option=p_id;
- layout_dialog->set_title("Delete Layout");
- layout_dialog->get_ok()->set_text("Delete");
+ layout_dialog->set_title(TTR("Delete Layout"));
+ layout_dialog->get_ok()->set_text(TTR("Delete"));
layout_dialog->popup_centered();
} break;
case SETTINGS_LAYOUT_DEFAULT: {
@@ -4669,9 +4669,9 @@ void EditorNode::_scene_tab_closed(int p_tab) {
current_option = SCENE_TAB_CLOSE;
tab_closing = p_tab;
if (unsaved_cache) {
- confirmation->get_ok()->set_text("Yes");
+ confirmation->get_ok()->set_text(TTR("Yes"));
//confirmation->get_cancel()->show();
- confirmation->set_text("Close scene? (Unsaved changes will be lost)");
+ confirmation->set_text(TTR("Close scene? (Unsaved changes will be lost)"));
confirmation->popup_centered_minsize();
}
else {
@@ -4697,7 +4697,7 @@ void EditorNode::_scene_tab_changed(int p_tab) {
//print_line("scene tab changed???");
- editor_data.get_undo_redo().create_action("Switch Scene Tab");
+ editor_data.get_undo_redo().create_action(TTR("Switch Scene Tab"));
editor_data.get_undo_redo().add_do_method(this,"set_current_version",unsaved?saved_version:0);
editor_data.get_undo_redo().add_do_method(this,"set_current_scene",p_tab);
//editor_data.get_undo_redo().add_do_method(scene_tabs,"set_current_tab",p_tab);
@@ -5032,7 +5032,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("BodyVolumeConvexPolygon",true);
+ //ObjectTypeDB::set_type_enabled(TTR("BodyVolumeConvexPolygon"),true);
gui_base = memnew( Panel );
add_child(gui_base);
@@ -5305,13 +5305,13 @@ EditorNode::EditorNode() {
file_menu = memnew( MenuButton );
- file_menu->set_text("Scene");
+ file_menu->set_text(TTR("Scene"));
//file_menu->set_icon(gui_base->get_icon("Save","EditorIcons"));
left_menu_hb->add_child( file_menu );
prev_scene = memnew( ToolButton );
prev_scene->set_icon(gui_base->get_icon("PrevScene","EditorIcons"));
- prev_scene->set_tooltip("Go to previously opened scene.");
+ prev_scene->set_tooltip(TTR("Go to previously opened scene."));
prev_scene->set_disabled(true);
//left_menu_hb->add_child( prev_scene );
prev_scene->connect("pressed",this,"_menu_option",make_binds(FILE_OPEN_PREV));
@@ -5322,51 +5322,51 @@ EditorNode::EditorNode() {
Separator *vs=NULL;
- file_menu->set_tooltip("Operations with scene files.");
+ file_menu->set_tooltip(TTR("Operations with scene files."));
p=file_menu->get_popup();
- p->add_item("New Scene",FILE_NEW_SCENE);
- p->add_item("New Inherited Scene..",FILE_NEW_INHERITED_SCENE);
- p->add_item("Open Scene..",FILE_OPEN_SCENE,KEY_MASK_CMD+KEY_O);
+ p->add_item(TTR("New Scene"),FILE_NEW_SCENE);
+ p->add_item(TTR("New Inherited Scene.."),FILE_NEW_INHERITED_SCENE);
+ p->add_item(TTR("Open Scene.."),FILE_OPEN_SCENE,KEY_MASK_CMD+KEY_O);
p->add_separator();
- p->add_item("Save Scene",FILE_SAVE_SCENE,KEY_MASK_CMD+KEY_S);
- p->add_item("Save Scene As..",FILE_SAVE_AS_SCENE,KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_S);
+ p->add_item(TTR("Save Scene"),FILE_SAVE_SCENE,KEY_MASK_CMD+KEY_S);
+ p->add_item(TTR("Save Scene As.."),FILE_SAVE_AS_SCENE,KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_S);
p->add_separator();
- p->add_item("Close Scene",FILE_CLOSE,KEY_MASK_SHIFT+KEY_MASK_CTRL+KEY_W);
+ p->add_item(TTR("Close Scene"),FILE_CLOSE,KEY_MASK_SHIFT+KEY_MASK_CTRL+KEY_W);
p->add_separator();
- p->add_item("Close Goto Prev. Scene",FILE_OPEN_PREV,KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_P);
- p->add_submenu_item("Open Recent","RecentScenes",FILE_OPEN_RECENT);
+ p->add_item(TTR("Close Goto Prev. Scene"),FILE_OPEN_PREV,KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_P);
+ p->add_submenu_item(TTR("Open Recent"),"RecentScenes",FILE_OPEN_RECENT);
p->add_separator();
- p->add_item("Quick Open Scene..",FILE_QUICK_OPEN_SCENE,KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_O);
- p->add_item("Quick Open Script..",FILE_QUICK_OPEN_SCRIPT,KEY_MASK_ALT+KEY_MASK_CMD+KEY_O);
- p->add_item("Quick Search File..",FILE_QUICK_OPEN_FILE,KEY_MASK_ALT+KEY_MASK_CMD+KEY_P);
+ p->add_item(TTR("Quick Open Scene.."),FILE_QUICK_OPEN_SCENE,KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_O);
+ p->add_item(TTR("Quick Open Script.."),FILE_QUICK_OPEN_SCRIPT,KEY_MASK_ALT+KEY_MASK_CMD+KEY_O);
+ p->add_item(TTR("Quick Search File.."),FILE_QUICK_OPEN_FILE,KEY_MASK_ALT+KEY_MASK_CMD+KEY_P);
p->add_separator();
PopupMenu *pm_export = memnew(PopupMenu );
pm_export->set_name("Export");
p->add_child(pm_export);
- p->add_submenu_item("Convert To..","Export");
- pm_export->add_item("Translatable Strings..",FILE_DUMP_STRINGS);
+ p->add_submenu_item(TTR("Convert To.."),"Export");
+ pm_export->add_item(TTR("Translatable Strings.."),FILE_DUMP_STRINGS);
pm_export->add_separator();
- pm_export->add_item("MeshLibrary..",FILE_EXPORT_MESH_LIBRARY);
- pm_export->add_item("TileSet..",FILE_EXPORT_TILESET);
+ pm_export->add_item(TTR("MeshLibrary.."),FILE_EXPORT_MESH_LIBRARY);
+ pm_export->add_item(TTR("TileSet.."),FILE_EXPORT_TILESET);
pm_export->connect("item_pressed",this,"_menu_option");
p->add_separator();
- p->add_item("Undo",EDIT_UNDO,KEY_MASK_CMD+KEY_Z);
- p->add_item("Redo",EDIT_REDO,KEY_MASK_CMD+KEY_MASK_SHIFT+KEY_Z);
+ p->add_item(TTR("Undo"),EDIT_UNDO,KEY_MASK_CMD+KEY_Z);
+ p->add_item(TTR("Redo"),EDIT_REDO,KEY_MASK_CMD+KEY_MASK_SHIFT+KEY_Z);
p->add_separator();
- p->add_item("Run Script",FILE_RUN_SCRIPT,KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_R);
+ p->add_item(TTR("Run Script"),FILE_RUN_SCRIPT,KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_R);
p->add_separator();
- p->add_item("Project Settings",RUN_SETTINGS);
+ p->add_item(TTR("Project Settings"),RUN_SETTINGS);
p->add_separator();
- p->add_item("Revert Scene",EDIT_REVERT);
+ p->add_item(TTR("Revert Scene"),EDIT_REVERT);
p->add_separator();
#ifdef OSX_ENABLED
- p->add_item("Quit to Project List",RUN_PROJECT_MANAGER,KEY_MASK_SHIFT+KEY_MASK_ALT+KEY_Q);
+ p->add_item(TTR("Quit to Project List"),RUN_PROJECT_MANAGER,KEY_MASK_SHIFT+KEY_MASK_ALT+KEY_Q);
#else
- p->add_item("Quit to Project List",RUN_PROJECT_MANAGER,KEY_MASK_SHIFT+KEY_MASK_CTRL+KEY_Q);
+ p->add_item(TTR("Quit to Project List"),RUN_PROJECT_MANAGER,KEY_MASK_SHIFT+KEY_MASK_CTRL+KEY_Q);
#endif
- p->add_item("Quit",FILE_QUIT,KEY_MASK_CMD+KEY_Q);
+ p->add_item(TTR("Quit"),FILE_QUIT,KEY_MASK_CMD+KEY_Q);
recent_scenes = memnew( PopupMenu );
recent_scenes->set_name("RecentScenes");
@@ -5393,20 +5393,20 @@ EditorNode::EditorNode() {
menu_panel->add_child( node_menu );
p=node_menu->get_popup();
- p->add_item("Create",NODE_CREATE);
- p->add_item("Instance",NODE_INSTANCE);
+ p->add_item(TTR("Create"),NODE_CREATE);
+ p->add_item(TTR("Instance"),NODE_INSTANCE);
p->add_separator();
- p->add_item("Reparent",NODE_REPARENT);
- p->add_item("Move Up",NODE_MOVE_UP);
- p->add_item("Move Down",NODE_MOVE_DOWN);
+ 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_separator();
- p->add_item("Duplicate",NODE_DUPLICATE);
+ p->add_item(TTR("Duplicate"),NODE_DUPLICATE);
p->add_separator();
- p->add_item("Remove (Branch)",NODE_REMOVE_BRANCH);
- p->add_item("Remove (Element)",NODE_REMOVE_ELEMENT);
+ p->add_item(TTR("Remove (Branch)"),NODE_REMOVE_BRANCH);
+ p->add_item(TTR("Remove (Element)"),NODE_REMOVE_ELEMENT);
p->add_separator();
- p->add_item("Edit Subscriptions..",NODE_CONNECTIONS);
- p->add_item("Edit Groups..",NODE_GROUPS);
+ p->add_item(TTR("Edit Subscriptions.."),NODE_CONNECTIONS);
+ p->add_item(TTR("Edit Groups.."),NODE_GROUPS);
resource_menu = memnew( MenuButton );
resource_menu->set_text("Resource");
@@ -5415,8 +5415,8 @@ EditorNode::EditorNode() {
#endif
import_menu = memnew( MenuButton );
- import_menu->set_tooltip("Import assets to the project.");
- import_menu->set_text("Import");
+ import_menu->set_tooltip(TTR("Import assets to the project."));
+ import_menu->set_text(TTR("Import"));
//import_menu->set_icon(gui_base->get_icon("Save","EditorIcons"));
left_menu_hb->add_child( import_menu );
@@ -5424,19 +5424,19 @@ EditorNode::EditorNode() {
p->connect("item_pressed",this,"_menu_option");
tool_menu = memnew( MenuButton );
- tool_menu->set_tooltip("Miscelaneous project or scene wide tools.");
- tool_menu->set_text("Tools");
+ tool_menu->set_tooltip(TTR("Miscelaneous project or scene wide tools."));
+ tool_menu->set_text(TTR("Tools"));
//tool_menu->set_icon(gui_base->get_icon("Save","EditorIcons"));
left_menu_hb->add_child( tool_menu );
p=tool_menu->get_popup();
p->connect("item_pressed",this,"_menu_option");
- p->add_item("Orphan Resource Explorer",TOOLS_ORPHAN_RESOURCES);
+ p->add_item(TTR("Orphan Resource Explorer"),TOOLS_ORPHAN_RESOURCES);
export_button = memnew( ToolButton );
- export_button->set_tooltip("Export the project to many platforms.");
- export_button->set_text("Export");
+ export_button->set_tooltip(TTR("Export the project to many platforms."));
+ export_button->set_text(TTR("Export"));
export_button->connect("pressed",this,"_menu_option",varray(FILE_EXPORT_PROJECT));
export_button->set_focus_mode(Control::FOCUS_NONE);
left_menu_hb->add_child(export_button);
@@ -5469,7 +5469,7 @@ EditorNode::EditorNode() {
play_button->set_icon(gui_base->get_icon("MainPlay","EditorIcons"));
play_button->set_focus_mode(Control::FOCUS_NONE);
play_button->connect("pressed", this,"_menu_option",make_binds(RUN_PLAY));
- play_button->set_tooltip("Play the project (F5).");
+ play_button->set_tooltip(TTR("Play the project (F5)."));
@@ -5479,7 +5479,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("Pause the scene (F7).");
+ pause_button->set_tooltip(TTR("Pause the scene (F7)."));
*/
stop_button = memnew( ToolButton );
play_hb->add_child(stop_button);
@@ -5487,7 +5487,7 @@ EditorNode::EditorNode() {
stop_button->set_focus_mode(Control::FOCUS_NONE);
stop_button->set_icon(gui_base->get_icon("MainStop","EditorIcons"));
stop_button->connect("pressed", this,"_menu_option",make_binds(RUN_STOP));
- stop_button->set_tooltip("Stop the scene (F8).");
+ stop_button->set_tooltip(TTR("Stop the scene (F8)."));
run_native = memnew( EditorRunNative);
play_hb->add_child(run_native);
@@ -5507,7 +5507,7 @@ EditorNode::EditorNode() {
play_scene_button->set_focus_mode(Control::FOCUS_NONE);
play_scene_button->set_icon(gui_base->get_icon("PlayScene","EditorIcons"));
play_scene_button->connect("pressed", this,"_menu_option",make_binds(RUN_PLAY_SCENE));
- play_scene_button->set_tooltip("Play the edited scene (F6).");
+ play_scene_button->set_tooltip(TTR("Play the edited scene (F6)."));
play_custom_scene_button = memnew( ToolButton );
play_hb->add_child(play_custom_scene_button);
@@ -5515,7 +5515,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("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);
@@ -5524,17 +5524,17 @@ 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("Debug Options");
+ debug_button->set_tooltip(TTR("Debug Options"));
p=debug_button->get_popup();
- p->add_check_item("Live Editing",RUN_LIVE_DEBUG);
- p->add_check_item("File Server",RUN_FILE_SERVER);
+ p->add_check_item(TTR("Live Editing"),RUN_LIVE_DEBUG);
+ p->add_check_item(TTR("File Server"),RUN_FILE_SERVER);
p->add_separator();
- p->add_check_item("Deploy Remote Debug",RUN_DEPLOY_REMOTE_DEBUG);
- p->add_check_item("Deploy File Server Clients",RUN_DEPLOY_DUMB_CLIENTS);
+ p->add_check_item(TTR("Deploy Remote Debug"),RUN_DEPLOY_REMOTE_DEBUG);
+ p->add_check_item(TTR("Deploy File Server Clients"),RUN_DEPLOY_DUMB_CLIENTS);
p->add_separator();
- p->add_check_item("Visible Collision Shapes",RUN_DEBUG_COLLISONS);
- p->add_check_item("Visible Navigation",RUN_DEBUG_NAVIGATION);
+ p->add_check_item(TTR("Visible Collision Shapes"),RUN_DEBUG_COLLISONS);
+ p->add_check_item(TTR("Visible Navigation"),RUN_DEBUG_NAVIGATION);
p->connect("item_pressed",this,"_menu_option");
/*
@@ -5597,24 +5597,24 @@ EditorNode::EditorNode() {
settings_menu = memnew( MenuButton );
- settings_menu->set_text("Settings");
+ settings_menu->set_text(TTR("Settings"));
//settings_menu->set_anchor(MARGIN_RIGHT,ANCHOR_END);
right_menu_hb->add_child( settings_menu );
p=settings_menu->get_popup();
- //p->add_item("Export Settings",SETTINGS_EXPORT_PREFERENCES);
- p->add_item("Editor Settings",SETTINGS_PREFERENCES);
- //p->add_item("Optimization Presets",SETTINGS_OPTIMIZED_PRESETS);
+ //p->add_item(TTR("Export Settings"),SETTINGS_EXPORT_PREFERENCES);
+ p->add_item(TTR("Editor Settings"),SETTINGS_PREFERENCES);
+ //p->add_item(TTR("Optimization Presets"),SETTINGS_OPTIMIZED_PRESETS);
p->add_separator();
editor_layouts = memnew( PopupMenu );
editor_layouts->set_name("Layouts");
p->add_child(editor_layouts);
editor_layouts->connect("item_pressed",this,"_layout_menu_option");
- p->add_submenu_item("Editor Layout", "Layouts");
+ p->add_submenu_item(TTR("Editor Layout"), "Layouts");
p->add_separator();
- p->add_item("Install Export Templates",SETTINGS_LOAD_EXPORT_TEMPLATES);
+ p->add_item(TTR("Install Export Templates"),SETTINGS_LOAD_EXPORT_TEMPLATES);
p->add_separator();
- p->add_item("About",SETTINGS_ABOUT);
+ p->add_item(TTR("About"),SETTINGS_ABOUT);
layout_dialog = memnew( EditorNameDialog );
gui_base->add_child(layout_dialog);
@@ -5626,15 +5626,15 @@ EditorNode::EditorNode() {
right_menu_hb->add_child(sources_button);
sources_button->set_icon(gui_base->get_icon("DependencyOk","EditorIcons"));
sources_button->connect("pressed",this,"_menu_option",varray(SOURCES_REIMPORT));
- sources_button->set_tooltip("Alerts when an external resource has changed.");
+ sources_button->set_tooltip(TTR("Alerts when an external resource has changed."));
update_menu = memnew( MenuButton );
- update_menu->set_tooltip("Spins when the editor window repaints!");
+ update_menu->set_tooltip(TTR("Spins when the editor window repaints!"));
right_menu_hb->add_child(update_menu);
update_menu->set_icon(gui_base->get_icon("Progress1","EditorIcons"));
p=update_menu->get_popup();
- p->add_check_item("Update Always",SETTINGS_UPDATE_ALWAYS);
- p->add_check_item("Update Changes",SETTINGS_UPDATE_CHANGES);
+ p->add_check_item(TTR("Update Always"),SETTINGS_UPDATE_ALWAYS);
+ p->add_check_item(TTR("Update Changes"),SETTINGS_UPDATE_CHANGES);
p->set_item_checked(1,true);
//sources_button->connect();
@@ -5657,12 +5657,12 @@ EditorNode::EditorNode() {
//top_pallete = memnew( TabContainer );
scene_tree_dock = memnew( SceneTreeDock(this,scene_root,editor_selection,editor_data) );
- scene_tree_dock->set_name("Scene");
+ scene_tree_dock->set_name(TTR("Scene"));
//top_pallete->add_child(scene_tree_dock);
dock_slot[DOCK_SLOT_LEFT_UR]->add_child(scene_tree_dock);
#if 0
resources_dock = memnew( ResourcesDock(this) );
- resources_dock->set_name("Resources");
+ resources_dock->set_name(TTR("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);
@@ -5688,7 +5688,7 @@ EditorNode::EditorNode() {
prop_pallete->set_area_as_parent_rect();*/
VBoxContainer *prop_editor_base = memnew( VBoxContainer );
- prop_editor_base->set_name("Inspector"); // Properties?
+ prop_editor_base->set_name(TTR("Inspector")); // Properties?
dock_slot[DOCK_SLOT_RIGHT_UL]->add_child(prop_editor_base);
HBoxContainer *prop_editor_hb = memnew( HBoxContainer );
@@ -5696,25 +5696,25 @@ EditorNode::EditorNode() {
prop_editor_base->add_child(prop_editor_hb);
resource_new_button = memnew( ToolButton );
- resource_new_button->set_tooltip("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("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("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("Save",RESOURCE_SAVE);
- resource_save_button->get_popup()->add_item("Save As..",RESOURCE_SAVE_AS);
+ resource_save_button->get_popup()->add_item(TTR("Save"),RESOURCE_SAVE);
+ resource_save_button->get_popup()->add_item(TTR("Save As.."),RESOURCE_SAVE_AS);
resource_save_button->get_popup()->connect("item_pressed",this,"_menu_option");
resource_save_button->set_focus_mode(Control::FOCUS_NONE);
resource_save_button->set_disabled(true);
@@ -5724,7 +5724,7 @@ EditorNode::EditorNode() {
property_back = memnew( ToolButton );
property_back->set_icon( gui_base->get_icon("Back","EditorIcons") );
property_back->set_flat(true);
- property_back->set_tooltip("Go to the previous edited object in history.");
+ property_back->set_tooltip(TTR("Go to the previous edited object in history."));
property_back->set_disabled(true);
prop_editor_hb->add_child( property_back );
@@ -5732,14 +5732,14 @@ EditorNode::EditorNode() {
property_forward = memnew( ToolButton );
property_forward->set_icon( gui_base->get_icon("Forward","EditorIcons") );
property_forward->set_flat(true);
- property_forward->set_tooltip("Go to the next edited object in history.");
+ property_forward->set_tooltip(TTR("Go to the next edited object in history."));
property_forward->set_disabled(true);
prop_editor_hb->add_child( property_forward );
editor_history_menu = memnew( MenuButton );
- editor_history_menu->set_tooltip("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");
@@ -5763,7 +5763,7 @@ EditorNode::EditorNode() {
object_menu = memnew( MenuButton );
object_menu->set_icon(gui_base->get_icon("Tools","EditorIcons"));
prop_editor_hb->add_child( object_menu );
- object_menu->set_tooltip("Object properties.");
+ object_menu->set_tooltip(TTR("Object properties."));
create_dialog = memnew( CreateDialog );
gui_base->add_child(create_dialog);
@@ -5775,7 +5775,7 @@ EditorNode::EditorNode() {
prop_editor_base->add_child(search_bar);
search_bar->hide();
- Label *l = memnew( Label("Search: ") );
+ Label *l = memnew( Label(TTR("Search: ")) );
search_bar->add_child(l);
search_box = memnew( LineEdit );
@@ -5801,7 +5801,7 @@ EditorNode::EditorNode() {
scenes_dock = memnew( ScenesDock(this) );
- scenes_dock->set_name("FileSystem");
+ scenes_dock->set_name(TTR("FileSystem"));
scenes_dock->set_use_thumbnails(int(EditorSettings::get_singleton()->get("file_dialog/display_mode"))==EditorFileDialog::DISPLAY_THUMBNAILS);
dock_slot[DOCK_SLOT_LEFT_BR]->add_child(scenes_dock);
//prop_pallete->add_child(scenes_dock);
@@ -5812,9 +5812,9 @@ EditorNode::EditorNode() {
overridden_default_layout=-1;
default_layout.instance();
- default_layout->set_value(docks_section, "dock_3", "Scene");
- default_layout->set_value(docks_section, "dock_4", "FileSystem");
- default_layout->set_value(docks_section, "dock_5", "Inspector");
+ default_layout->set_value(docks_section, "dock_3", TTR("Scene"));
+ default_layout->set_value(docks_section, "dock_4", TTR("FileSystem"));
+ default_layout->set_value(docks_section, "dock_5", TTR("Inspector"));
for(int i=0;i<DOCK_SLOT_MAX/2;i++)
default_layout->set_value(docks_section, "dock_hsplit_"+itos(i+1), 0);
@@ -5839,7 +5839,7 @@ EditorNode::EditorNode() {
log = memnew( EditorLog );
- add_bottom_panel_item("Output",log);
+ add_bottom_panel_item(TTR("Output"),log);
//left_split->set_dragger_visible(false);
@@ -5940,8 +5940,8 @@ EditorNode::EditorNode() {
gui_base->add_child(project_settings);
import_confirmation = memnew( ConfirmationDialog );
- import_confirmation->get_ok()->set_text("Re-Import");
- import_confirmation->add_button("Update",!OS::get_singleton()->get_swap_ok_cancel(),"update");
+ import_confirmation->get_ok()->set_text(TTR("Re-Import"));
+ import_confirmation->add_button(TTR("Update"),!OS::get_singleton()->get_swap_ok_cancel(),"update");
import_confirmation->get_label()->set_align(Label::ALIGN_CENTER);
import_confirmation->connect("confirmed",this,"_import_action",make_binds("re-import"));
import_confirmation->connect("custom_action",this,"_import_action");
@@ -5960,9 +5960,9 @@ EditorNode::EditorNode() {
about = memnew( AcceptDialog );
- about->set_title("Thanks so Much!");
+ about->set_title(TTR("Thanks so Much!"));
//about->get_cancel()->hide();
- about->get_ok()->set_text("Thanks!");
+ about->get_ok()->set_text(TTR("Thanks!"));
about->set_hide_on_ok(true);
Label *about_text = memnew( Label );
about_text->set_text(VERSION_FULL_NAME"\n(c) 2008-2016 Juan Linietsky, Ariel Manzur.\n");
@@ -5980,7 +5980,7 @@ EditorNode::EditorNode() {
file_templates = memnew( FileDialog );
- file_templates->set_title("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);
@@ -5996,15 +5996,15 @@ EditorNode::EditorNode() {
file_export = memnew( FileDialog );
file_export->set_access(FileDialog::ACCESS_FILESYSTEM);
gui_base->add_child(file_export);
- file_export->set_title("Export Project");
+ file_export->set_title(TTR("Export Project"));
file_export->connect("file_selected", this,"_dialog_action");
file_export_lib = memnew( FileDialog );
- file_export_lib->set_title("Export Library");
+ file_export_lib->set_title(TTR("Export Library"));
file_export_lib->set_mode(FileDialog::MODE_SAVE_FILE);
file_export_lib->connect("file_selected", this,"_dialog_action");
file_export_lib_merge = memnew( CheckButton );
- file_export_lib_merge->set_text("Merge With Existing");
+ file_export_lib_merge->set_text(TTR("Merge With Existing"));
file_export_lib_merge->set_pressed(true);
file_export_lib->get_vbox()->add_child(file_export_lib_merge);
gui_base->add_child(file_export_lib);
@@ -6015,11 +6015,11 @@ EditorNode::EditorNode() {
file_export_password = memnew( LineEdit );
file_export_password->set_secret(true);
file_export_password->set_editable(false);
- file_export->get_vbox()->add_margin_child("Password:",file_export_password);
+ file_export->get_vbox()->add_margin_child(TTR("Password:"),file_export_password);
file_script = memnew( FileDialog );
- file_script->set_title("Open & Run a Script");
+ file_script->set_title(TTR("Open & Run a Script"));
file_script->set_access(FileDialog::ACCESS_FILESYSTEM);
file_script->set_mode(FileDialog::MODE_OPEN_FILE);
List<String> sexts;
@@ -6216,7 +6216,7 @@ EditorNode::EditorNode() {
load_errors->set_readonly(true);
load_error_dialog = memnew( AcceptDialog );
load_error_dialog->add_child(load_errors);
- load_error_dialog->set_title("Load Errors");
+ load_error_dialog->set_title(TTR("Load Errors"));
load_error_dialog->set_child_rect(load_errors);
add_child(load_error_dialog);
diff --git a/tools/editor/editor_plugin_settings.cpp b/tools/editor/editor_plugin_settings.cpp
index d78e43c578..3eefe10448 100644
--- a/tools/editor/editor_plugin_settings.cpp
+++ b/tools/editor/editor_plugin_settings.cpp
@@ -152,7 +152,7 @@ EditorPluginSettings::EditorPluginSettings() {
HBoxContainer *title_hb = memnew( HBoxContainer );
title_hb->add_child(memnew( Label("Installed Plugins:")));
title_hb->add_spacer();
- update_list = memnew( Button("Update") );
+ update_list = memnew( Button(TTR("Update")) );
update_list->connect("pressed",this,"update_plugins");
title_hb->add_child(update_list);
add_child(title_hb);
@@ -161,7 +161,7 @@ EditorPluginSettings::EditorPluginSettings() {
plugin_list->set_v_size_flags(SIZE_EXPAND_FILL);
plugin_list->set_columns(4);
plugin_list->set_column_titles_visible(true);
- plugin_list->set_column_title(0,"Name:");
+ plugin_list->set_column_title(0,TTR("Name:"));
plugin_list->set_column_title(1,"Version:");
plugin_list->set_column_title(2,"Author:");
plugin_list->set_column_title(3,"Status:");
diff --git a/tools/editor/editor_reimport_dialog.cpp b/tools/editor/editor_reimport_dialog.cpp
index eab5a5e32d..244642b7a6 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("Please wait for scan to complete");
+ error->set_text(TTR("Please wait for scan to complete"));
error->popup_centered_minsize();
return;
}
@@ -69,17 +69,17 @@ void EditorReImportDialog::popup_reimport() {
if (scene_must_save) {
if (EditorNode::get_singleton()->get_edited_scene() && EditorNode::get_singleton()->get_edited_scene()->get_filename()=="") {
- error->set_text("Current scene must be saved to re-import.");
+ error->set_text(TTR("Current scene must be saved to re-import."));
error->popup_centered_minsize();
- get_ok()->set_text("Re-Import");
+ get_ok()->set_text(TTR("Re-Import"));
get_ok()->set_disabled(true);
return;
}
get_ok()->set_disabled(false);
- get_ok()->set_text("Save & Re-Import");
+ get_ok()->set_text(TTR("Save & Re-Import"));
} else {
- get_ok()->set_text("Re-Import");
+ get_ok()->set_text(TTR("Re-Import"));
get_ok()->set_disabled(false);
}
@@ -92,14 +92,14 @@ void EditorReImportDialog::popup_reimport() {
void EditorReImportDialog::ok_pressed() {
if (EditorFileSystem::get_singleton()->is_scanning()) {
- error->set_text("Please wait for scan to complete");
+ error->set_text(TTR("Please wait for scan to complete"));
error->popup_centered_minsize();
return;
}
- EditorProgress ep("reimport","Re-Importing",items.size());
+ EditorProgress ep("reimport",TTR("Re-Importing"),items.size());
String reload_fname;
if (scene_must_save && EditorNode::get_singleton()->get_edited_scene()) {
reload_fname = EditorNode::get_singleton()->get_edited_scene()->get_filename();
@@ -136,7 +136,7 @@ EditorReImportDialog::EditorReImportDialog() {
add_child(tree);
tree->set_hide_root(true);
set_child_rect(tree);
- set_title("Re-Import Changed Resources");
+ set_title(TTR("Re-Import Changed Resources"));
error = memnew( AcceptDialog);
add_child(error);
scene_must_save=false;
diff --git a/tools/editor/editor_run_script.cpp b/tools/editor/editor_run_script.cpp
index 90581374f6..65aaf3d734 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("EditorScript::add_root_node : Write your logic in the _run() method.");
+ EditorNode::add_io_error(TTR("EditorScript::add_root_node : Write your logic in the _run() method."));
return;
}
if (editor->get_edited_scene()) {
- EditorNode::add_io_error("EditorScript::add_root_node : There is an edited scene already.");
+ EditorNode::add_io_error(TTR("EditorScript::add_root_node : 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("EditorScript::get_scene : Write your logic in the _run() method.");
+ EditorNode::add_io_error(TTR("EditorScript::get_scene : Write your logic in the _run() method."));
return NULL;
}
diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp
index cf9353a857..5a58288822 100644
--- a/tools/editor/editor_settings.cpp
+++ b/tools/editor/editor_settings.cpp
@@ -257,13 +257,13 @@ void EditorSettings::create() {
if (!dir->file_exists(config_file)) {
memdelete(dir);
- WARN_PRINT("Config file does not exist, creating.")
+ WARN_PRINT("Config file does not exist, creating.");
goto fail;
}
memdelete(dir);
- singleton = ResourceLoader::load(config_file_path,"EditorSettings");
+ singleton = ResourceLoader::load(config_file_path,TTR("EditorSettings"));
if (singleton.is_null()) {
WARN_PRINT("Could not open config file.");
goto fail;
@@ -275,7 +275,7 @@ void EditorSettings::create() {
if (OS::get_singleton()->is_stdout_verbose()) {
- print_line("EditorSettings: Load OK!");
+ print_line(TTR("EditorSettings: Load OK!"));
}
singleton->setup_network();
@@ -365,7 +365,7 @@ void EditorSettings::save() {
}
if (OS::get_singleton()->is_stdout_verbose()) {
- print_line("EditorSettings Save OK!");
+ print_line(TTR("EditorSettings Save OK!"));
}
}
@@ -462,7 +462,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
set("game_window_placement/rect",0);
hints["game_window_placement/rect"]=PropertyInfo(Variant::INT,"game_window_placement/rect",PROPERTY_HINT_ENUM,"Default,Centered,Custom Position,Force Maximized,Force Full Screen");
- String screen_hints="Default (Same as Editor)";
+ String screen_hints=TTR("Default (Same as Editor)");
for(int i=0;i<OS::get_singleton()->get_screen_count();i++) {
screen_hints+=",Monitor "+itos(i+1);
}
@@ -498,7 +498,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
#else
hints["import/pvrtc_texture_tool"]=PropertyInfo(Variant::STRING,"import/pvrtc_texture_tool",PROPERTY_HINT_GLOBAL_FILE,"");
#endif
- set("PVRTC/fast_conversion",false);
+ set(TTR("PVRTC/fast_conversion"),false);
set("run/auto_save_before_running",true);
diff --git a/tools/editor/editor_sub_scene.cpp b/tools/editor/editor_sub_scene.cpp
index c5a4f6d58b..941ff6be1c 100644
--- a/tools/editor/editor_sub_scene.cpp
+++ b/tools/editor/editor_sub_scene.cpp
@@ -198,7 +198,7 @@ EditorSubScene::EditorSubScene() {
scene=NULL;
- set_title("Select Sub-Scene..");
+ set_title(TTR("Select Sub-Scene.."));
set_hide_on_ok(false);
VBoxContainer *vb = memnew( VBoxContainer );
@@ -214,11 +214,11 @@ EditorSubScene::EditorSubScene() {
b->set_text(" .. ");
hb->add_child(b);
b->connect("pressed",this,"_path_browse");
- vb->add_margin_child("Scene Path:",hb);
+ vb->add_margin_child(TTR("Scene Path:"),hb);
tree = memnew( Tree );
tree->set_v_size_flags(SIZE_EXPAND_FILL);
- vb->add_margin_child("Import From Node:",tree,true);
+ vb->add_margin_child(TTR("Import From Node:"),tree,true);
tree->connect("item_activated",this,"_ok",make_binds(),CONNECT_DEFERRED);
file_dialog = memnew( EditorFileDialog );
diff --git a/tools/editor/file_type_cache.cpp b/tools/editor/file_type_cache.cpp
index 7044a9900c..8a47f49b03 100644
--- a/tools/editor/file_type_cache.cpp
+++ b/tools/editor/file_type_cache.cpp
@@ -85,7 +85,7 @@ void FileTypeCache::save() {
FileAccess *f =FileAccess::open(project+"/file_type_cache.cch",FileAccess::WRITE);
if (!f) {
- ERR_EXPLAIN("Can't open file_type_cache.cch for writing, not saving file type cache!");
+ ERR_EXPLAIN(TTR("Can't open file_type_cache.cch for writing, not saving file type cache!"));
ERR_FAIL();
}
diff --git a/tools/editor/fileserver/editor_file_server.cpp b/tools/editor/fileserver/editor_file_server.cpp
index ea95e4da1c..82dcd7819b 100644
--- a/tools/editor/fileserver/editor_file_server.cpp
+++ b/tools/editor/fileserver/editor_file_server.cpp
@@ -124,13 +124,13 @@ void EditorFileServer::_subthread_start(void*s) {
s.parse_utf8(fileutf8.ptr());
if (cmd==FileAccessNetwork::COMMAND_FILE_EXISTS) {
- print_line("FILE EXISTS: "+s);
+ print_line(TTR("FILE EXISTS: ")+s);
}
if (cmd==FileAccessNetwork::COMMAND_GET_MODTIME) {
- print_line("MOD TIME: "+s);
+ print_line(TTR("MOD TIME: ")+s);
}
if (cmd==FileAccessNetwork::COMMAND_OPEN_FILE) {
- print_line("OPEN: "+s);
+ print_line(TTR("OPEN: ")+s);
}
if ( !s.begins_with("res://")) {
@@ -218,7 +218,7 @@ void EditorFileServer::_subthread_start(void*s) {
int read = cd->files[id]->get_buffer(buf.ptr(),blocklen);
ERR_CONTINUE(read<0);
- print_line("GET BLOCK - offset: "+itos(offset)+", blocklen: "+itos(blocklen));
+ print_line(TTR("GET BLOCK - offset: ")+itos(offset)+", blocklen: "+itos(blocklen));
//not found, continue
encode_uint32(id,buf4);
@@ -235,7 +235,7 @@ void EditorFileServer::_subthread_start(void*s) {
} break;
case FileAccessNetwork::COMMAND_CLOSE: {
- print_line("CLOSED");
+ print_line(TTR("CLOSED"));
ERR_CONTINUE(!cd->files.has(id));
memdelete(cd->files[id]);
cd->files.erase(id);
diff --git a/tools/editor/groups_editor.cpp b/tools/editor/groups_editor.cpp
index 4b1096148a..906ee27d1b 100644
--- a/tools/editor/groups_editor.cpp
+++ b/tools/editor/groups_editor.cpp
@@ -43,7 +43,7 @@ void GroupsEditor::_add_group(const String& p_group) {
if (node->is_in_group(name))
return;
- undo_redo->create_action("Add to Group");
+ undo_redo->create_action(TTR("Add to Group"));
undo_redo->add_do_method(node,"add_to_group",name,true);
undo_redo->add_do_method(this,"update_tree");
@@ -66,7 +66,7 @@ void GroupsEditor::_remove_group(Object *p_item, int p_column, int p_id) {
String name = ti->get_text(0);
- undo_redo->create_action("Remove from Group");
+ undo_redo->create_action(TTR("Remove from Group"));
undo_redo->add_do_method(node,"remove_from_group",name);
undo_redo->add_do_method(this,"update_tree");
@@ -125,14 +125,14 @@ GroupsEditor::GroupsEditor() {
node=NULL;
- set_title("Group Editor");
+ set_title(TTR("Group Editor"));
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
HBoxContainer *hbc = memnew( HBoxContainer );
- vbc->add_margin_child("Group", hbc);
+ vbc->add_margin_child(TTR("Group"), hbc);
group_name = memnew( LineEdit );
group_name->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -140,17 +140,17 @@ GroupsEditor::GroupsEditor() {
group_name->connect("text_entered",this,"_add_group");
add = memnew( Button );
- add->set_text("Add");
+ add->set_text(TTR("Add"));
hbc->add_child(add);
add->connect("pressed", this,"_add_group", varray(String()));
tree = memnew( Tree );
tree->set_hide_root(true);
tree->set_v_size_flags(SIZE_EXPAND_FILL);
- vbc->add_margin_child("Node Group(s)", tree, true);
+ vbc->add_margin_child(TTR("Node Group(s)"), tree, true);
tree->connect("button_pressed",this,"_remove_group");
- get_ok()->set_text("Close");
+ get_ok()->set_text(TTR("Close"));
}
GroupsEditor::~GroupsEditor()
diff --git a/tools/editor/import_settings.cpp b/tools/editor/import_settings.cpp
index 2bbd1e3805..057c94fad4 100644
--- a/tools/editor/import_settings.cpp
+++ b/tools/editor/import_settings.cpp
@@ -99,7 +99,7 @@ void ImportSettingsDialog::_button_pressed(Object *p_button, int p_col, int p_id
if (!ti)
return;
String path = ti->get_metadata(0);
- print_line("PATH: "+path);
+ print_line(TTR("PATH: ")+path);
Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(path);
ERR_FAIL_COND(rimd.is_null());
Ref<EditorImportPlugin> rimp = EditorImportExport::get_singleton()->get_import_plugin_by_name(rimd->get_editor());
@@ -256,7 +256,7 @@ void ImportSettingsDialog::ok_pressed() {
return;
String path = ti->get_metadata(0);
- print_line("PATH: "+path);
+ print_line(TTR("PATH: ")+path);
Ref<ResourceImportMetadata> rimd = ResourceLoader::load_import_metadata(path);
ERR_FAIL_COND(rimd.is_null());
Ref<EditorImportPlugin> rimp = EditorImportExport::get_singleton()->get_import_plugin_by_name(rimd->get_editor());
@@ -271,14 +271,14 @@ ImportSettingsDialog::ImportSettingsDialog(EditorNode *p_editor) {
editor=p_editor;
- get_ok()->set_text("Close");
+ get_ok()->set_text(TTR("Close"));
tree = memnew( Tree );
add_child(tree);
set_child_rect(tree);
- set_title("Imported Resources");
+ set_title(TTR("Imported Resources"));
- texformat="Keep,None,Disk,VRAM";
+ texformat=TTR("Keep,None,Disk,VRAM");
tree->set_hide_root(true);
tree->set_columns(2);
@@ -288,9 +288,9 @@ ImportSettingsDialog::ImportSettingsDialog(EditorNode *p_editor) {
tree->connect("item_edited",this,"_item_edited");
tree->connect("button_pressed",this,"_button_pressed");
-// add_button("Re-Import","reimport");
- get_ok()->set_text("Re-Import");
- get_cancel()->set_text("Close");
+// add_button(TTR("Re-Import"),"reimport");
+ get_ok()->set_text(TTR("Re-Import"));
+ get_cancel()->set_text(TTR("Close"));
updating=false;
edited=NULL;
diff --git a/tools/editor/io_plugins/editor_font_import_plugin.cpp b/tools/editor/io_plugins/editor_font_import_plugin.cpp
index ec251c546e..8cfa9ab6b4 100644
--- a/tools/editor/io_plugins/editor_font_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_font_import_plugin.cpp
@@ -509,13 +509,13 @@ class EditorFontImportDialog : public ConfirmationDialog {
void _import() {
if (source->get_line_edit()->get_text()=="") {
- error_dialog->set_text("No source font file!");
+ error_dialog->set_text(TTR("No source font file!"));
error_dialog->popup_centered(Size2(200,100));
return;
}
if (dest->get_line_edit()->get_text()=="") {
- error_dialog->set_text("No target font resource!");
+ error_dialog->set_text(TTR("No target font resource!"));
error_dialog->popup_centered(Size2(200,100));
return;
}
@@ -527,7 +527,7 @@ class EditorFontImportDialog : public ConfirmationDialog {
Ref<ResourceImportMetadata> rimd = get_rimd();
if (rimd.is_null()) {
- error_dialog->set_text("Can't load/process source font");
+ error_dialog->set_text(TTR("Can't load/process source font"));
error_dialog->popup_centered(Size2(200,100));
return;
}
@@ -535,7 +535,7 @@ class EditorFontImportDialog : public ConfirmationDialog {
Error err = plugin->import(dest->get_line_edit()->get_text(),rimd);
if (err!=OK) {
- error_dialog->set_text("Couldn't save font.");
+ error_dialog->set_text(TTR("Couldn't save font."));
error_dialog->popup_centered(Size2(200,100));
return;
}
@@ -624,9 +624,9 @@ public:
source->get_file_dialog()->add_filter("*.fnt;BMFont");
source->get_line_edit()->connect("text_entered",this,"_src_changed");
- vbl->add_margin_child("Source Font:",source);
+ vbl->add_margin_child(TTR("Source Font:"),source);
font_size = memnew( SpinBox );
- vbl->add_margin_child("Source Font Size:",font_size);
+ vbl->add_margin_child(TTR("Source Font Size:"),font_size);
font_size->set_min(3);
font_size->set_max(256);
font_size->set_val(16);
@@ -641,10 +641,10 @@ public:
// dest->get_file_dialog()->add_filter("*."+E->get());
//}
- vbl->add_margin_child("Dest Resource:",dest);
+ vbl->add_margin_child(TTR("Dest Resource:"),dest);
HBoxContainer *testhb = memnew( HBoxContainer );
test_string = memnew( LineEdit );
- test_string->set_text("The quick brown fox jumps over the lazy dog.");
+ test_string->set_text(TTR("The quick brown fox jumps over the lazy dog."));
test_string->set_h_size_flags(SIZE_EXPAND_FILL);
test_string->set_stretch_ratio(5);
@@ -657,19 +657,19 @@ public:
testhb->add_child(test_color);
vbl->add_spacer();
- vbl->add_margin_child("Test: ",testhb);
+ vbl->add_margin_child(TTR("Test: "),testhb);
/*
HBoxContainer *upd_hb = memnew( HBoxContainer );
// vbl->add_child(upd_hb);
upd_hb->add_spacer();
Button *update = memnew( Button);
upd_hb->add_child(update);
- update->set_text("Update");
+ update->set_text(TTR("Update"));
update->connect("pressed",this,"_update");
*/
options = memnew( _EditorFontImportOptions );
prop_edit = memnew( PropertyEditor() );
- vbr->add_margin_child("Options:",prop_edit,true);
+ vbr->add_margin_child(TTR("Options:"),prop_edit,true);
options->connect("changed",this,"_prop_changed");
prop_edit->hide_top_label();
@@ -682,7 +682,7 @@ public:
test_label->set_area_as_parent_rect();
panel->set_v_size_flags(SIZE_EXPAND_FILL);
test_string->connect("text_changed",this,"_update_text2");
- set_title("Font Import");
+ set_title(TTR("Font Import"));
timer = memnew( Timer );
add_child(timer);
timer->connect("timeout",this,"_update");
@@ -690,11 +690,11 @@ public:
timer->set_one_shot(true);
get_ok()->connect("pressed", this,"_import");
- get_ok()->set_text("Import");
+ get_ok()->set_text(TTR("Import"));
error_dialog = memnew ( ConfirmationDialog );
add_child(error_dialog);
- error_dialog->get_ok()->set_text("Accept");
+ error_dialog->get_ok()->set_text(TTR("Accept"));
set_hide_on_ok(false);
@@ -887,7 +887,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
if (src_path.extension().to_lower()=="fnt") {
if (ResourceLoader::load(src_path).is_valid()) {
- EditorNode::get_singleton()->show_warning("Path: "+src_path+"\nIs a Godot font file, please supply a BMFont type file instead.");
+ EditorNode::get_singleton()->show_warning(TTR("Path: ")+src_path+"\nIs a Godot font file, please supply a BMFont type file instead.");
return Ref<BitmapFont>();
}
@@ -895,7 +895,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
font.instance();
Error err = font->create_from_fnt(src_path);
if (err) {
- EditorNode::get_singleton()->show_warning("Path: "+src_path+"\nFailed opening as BMFont file.");
+ EditorNode::get_singleton()->show_warning(TTR("Path: ")+src_path+"\nFailed opening as BMFont file.");
return Ref<BitmapFont>();
}
@@ -912,18 +912,18 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
int error = FT_Init_FreeType( &library );
- ERR_EXPLAIN("Error initializing FreeType.");
+ ERR_EXPLAIN(TTR("Error initializing FreeType."));
ERR_FAIL_COND_V( error !=0, Ref<BitmapFont>() );
print_line("loadfrom: "+src_path);
error = FT_New_Face( library, src_path.utf8().get_data(),0,&face );
if ( error == FT_Err_Unknown_File_Format ) {
- ERR_EXPLAIN("Unknown font format.");
+ ERR_EXPLAIN(TTR("Unknown font format."));
FT_Done_FreeType( library );
} else if ( error ) {
- ERR_EXPLAIN("Error loading font.");
+ ERR_EXPLAIN(TTR("Error loading font."));
FT_Done_FreeType( library );
}
@@ -939,7 +939,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
if ( error ) {
FT_Done_FreeType( library );
- ERR_EXPLAIN("Invalid font size. ");
+ ERR_EXPLAIN(TTR("Invalid font size. "));
ERR_FAIL_COND_V( error,Ref<BitmapFont>() );
}
@@ -986,7 +986,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
if ( !fa ) {
FT_Done_FreeType( library );
- ERR_EXPLAIN("Invalid font custom source. ");
+ ERR_EXPLAIN(TTR("Invalid font custom source. "));
ERR_FAIL_COND_V( !fa,Ref<BitmapFont>() );
}
@@ -1506,7 +1506,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
EditorAtlas::fit(sizes,res,res_size);
res_size.x=nearest_power_of_2(res_size.x);
res_size.y=nearest_power_of_2(res_size.y);
- print_line("Atlas size: "+res_size);
+ print_line(TTR("Atlas size: ")+res_size);
Image atlas(res_size.x,res_size.y,0,Image::FORMAT_RGBA);
diff --git a/tools/editor/io_plugins/editor_mesh_import_plugin.cpp b/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
index b32ab8cb0b..e628bed2dd 100644
--- a/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
@@ -202,7 +202,7 @@ public:
Vector<String> meshes = import_path->get_text().split(",");
if (meshes.size()==0) {
- error_dialog->set_text("No meshes to import!");
+ error_dialog->set_text(TTR("No meshes to import!"));
error_dialog->popup_centered_minsize();
return;
}
@@ -226,7 +226,7 @@ public:
String dst = save_path->get_text();
if (dst=="") {
- error_dialog->set_text("Save path is empty!");
+ error_dialog->set_text(TTR("Save path is empty!"));
error_dialog->popup_centered_minsize();
return;
}
@@ -261,7 +261,7 @@ public:
plugin=p_plugin;
- set_title("Single Mesh Import");
+ set_title(TTR("Single Mesh Import"));
set_hide_on_ok(false);
VBoxContainer *vbc = memnew( VBoxContainer );
@@ -269,7 +269,7 @@ public:
set_child_rect(vbc);
HBoxContainer *hbc = memnew( HBoxContainer );
- vbc->add_margin_child("Source Mesh(es):",hbc);
+ vbc->add_margin_child(TTR("Source Mesh(es):"),hbc);
import_path = memnew( LineEdit );
import_path->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -282,7 +282,7 @@ public:
import_choose->connect("pressed", this,"_browse");
hbc = memnew( HBoxContainer );
- vbc->add_margin_child("Target Path:",hbc);
+ vbc->add_margin_child(TTR("Target Path:"),hbc);
save_path = memnew( LineEdit );
save_path->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -306,7 +306,7 @@ public:
save_select->connect("dir_selected", this,"_choose_save_dir");
get_ok()->connect("pressed", this,"_import");
- get_ok()->set_text("Import");
+ get_ok()->set_text(TTR("Import"));
error_dialog = memnew( AcceptDialog );
add_child(error_dialog);
@@ -315,7 +315,7 @@ public:
option_editor = memnew( PropertyEditor );
option_editor->hide_top_label();
- vbc->add_margin_child("Options:",option_editor,true);
+ vbc->add_margin_child(TTR("Options:"),option_editor,true);
}
~EditorMeshImportDialog() {
@@ -362,7 +362,7 @@ Error EditorMeshImportPlugin::import(const String& p_path, const Ref<ResourceImp
if (mesh->surface_get_name(i)!="")
name=mesh->surface_get_name(i);
else
- name="Surface "+itos(i+1);
+ name=TTR("Surface ")+itos(i+1);
name_map[name]=mesh->surface_get_material(i);
}
@@ -498,7 +498,7 @@ Error EditorMeshImportPlugin::import(const String& p_path, const Ref<ResourceImp
surf_tool->index();
mesh = surf_tool->commit(mesh);
if (name=="")
- name="Surface "+itos(mesh->get_surface_count()-1);
+ name=TTR("Surface ")+itos(mesh->get_surface_count()-1);
mesh->surface_set_name(mesh->get_surface_count()-1,name);
name="";
surf_tool->clear();
diff --git a/tools/editor/io_plugins/editor_sample_import_plugin.cpp b/tools/editor/io_plugins/editor_sample_import_plugin.cpp
index 5408e43e1a..116c5f874e 100644
--- a/tools/editor/io_plugins/editor_sample_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_sample_import_plugin.cpp
@@ -251,24 +251,24 @@ public:
Vector<String> samples = import_path->get_text().split(",");
if (samples.size()==0) {
- error_dialog->set_text("No samples to import!");
+ error_dialog->set_text(TTR("No samples to import!"));
error_dialog->popup_centered(Size2(200,100));
}
if (save_path->get_text().strip_edges()=="") {
- error_dialog->set_text("Target path is empty.");
+ error_dialog->set_text(TTR("Target path is empty."));
error_dialog->popup_centered_minsize();
return;
}
if (!save_path->get_text().begins_with("res://")) {
- error_dialog->set_text("Target path must be full resource path.");
+ error_dialog->set_text(TTR("Target path must be full resource path."));
error_dialog->popup_centered_minsize();
return;
}
if (!DirAccess::exists(save_path->get_text())) {
- error_dialog->set_text("Target path must exist.");
+ error_dialog->set_text(TTR("Target path must exist."));
error_dialog->popup_centered_minsize();
return;
}
@@ -292,7 +292,7 @@ public:
String dst = save_path->get_text();
if (dst=="") {
- error_dialog->set_text("Save path is empty!");
+ error_dialog->set_text(TTR("Save path is empty!"));
error_dialog->popup_centered(Size2(200,100));
}
@@ -331,7 +331,7 @@ public:
plugin=p_plugin;
- set_title("Import Audio Samples");
+ set_title(TTR("Import Audio Samples"));
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
@@ -339,7 +339,7 @@ public:
HBoxContainer *hbc = memnew( HBoxContainer );
- vbc->add_margin_child("Source Sample(s):",hbc);
+ vbc->add_margin_child(TTR("Source Sample(s):"),hbc);
import_path = memnew( LineEdit );
import_path->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -352,7 +352,7 @@ public:
import_choose->connect("pressed", this,"_browse");
hbc = memnew( HBoxContainer );
- vbc->add_margin_child("Target Path:",hbc);
+ vbc->add_margin_child(TTR("Target Path:"),hbc);
save_path = memnew( LineEdit );
save_path->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -377,12 +377,12 @@ public:
save_select->connect("dir_selected", this,"_choose_save_dir");
get_ok()->connect("pressed", this,"_import");
- get_ok()->set_text("Import");
+ get_ok()->set_text(TTR("Import"));
error_dialog = memnew ( ConfirmationDialog );
add_child(error_dialog);
- error_dialog->get_ok()->set_text("Accept");
+ error_dialog->get_ok()->set_text(TTR("Accept"));
// error_dialog->get_cancel()->hide();
set_hide_on_ok(false);
@@ -390,7 +390,7 @@ public:
option_editor = memnew( PropertyEditor );
option_editor->hide_top_label();
- vbc->add_margin_child("Options:",option_editor,true);
+ vbc->add_margin_child(TTR("Options:"),option_editor,true);
}
~EditorSampleImportDialog() {
@@ -406,7 +406,7 @@ String EditorSampleImportPlugin::get_name() const {
}
String EditorSampleImportPlugin::get_visible_name() const{
- return "Audio Sample";
+ return TTR("Audio Sample");
}
void EditorSampleImportPlugin::import_dialog(const String& p_from){
@@ -431,7 +431,7 @@ Error EditorSampleImportPlugin::import(const String& p_path, const Ref<ResourceI
int loop_beg = smp->get_loop_begin();
int loop_end = smp->get_loop_end();
- print_line("Input Sample: ");
+ print_line(TTR("Input Sample: "));
print_line("\tlen: "+itos(len));
print_line("\tchans: "+itos(chans));
print_line("\t16bits: "+itos(is16));
@@ -612,7 +612,7 @@ Error EditorSampleImportPlugin::import(const String& p_path, const Ref<ResourceI
_compress_ima_adpcm(data,dst_data);
} else {
- print_line("INTERLEAAVE!");
+ print_line(TTR("INTERLEAAVE!"));
diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.cpp b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
index af6ae561df..33d3a7cdee 100644
--- a/tools/editor/io_plugins/editor_scene_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
@@ -317,7 +317,7 @@ void EditorImportAnimationOptions::_item_edited() {
String name = item->get_text(0);
name=name.replace("/","_").replace(":","_").strip_edges();
if (name=="")
- name="New Clip";
+ name=TTR("New Clip");
if (clips.size()>2) {
int index=1;
@@ -441,12 +441,12 @@ EditorImportAnimationOptions::EditorImportAnimationOptions() {
validating=false;
TabContainer *tab= memnew(TabContainer);
- add_margin_child("Animation Options",tab,true);
+ add_margin_child(TTR("Animation Options"),tab,true);
flags = memnew( Tree );
flags->set_hide_root(true);
tab->add_child(flags);
- flags->set_name("Flags");
+ flags->set_name(TTR("Flags"));
TreeItem *root = flags->create_item();
const char ** fname=anim_flag_names;
@@ -466,7 +466,7 @@ EditorImportAnimationOptions::EditorImportAnimationOptions() {
TreeItem *fps_base = flags->create_item(root);
- fps_base->set_text(0,"Bake FPS:");
+ fps_base->set_text(0,TTR("Bake FPS:"));
fps_base->set_editable(0,false);
fps = flags->create_item(fps_base);
fps->set_cell_mode(0,TreeItem::CELL_MODE_RANGE);
@@ -477,7 +477,7 @@ EditorImportAnimationOptions::EditorImportAnimationOptions() {
optimization_tree = memnew( Tree );
optimization_tree->set_columns(2);
tab->add_child(optimization_tree);
- optimization_tree->set_name("Optimizer");
+ optimization_tree->set_name(TTR("Optimizer"));
optimization_tree->set_column_expand(0,true);
optimization_tree->set_column_expand(1,false);
optimization_tree->set_column_min_width(1,80);
@@ -487,21 +487,21 @@ EditorImportAnimationOptions::EditorImportAnimationOptions() {
TreeItem *optimize_root = optimization_tree->create_item();
optimize_linear_error = optimization_tree->create_item(optimize_root);
- optimize_linear_error->set_text(0,"Max Linear Error");
+ optimize_linear_error->set_text(0,TTR("Max Linear Error"));
optimize_linear_error->set_cell_mode(1,TreeItem::CELL_MODE_RANGE);
optimize_linear_error->set_editable(1,true);
optimize_linear_error->set_range_config(1,0,1,0.001);
optimize_linear_error->set_range(1,0.05);
optimize_angular_error = optimization_tree->create_item(optimize_root);
- optimize_angular_error->set_text(0,"Max Angular Error");
+ optimize_angular_error->set_text(0,TTR("Max Angular Error"));
optimize_angular_error->set_cell_mode(1,TreeItem::CELL_MODE_RANGE);
optimize_angular_error->set_editable(1,true);
optimize_angular_error->set_range_config(1,0,1,0.001);
optimize_angular_error->set_range(1,0.01);
optimize_max_angle = optimization_tree->create_item(optimize_root);
- optimize_max_angle->set_text(0,"Max Angle");
+ optimize_max_angle->set_text(0,TTR("Max Angle"));
optimize_max_angle->set_cell_mode(1,TreeItem::CELL_MODE_RANGE);
optimize_max_angle->set_editable(1,true);
optimize_max_angle->set_range_config(1,0,360,0.001);
@@ -510,7 +510,7 @@ EditorImportAnimationOptions::EditorImportAnimationOptions() {
clips_tree = memnew( Tree );
clips_tree->set_hide_root(true);
tab->add_child(clips_tree);
- clips_tree->set_name("Clips");
+ clips_tree->set_name(TTR("Clips"));
clips_tree->set_columns(4);
clips_tree->set_column_expand(0,1);
@@ -521,10 +521,10 @@ EditorImportAnimationOptions::EditorImportAnimationOptions() {
clips_tree->set_column_min_width(2,60);
clips_tree->set_column_min_width(3,40);
clips_tree->set_column_titles_visible(true);
- clips_tree->set_column_title(0,"Name");
- clips_tree->set_column_title(1,"Start(s)");
- clips_tree->set_column_title(2,"End(s)");
- clips_tree->set_column_title(3,"Loop");
+ clips_tree->set_column_title(0,TTR("Name"));
+ clips_tree->set_column_title(1,TTR("Start(s)"));
+ clips_tree->set_column_title(2,TTR("End(s)"));
+ clips_tree->set_column_title(3,TTR("Loop"));
clips_base =clips_tree->create_item(0);
@@ -533,7 +533,7 @@ EditorImportAnimationOptions::EditorImportAnimationOptions() {
filters = memnew( TextEdit );
tab->add_child(filters);
- filters->set_name("Filters");
+ filters->set_name(TTR("Filters"));
}
@@ -674,25 +674,25 @@ void EditorSceneImportDialog::_import(bool p_and_open) {
if (import_path->get_text().strip_edges()=="") {
- error_dialog->set_text("Source path is empty.");
+ error_dialog->set_text(TTR("Source path is empty."));
error_dialog->popup_centered_minsize();
return;
}
if (save_path->get_text().strip_edges()=="") {
- error_dialog->set_text("Target path is empty.");
+ error_dialog->set_text(TTR("Target path is empty."));
error_dialog->popup_centered_minsize();
return;
}
if (!save_path->get_text().begins_with("res://")) {
- error_dialog->set_text("Target path must be full resource path.");
+ error_dialog->set_text(TTR("Target path must be full resource path."));
error_dialog->popup_centered_minsize();
return;
}
if (!DirAccess::exists(save_path->get_text())) {
- error_dialog->set_text("Target path must exist.");
+ error_dialog->set_text(TTR("Target path must exist."));
error_dialog->popup_centered_minsize();
return;
}
@@ -721,7 +721,7 @@ void EditorSceneImportDialog::_import(bool p_and_open) {
if (script_path->get_text()!="") {
Ref<Script> scr = ResourceLoader::load(script_path->get_text());
if (!scr.is_valid()) {
- error_dialog->set_text("Couldn't load Post-Import Script.");
+ error_dialog->set_text(TTR("Couldn't load Post-Import Script."));
error_dialog->popup_centered(Size2(200,100));
return;
}
@@ -730,7 +730,7 @@ void EditorSceneImportDialog::_import(bool p_and_open) {
pi->set_script(scr.get_ref_ptr());
if (!pi->get_script_instance()) {
- error_dialog->set_text("Invalid/Broken Script for Post-Import.");
+ error_dialog->set_text(TTR("Invalid/Broken Script for Post-Import."));
error_dialog->popup_centered(Size2(200,100));
return;
}
@@ -739,7 +739,7 @@ void EditorSceneImportDialog::_import(bool p_and_open) {
String save_file = save_path->get_text().plus_file(import_path->get_text().get_file().basename()+".scn");
- print_line("Saving to: "+save_file);
+ print_line(TTR("Saving to: ")+save_file);
@@ -752,7 +752,7 @@ void EditorSceneImportDialog::_import(bool p_and_open) {
rim->add_source(EditorImportPlugin::validate_source_path(import_path->get_text()));
rim->set_option("flags",flags);
- print_line("GET FLAGS: "+itos(texture_options->get_flags()));
+ print_line(TTR("GET FLAGS: ")+itos(texture_options->get_flags()));
rim->set_option("texture_flags",texture_options->get_flags());
rim->set_option("texture_format",texture_options->get_format());
rim->set_option("texture_quality",texture_options->get_quality());
@@ -773,7 +773,7 @@ void EditorSceneImportDialog::_import(bool p_and_open) {
if (err || !scene) {
- error_dialog->set_text("Error importing scene.");
+ error_dialog->set_text(TTR("Error importing scene."));
error_dialog->popup_centered(Size2(200,100));
return;
}
@@ -798,7 +798,7 @@ void EditorSceneImportDialog::_import(bool p_and_open) {
if (err) {
- error_dialog->set_text("Error importing scene.");
+ error_dialog->set_text(TTR("Error importing scene."));
error_dialog->popup_centered(Size2(200,100));
return;
}
@@ -816,7 +816,7 @@ void EditorSceneImportDialog::_import(bool p_and_open) {
if (err) {
- error_dialog->set_text("Error importing scene.");
+ error_dialog->set_text(TTR("Error importing scene."));
error_dialog->popup_centered(Size2(200,100));
return;
}
@@ -842,7 +842,7 @@ void EditorSceneImportDialog::_import_confirm() {
if (err) {
wip_save_file="";
- error_dialog->set_text("Error importing scene.");
+ error_dialog->set_text(TTR("Error importing scene."));
error_dialog->popup_centered(Size2(200,100));
return;
}
@@ -973,7 +973,7 @@ void EditorSceneImportDialog::_dialog_hid() {
if (wip_blocked)
return;
- print_line("DIALOGHID!");
+ print_line(TTR("DIALOGHID!"));
if (wip_import) {
memdelete(wip_import);
wip_import=NULL;
@@ -1005,26 +1005,26 @@ void EditorSceneImportDialog::_bind_methods() {
const EditorSceneImportDialog::FlagInfo EditorSceneImportDialog::scene_flag_names[]={
- {EditorSceneImportPlugin::SCENE_FLAG_REMOVE_NOIMP,"Actions","Remove Nodes (-noimp)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_IMPORT_ANIMATIONS,"Actions","Import Animations",true},
- {EditorSceneImportPlugin::SCENE_FLAG_COMPRESS_GEOMETRY,"Actions","Compress Geometry",false},
- {EditorSceneImportPlugin::SCENE_FLAG_GENERATE_TANGENT_ARRAYS,"Actions","Force Generation of Tangent Arrays",false},
- {EditorSceneImportPlugin::SCENE_FLAG_DETECT_ALPHA,"Materials","Set Alpha in Materials (-alpha)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_DETECT_VCOLOR,"Materials","Set Vert. Color in Materials (-vcol)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_LINEARIZE_DIFFUSE_TEXTURES,"Actions","SRGB->Linear Of Diffuse Textures",false},
- {EditorSceneImportPlugin::SCENE_FLAG_CONVERT_NORMALMAPS_TO_XY,"Actions","Convert Normal Maps to XY",true},
- {EditorSceneImportPlugin::SCENE_FLAG_SET_LIGHTMAP_TO_UV2_IF_EXISTS,"Actions","Set Material Lightmap to UV2 if Tex2Array Exists",true},
- {EditorSceneImportPlugin::SCENE_FLAG_CREATE_COLLISIONS,"Create","Create Collisions (-col},-colonly)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_CREATE_PORTALS,"Create","Create Portals (-portal)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_CREATE_ROOMS,"Create","Create Rooms (-room)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_SIMPLIFY_ROOMS,"Create","Simplify Rooms",false},
- {EditorSceneImportPlugin::SCENE_FLAG_CREATE_BILLBOARDS,"Create","Create Billboards (-bb)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_CREATE_IMPOSTORS,"Create","Create Impostors (-imp:dist)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_CREATE_LODS,"Create","Create LODs (-lod:dist)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_CREATE_CARS,"Create","Create Vehicles (-vehicle)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_CREATE_WHEELS,"Create","Create Vehicle Wheels (-wheel)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_CREATE_NAVMESH,"Create","Create Navigation Meshes (-navmesh)",true},
- {EditorSceneImportPlugin::SCENE_FLAG_DETECT_LIGHTMAP_LAYER,"Create","Detect LightMap Layer (-lm:<int>).",true},
+ {EditorSceneImportPlugin::SCENE_FLAG_REMOVE_NOIMP,("Actions"),"Remove Nodes (-noimp)",true},
+ {EditorSceneImportPlugin::SCENE_FLAG_IMPORT_ANIMATIONS,("Actions"),"Import Animations",true},
+ {EditorSceneImportPlugin::SCENE_FLAG_COMPRESS_GEOMETRY,("Actions"),"Compress Geometry",false},
+ {EditorSceneImportPlugin::SCENE_FLAG_GENERATE_TANGENT_ARRAYS,("Actions"),"Force Generation of Tangent Arrays",false},
+ {EditorSceneImportPlugin::SCENE_FLAG_DETECT_ALPHA,("Materials"),"Set Alpha in Materials (-alpha)",true},
+ {EditorSceneImportPlugin::SCENE_FLAG_DETECT_VCOLOR,("Materials"),"Set Vert. Color in Materials (-vcol)",true},
+ {EditorSceneImportPlugin::SCENE_FLAG_LINEARIZE_DIFFUSE_TEXTURES,("Actions"),"SRGB->Linear Of Diffuse Textures",false},
+ {EditorSceneImportPlugin::SCENE_FLAG_CONVERT_NORMALMAPS_TO_XY,("Actions"),"Convert Normal Maps to XY",true},
+ {EditorSceneImportPlugin::SCENE_FLAG_SET_LIGHTMAP_TO_UV2_IF_EXISTS,("Actions"),"Set Material Lightmap to UV2 if Tex2Array Exists",true},
+ {EditorSceneImportPlugin::SCENE_FLAG_CREATE_COLLISIONS,("Create"),"Create Collisions (-col},-colonly)",true},
+ {EditorSceneImportPlugin::SCENE_FLAG_CREATE_PORTALS,("Create"),"Create Portals (-portal)",true},
+ {EditorSceneImportPlugin::SCENE_FLAG_CREATE_ROOMS,("Create"),"Create Rooms (-room)",true},
+ {EditorSceneImportPlugin::SCENE_FLAG_SIMPLIFY_ROOMS,("Create"),"Simplify Rooms",false},
+ {EditorSceneImportPlugin::SCENE_FLAG_CREATE_BILLBOARDS,("Create"),"Create Billboards (-bb)",true},
+ {EditorSceneImportPlugin::SCENE_FLAG_CREATE_IMPOSTORS,("Create"),"Create Impostors (-imp:dist)",true},
+ {EditorSceneImportPlugin::SCENE_FLAG_CREATE_LODS,("Create"),"Create LODs (-lod:dist)",true},
+ {EditorSceneImportPlugin::SCENE_FLAG_CREATE_CARS,("Create"),"Create Vehicles (-vehicle)",true},
+ {EditorSceneImportPlugin::SCENE_FLAG_CREATE_WHEELS,("Create"),"Create Vehicle Wheels (-wheel)",true},
+ {EditorSceneImportPlugin::SCENE_FLAG_CREATE_NAVMESH,("Create"),"Create Navigation Meshes (-navmesh)",true},
+ {EditorSceneImportPlugin::SCENE_FLAG_DETECT_LIGHTMAP_LAYER,("Create"),"Detect LightMap Layer (-lm:<int>).",true},
{-1,NULL,NULL,false}
};
@@ -1035,7 +1035,7 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce
editor=p_editor;
plugin=p_plugin;
- set_title("Import 3D Scene");
+ set_title(TTR("Import 3D Scene"));
HBoxContainer *import_hb = memnew( HBoxContainer );
add_child(import_hb);
set_child_rect(import_hb);
@@ -1045,7 +1045,7 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce
vbc->set_h_size_flags(SIZE_EXPAND_FILL);
HBoxContainer *hbc = memnew( HBoxContainer );
- vbc->add_margin_child("Source Scene:",hbc);
+ vbc->add_margin_child(TTR("Source Scene:"),hbc);
import_path = memnew( LineEdit );
import_path->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -1058,7 +1058,7 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce
import_choose->connect("pressed", this,"_browse");
hbc = memnew( HBoxContainer );
- vbc->add_margin_child("Target Path:",hbc);
+ vbc->add_margin_child(TTR("Target Path:"),hbc);
save_path = memnew( LineEdit );
save_path->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -1071,14 +1071,14 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce
save_choose->connect("pressed", this,"_browse_target");
texture_action = memnew( OptionButton );
- texture_action->add_item("Same as Target Scene");
- texture_action->add_item("Shared");
+ texture_action->add_item(TTR("Same as Target Scene"));
+ texture_action->add_item(TTR("Shared"));
texture_action->select(0);
- vbc->add_margin_child("Target Texture Folder:",texture_action);
+ vbc->add_margin_child(TTR("Target Texture Folder:"),texture_action);
import_options = memnew( Tree );
vbc->set_v_size_flags(SIZE_EXPAND_FILL);
- vbc->add_margin_child("Options:",import_options,true);
+ vbc->add_margin_child(TTR("Options:"),import_options,true);
file_select = memnew(EditorFileDialog);
file_select->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
@@ -1096,7 +1096,7 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce
save_select->connect("dir_selected", this,"_choose_save_file");
get_ok()->connect("pressed", this,"_import");
- get_ok()->set_text("Import");
+ get_ok()->set_text(TTR("Import"));
TreeItem *root = import_options->create_item(NULL);
import_options->set_hide_root(true);
@@ -1129,7 +1129,7 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce
}
hbc = memnew( HBoxContainer );
- vbc->add_margin_child("Post-Process Script:",hbc);
+ vbc->add_margin_child(TTR("Post-Process Script:"),hbc);
script_path = memnew( LineEdit );
script_path->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -1159,22 +1159,22 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce
error_dialog = memnew ( ConfirmationDialog );
add_child(error_dialog);
- error_dialog->get_ok()->set_text("Accept");
+ error_dialog->get_ok()->set_text(TTR("Accept"));
// error_dialog->get_cancel()->hide();
this_import = memnew( OptionButton );
- this_import->add_item("Overwrite Existing Scene");
+ this_import->add_item(TTR("Overwrite Existing Scene"));
this_import->add_item("Overwrite Existing, Keep Materials");
- this_import->add_item("Keep Existing, Merge with New");
- this_import->add_item("Keep Existing, Ignore New");
- vbc->add_margin_child("This Time:",this_import);
+ this_import->add_item(TTR("Keep Existing, Merge with New"));
+ this_import->add_item(TTR("Keep Existing, Ignore New"));
+ vbc->add_margin_child(TTR("This Time:"),this_import);
next_import = memnew( OptionButton );
- next_import->add_item("Overwrite Existing Scene");
+ next_import->add_item(TTR("Overwrite Existing Scene"));
next_import->add_item("Overwrite Existing, Keep Materials");
- next_import->add_item("Keep Existing, Merge with New");
- next_import->add_item("Keep Existing, Ignore New");
- vbc->add_margin_child("Next Time:",next_import);
+ next_import->add_item(TTR("Keep Existing, Merge with New"));
+ next_import->add_item(TTR("Keep Existing, Ignore New"));
+ vbc->add_margin_child(TTR("Next Time:"),next_import);
set_hide_on_ok(false);
@@ -1211,19 +1211,19 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce
pc->add_style_override("panel",get_stylebox("normal","TextEdit"));
//ec->add_child(pc);
missing_files = memnew( RichTextLabel );
- cvb->add_margin_child("The Following Files are Missing:",pc,true);
+ cvb->add_margin_child(TTR("The Following Files are Missing:"),pc,true);
pc->add_child(missing_files);
- confirm_import->get_ok()->set_text("Import Anyway");
- confirm_import->get_cancel()->set_text("Cancel");
+ confirm_import->get_ok()->set_text(TTR("Import Anyway"));
+ confirm_import->get_cancel()->set_text(TTR("Cancel"));
confirm_import->connect("popup_hide",this,"_dialog_hid");
confirm_import->connect("confirmed",this,"_import_confirm");
confirm_import->set_hide_on_ok(false);
- add_button("Import & Open",!OS::get_singleton()->get_swap_ok_cancel())->connect("pressed",this,"_open_and_import");
+ add_button(TTR("Import & Open"),!OS::get_singleton()->get_swap_ok_cancel())->connect("pressed",this,"_open_and_import");
confirm_open = memnew( ConfirmationDialog );
add_child(confirm_open);
- confirm_open->set_text("Edited scene has not been saved, open imported scene anyway?");
+ confirm_open->set_text(TTR("Edited scene has not been saved, open imported scene anyway?"));
confirm_open->connect("confirmed",this,"_import",varray(true));
@@ -2285,11 +2285,11 @@ void EditorSceneImportPlugin::_merge_materials(Node *p_node,Node *p_imported) {
_scan_materials(p_node,p_node,mesh_materials,override_materials);
for (Map<String,Ref<Material> >::Element *E=mesh_materials.front();E;E=E->next()) {
- print_line("Mats: "+String(E->key()));
+ print_line(TTR("Mats: ")+String(E->key()));
}
for (Map<String,Ref<Material> >::Element *E=override_materials.front();E;E=E->next()) {
- print_line("Overrides: "+String(E->key()));
+ print_line(TTR("Overrides: ")+String(E->key()));
}
Set<Ref<Mesh> > mp;
@@ -2339,8 +2339,8 @@ Error EditorSceneImportPlugin::import1(const Ref<ResourceImportMetadata>& p_from
String ext=src_path.extension().to_lower();
- EditorProgress progress("import","Import Scene",104);
- progress.step("Importing Scene..",0);
+ EditorProgress progress("import",TTR("Import Scene"),104);
+ progress.step(TTR("Importing Scene.."),0);
for(int i=0;i<importers.size();i++) {
@@ -2517,7 +2517,7 @@ void EditorSceneImportPlugin::_filter_anim_tracks(Ref<Animation> anim,Set<String
Ref<Animation> a = anim;
ERR_FAIL_COND(!a.is_valid());
- print_line("From Anim "+anim->get_name()+":");
+ print_line(TTR("From Anim ")+anim->get_name()+":");
for(int j=0;j<a->get_track_count();j++) {
@@ -2525,7 +2525,7 @@ void EditorSceneImportPlugin::_filter_anim_tracks(Ref<Animation> anim,Set<String
if (!keep.has(path)) {
- print_line("Remove: "+path);
+ print_line(TTR("Remove: ")+path);
a->remove_track(j);
j--;
}
@@ -2639,10 +2639,10 @@ void EditorSceneImportPlugin::_filter_tracks(Node *scene, const String& p_text)
for(Set<String>::Element *F=keep_local.front();F;F=F->next()) {
keep.insert(F->get());
}
- print_line("FILTERING ANIM: "+String(E->get()));
+ print_line(TTR("FILTERING ANIM: ")+String(E->get()));
_filter_anim_tracks(anim->get_animation(name),keep);
} else {
- print_line("NOT FILTERING ANIM: "+String(E->get()));
+ print_line(TTR("NOT FILTERING ANIM: ")+String(E->get()));
}
@@ -2692,8 +2692,8 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c
if (from->has_option("animation_optimizer_max_angle"))
anim_optimizer_maxang=from->get_option("animation_optimizer_max_angle");
- EditorProgress progress("import","Import Scene",104);
- progress.step("Importing Scene..",2);
+ EditorProgress progress("import",TTR("Import Scene"),104);
+ progress.step(TTR("Importing Scene.."),2);
bool reimport = bool(from->get_option("reimport"));
@@ -2726,7 +2726,7 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c
/// BEFORE ANYTHING, RUN SCRIPT
- progress.step("Running Custom Script..",2);
+ progress.step(TTR("Running Custom Script.."),2);
String post_import_script_path = from->get_option("post_import_script");
Ref<EditorScenePostImport> post_import_script;
@@ -2735,13 +2735,13 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c
post_import_script_path = post_import_script_path;
Ref<Script> scr = ResourceLoader::load(post_import_script_path);
if (!scr.is_valid()) {
- EditorNode::add_io_error("Couldn't load post-import script: '"+post_import_script_path);
+ EditorNode::add_io_error(TTR("Couldn't load post-import script: '")+post_import_script_path);
} else {
post_import_script = Ref<EditorScenePostImport>( memnew( EditorScenePostImport ) );
post_import_script->set_script(scr.get_ref_ptr());
if (!post_import_script->get_script_instance()) {
- EditorNode::add_io_error("Invalid/Broken Script for Post-Import: '"+post_import_script_path);
+ EditorNode::add_io_error(TTR("Invalid/Broken Script for Post-Import: '")+post_import_script_path);
post_import_script.unref();
}
}
@@ -2751,7 +2751,7 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c
if (post_import_script.is_valid()) {
scene = post_import_script->post_import(scene);
if (!scene) {
- EditorNode::add_io_error("Error running Post-Import script: '"+post_import_script_path);
+ EditorNode::add_io_error(TTR("Error running Post-Import script: '")+post_import_script_path);
return err;
}
@@ -2780,18 +2780,18 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c
String path = texture->get_path();
String fname= path.get_file();
String target_path = Globals::get_singleton()->localize_path(target_res_path.plus_file(fname));
- progress.step("Import Img: "+fname,3+(idx)*100/imagemap.size());
+ progress.step(TTR("Import Img: ")+fname,3+(idx)*100/imagemap.size());
idx++;
if (path==target_path) {
- EditorNode::add_io_error("Can't import a file over itself: '"+target_path);
+ EditorNode::add_io_error(TTR("Can't import a file over itself: '")+target_path);
continue;
}
if (!target_path.begins_with("res://")) {
- EditorNode::add_io_error("Couldn't localize path: '"+target_path+"' (already local)");
+ EditorNode::add_io_error(TTR("Couldn't localize path: '")+target_path+"' (already local)");
continue;
}
@@ -2851,7 +2851,7 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c
if (import_action!=SCENE_UPDATE_REPLACE_WITH_NEW) {
- progress.step("Merging..",103);
+ progress.step(TTR("Merging.."),103);
FileAccess *fa = FileAccess::create(FileAccess::ACCESS_RESOURCES);
@@ -2900,14 +2900,14 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c
}
- progress.step("Saving..",104);
+ progress.step(TTR("Saving.."),104);
Ref<PackedScene> packer = memnew( PackedScene );
packer->pack(scene);
packer->set_path(p_dest_path);
packer->set_import_metadata(from);
- print_line("SAVING TO: "+p_dest_path);
+ print_line(TTR("SAVING TO: ")+p_dest_path);
err = ResourceSaver::save(p_dest_path,packer,ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
//EditorFileSystem::get_singleton()->update_resource(packer);
diff --git a/tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp b/tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp
index 0c388b91ca..fadb486d20 100644
--- a/tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp
+++ b/tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp
@@ -160,7 +160,7 @@ void EditorSceneImporterFBXConv::_detect_bones_in_nodes(State& state,const Array
if (d.has("isBone") && bool(d["isBone"])) {
String bone_name=_id(d["id"]);
- print_line("IS BONE: "+bone_name);
+ print_line(TTR("IS BONE: ")+bone_name);
if (!state.bones.has(bone_name)) {
state.bones.insert(bone_name,BoneInfo());
}
@@ -367,14 +367,14 @@ Error EditorSceneImporterFBXConv::_parse_nodes(State& state,const Array &p_nodes
id=_id(n["id"]);
}
- print_line("ID: "+id);
+ print_line(TTR("ID: ")+id);
if (state.skeletons.has(id)) {
Skeleton *skeleton = state.skeletons[id];
node=skeleton;
skeleton->localize_rests();
- print_line("IS SKELETON! ");
+ print_line(TTR("IS SKELETON! "));
} else if (state.bones.has(id)) {
if (p_base)
node=p_base->cast_to<Spatial>();
@@ -507,15 +507,15 @@ void EditorSceneImporterFBXConv::_parse_materials(State& state) {
if (tex.is_valid() && texture.has("type")) {
String type=texture["type"];
- if (type=="DIFFUSE")
+ if (type==TTR("DIFFUSE"))
mat->set_texture(FixedMaterial::PARAM_DIFFUSE,tex);
- else if (type=="SPECULAR")
+ else if (type==TTR("SPECULAR"))
mat->set_texture(FixedMaterial::PARAM_SPECULAR,tex);
- else if (type=="SHININESS")
+ else if (type==TTR("SHININESS"))
mat->set_texture(FixedMaterial::PARAM_SPECULAR_EXP,tex);
else if (type=="NORMAL")
mat->set_texture(FixedMaterial::PARAM_NORMAL,tex);
- else if (type=="EMISSIVE")
+ else if (type==TTR("EMISSIVE"))
mat->set_texture(FixedMaterial::PARAM_EMISSION,tex);
}
@@ -538,7 +538,7 @@ void EditorSceneImporterFBXConv::_parse_surfaces(State& state) {
ERR_CONTINUE(!mesh.has("vertices"));
ERR_CONTINUE(!mesh.has("parts"));
- print_line("MESH #"+itos(i));
+ print_line(TTR("MESH #")+itos(i));
Array attrlist=mesh["attributes"];
Array vertices=mesh["vertices"];
@@ -570,13 +570,13 @@ void EditorSceneImporterFBXConv::_parse_surfaces(State& state) {
exists[Mesh::ARRAY_COLOR]=true;
ofs[Mesh::ARRAY_COLOR]=stride;
stride+=4;
- } else if (attr=="COLORPACKED") {
+ } else if (attr==TTR("COLORPACKED")) {
stride+=1; //ignore
- } else if (attr=="TANGENT") {
+ } else if (attr==TTR("TANGENT")) {
exists[Mesh::ARRAY_TANGENT]=true;
ofs[Mesh::ARRAY_TANGENT]=stride;
stride+=3;
- } else if (attr=="BINORMAL") {
+ } else if (attr==TTR("BINORMAL")) {
binormal_ofs=stride;
stride+=3;
} else if (attr=="TEXCOORD0") {
@@ -587,10 +587,10 @@ void EditorSceneImporterFBXConv::_parse_surfaces(State& state) {
exists[Mesh::ARRAY_TEX_UV2]=true;
ofs[Mesh::ARRAY_TEX_UV2]=stride;
stride+=2;
- } else if (attr.begins_with("TEXCOORD")) {
+ } else if (attr.begins_with(TTR("TEXCOORD"))) {
stride+=2;
- } else if (attr.begins_with("BLENDWEIGHT")) {
- int idx=attr.replace("BLENDWEIGHT","").to_int();
+ } else if (attr.begins_with(TTR("BLENDWEIGHT"))) {
+ int idx=attr.replace(TTR("BLENDWEIGHT"),"").to_int();
if (idx==0) {
exists[Mesh::ARRAY_BONES]=true;
ofs[Mesh::ARRAY_BONES]=stride;
@@ -604,7 +604,7 @@ void EditorSceneImporterFBXConv::_parse_surfaces(State& state) {
stride+=2;
}
- print_line("ATTR "+attr+" OFS: "+itos(stride));
+ print_line(TTR("ATTR ")+attr+" OFS: "+itos(stride));
}
@@ -618,7 +618,7 @@ void EditorSceneImporterFBXConv::_parse_surfaces(State& state) {
ERR_CONTINUE(!part.has("indices"));
ERR_CONTINUE(!part.has("id"));
- print_line("PART: "+String(part["id"]));
+ print_line(TTR("PART: ")+String(part["id"]));
Array indices=part["indices"];
Map<int,int> iarray;
Map<int,int> array;
@@ -799,13 +799,13 @@ void EditorSceneImporterFBXConv::_parse_surfaces(State& state) {
if (part.has("type")) {
String type=part["type"];
- if (type=="LINES")
+ if (type==TTR("LINES"))
pt=Mesh::PRIMITIVE_LINES;
- else if (type=="POINTS")
+ else if (type==TTR("POINTS"))
pt=Mesh::PRIMITIVE_POINTS;
- else if (type=="TRIANGLE_STRIP")
+ else if (type==TTR("TRIANGLE_STRIP"))
pt=Mesh::PRIMITIVE_TRIANGLE_STRIP;
- else if (type=="LINE_STRIP")
+ else if (type==TTR("LINE_STRIP"))
pt=Mesh::PRIMITIVE_LINE_STRIP;
}
@@ -903,7 +903,7 @@ Error EditorSceneImporterFBXConv::_parse_animations(State& state) {
}
- print_line("BONE XFD "+String(Variant(xform_dict)));
+ print_line(TTR("BONE XFD ")+String(Variant(xform_dict)));
Array keyframes=bone_track["keyframes"];
@@ -1022,7 +1022,7 @@ Error EditorSceneImporterFBXConv::_parse_json(State& state, const String &p_path
return err;
}
- print_line("JSON PARSED O-K!");
+ print_line(TTR("JSON PARSED O-K!"));
return OK;
}
@@ -1056,7 +1056,7 @@ Error EditorSceneImporterFBXConv::_parse_fbx(State& state,const String& p_path)
}
args.push_back("-o");
- args.push_back("G3DJ");
+ args.push_back(TTR("G3DJ"));
args.push_back(path);
int res;
diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.cpp b/tools/editor/io_plugins/editor_texture_import_plugin.cpp
index ea7242c185..f1bece83e5 100644
--- a/tools/editor/io_plugins/editor_texture_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_texture_import_plugin.cpp
@@ -37,33 +37,33 @@
#include "globals.h"
static const char *flag_names[]={
- "Streaming Format",
- "Fix Border Alpha",
- "Alpha Bit Hint",
- "Compress Extra (PVRTC2)",
- "No MipMaps",
- "Repeat",
- "Filter (Magnifying)",
- "Premultiply Alpha",
- "Convert SRGB->Linear",
- "Convert NormalMap to XY",
- "Use Anisotropy",
+ ("Streaming Format"),
+ ("Fix Border Alpha"),
+ ("Alpha Bit Hint"),
+ ("Compress Extra (PVRTC2)"),
+ ("No MipMaps"),
+ ("Repeat"),
+ ("Filter (Magnifying)"),
+ ("Premultiply Alpha"),
+ ("Convert SRGB->Linear"),
+ ("Convert NormalMap to XY"),
+ ("Use Anisotropy"),
NULL
};
#if 0 // not used
static const char *flag_short_names[]={
- "Stream",
- "FixBorder",
- "AlphBit",
- "ExtComp",
- "NoMipMap",
- "Repeat",
- "Filter",
- "PMAlpha",
- "ToLinear",
- "ToRG",
- "Anisoropic",
+ TTR("Stream"),
+ TTR("FixBorder"),
+ TTR("AlphBit"),
+ TTR("ExtComp"),
+ TTR("NoMipMap"),
+ TTR("Repeat"),
+ TTR("Filter"),
+ TTR("PMAlpha"),
+ TTR("ToLinear"),
+ TTR("ToRG"),
+ TTR("Anisoropic"),
NULL
};
#endif
@@ -173,13 +173,13 @@ EditorImportTextureOptions::EditorImportTextureOptions() {
updating=false;
format = memnew( OptionButton );
- format->add_item("Uncompressed",EditorTextureImportPlugin::IMAGE_FORMAT_UNCOMPRESSED);
- format->add_item("Compress Lossless (PNG)",EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSLESS);
- format->add_item("Compress Lossy (WebP)",EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSY);
- format->add_item("Compress (VRAM)",EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_RAM);
+ format->add_item(TTR("Uncompressed"),EditorTextureImportPlugin::IMAGE_FORMAT_UNCOMPRESSED);
+ format->add_item(TTR("Compress Lossless (PNG)"),EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSLESS);
+ format->add_item(TTR("Compress Lossy (WebP)"),EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSY);
+ format->add_item(TTR("Compress (VRAM)"),EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_RAM);
- add_margin_child("Texture Format",format);
+ add_margin_child(TTR("Texture Format"),format);
quality_vb = memnew( VBoxContainer );
@@ -199,7 +199,7 @@ EditorImportTextureOptions::EditorImportTextureOptions() {
hs->set_step(0.01);
hs->set_val(0.7);
quality=hs;
- quality_vb->add_margin_child("Texture Compression Quality (WebP):",quality_hb);
+ quality_vb->add_margin_child(TTR("Texture Compression Quality (WebP):"),quality_hb);
add_child(quality_vb);
@@ -221,10 +221,10 @@ EditorImportTextureOptions::EditorImportTextureOptions() {
fname++;
}
- add_margin_child("Texture Options",flags,true);
+ add_margin_child(TTR("Texture Options"),flags,true);
notice_for_2d = memnew( Label );
- notice_for_2d->set_text("NOTICE: You are not forced to import textures for 2D projects. Just copy your .jpg or .png files to your project, and change export options later. Atlases can be generated on export too.");
+ notice_for_2d->set_text(TTR("NOTICE: You are not forced to import textures for 2D projects. Just copy your .jpg or .png files to your project, and change export options later. Atlases can be generated on export too."));
notice_for_2d->set_custom_minimum_size(Size2(0,50));
notice_for_2d->set_autowrap(true);
add_child(notice_for_2d);
@@ -329,7 +329,7 @@ void EditorTextureImportDialog::_import() {
if (!files.size()) {
- error_dialog->set_text("Please specify some files!");
+ error_dialog->set_text(TTR("Please specify some files!"));
error_dialog->popup_centered(Size2(200,100));
return;
}
@@ -337,20 +337,20 @@ void EditorTextureImportDialog::_import() {
String dst_path=save_path->get_text();
if (save_path->get_text().strip_edges()=="") {
- error_dialog->set_text("Target path is empty.");
+ error_dialog->set_text(TTR("Target path is empty."));
error_dialog->popup_centered_minsize();
return;
}
if (!save_path->get_text().begins_with("res://")) {
- error_dialog->set_text("Target path must be full resource path.");
+ error_dialog->set_text(TTR("Target path must be full resource path."));
error_dialog->popup_centered_minsize();
return;
}
if (!atlas && !large && !DirAccess::exists(save_path->get_text())) {
- error_dialog->set_text("Target path must exist.");
+ error_dialog->set_text(TTR("Target path must exist."));
error_dialog->popup_centered_minsize();
return;
}
@@ -359,7 +359,7 @@ void EditorTextureImportDialog::_import() {
if (files.size()==0) {
- error_dialog->set_text("At least one file needed for Atlas.");
+ error_dialog->set_text(TTR("At least one file needed for Atlas."));
error_dialog->popup_centered(Size2(200,100));
return;
@@ -382,7 +382,7 @@ void EditorTextureImportDialog::_import() {
Error err = plugin->import(dst_file,imd);
if (err) {
- error_dialog->set_text("Error importing: "+dst_file.get_file());
+ error_dialog->set_text(TTR("Error importing: ")+dst_file.get_file());
error_dialog->popup_centered(Size2(200,100));
return;
@@ -391,7 +391,7 @@ void EditorTextureImportDialog::_import() {
if (files.size()!=1) {
- error_dialog->set_text("Only one file is required for large texture");
+ error_dialog->set_text(TTR("Only one file is required for large texture"));
error_dialog->popup_centered(Size2(200,100));
return;
@@ -414,7 +414,7 @@ void EditorTextureImportDialog::_import() {
Error err = plugin->import(dst_file,imd);
if (err) {
- error_dialog->set_text("Error importing: "+dst_file.get_file());
+ error_dialog->set_text(TTR("Error importing: ")+dst_file.get_file());
error_dialog->popup_centered(Size2(200,100));
return;
@@ -438,7 +438,7 @@ void EditorTextureImportDialog::_import() {
Error err = plugin->import(dst_file,imd);
if (err) {
- error_dialog->set_text("Error importing: "+dst_file.get_file());
+ error_dialog->set_text(TTR("Error importing: ")+dst_file.get_file());
error_dialog->popup_centered(Size2(200,100));
return;
@@ -499,7 +499,7 @@ void EditorTextureImportDialog::_notification(int p_what) {
List<String> extensions;
ImageLoader::get_recognized_extensions(&extensions);
- // ResourceLoader::get_recognized_extensions_for_type("PackedTexture",&extensions);
+ // ResourceLoader::get_recognized_extensions_for_type(TTR("PackedTexture"),&extensions);
file_select->clear_filters();
for(int i=0;i<extensions.size();i++) {
@@ -536,7 +536,7 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin*
atlas=p_atlas;
large=p_large;
plugin=p_plugin;
- set_title("Import Textures");
+ set_title(TTR("Import Textures"));
VBoxContainer *vbc = memnew(VBoxContainer);
@@ -546,9 +546,9 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin*
VBoxContainer *source_vb=memnew(VBoxContainer);
if (large)
- vbc->add_margin_child("Source Texture:",source_vb);
+ vbc->add_margin_child(TTR("Source Texture:"),source_vb);
else
- vbc->add_margin_child("Source Texture(s):",source_vb);
+ vbc->add_margin_child(TTR("Source Texture(s):"),source_vb);
HBoxContainer *hbc = memnew( HBoxContainer );
source_vb->add_child(hbc);
@@ -559,7 +559,7 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin*
crop_source = memnew( CheckButton );
crop_source->set_pressed(true);
source_vb->add_child(crop_source);
- crop_source->set_text("Crop empty space.");
+ crop_source->set_text(TTR("Crop empty space."));
if (!p_atlas)
crop_source->hide();
@@ -571,7 +571,7 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin*
import_choose->connect("pressed", this,"_browse");
hbc = memnew( HBoxContainer );
- vbc->add_margin_child("Target Path:",hbc);
+ vbc->add_margin_child(TTR("Target Path:"),hbc);
size = memnew( SpinBox );
size->set_min(128);
@@ -579,10 +579,10 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin*
if (p_atlas) {
size->set_val(2048);
- vbc->add_margin_child("Max Texture size:",size);
+ vbc->add_margin_child(TTR("Max Texture size:"),size);
} else {
size->set_val(256);
- vbc->add_margin_child("Cell Size:",size);
+ vbc->add_margin_child(TTR("Cell Size:"),size);
}
@@ -624,7 +624,7 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin*
save_select->connect("dir_selected", this,"_choose_save_dir");
get_ok()->connect("pressed", this,"_import");
- get_ok()->set_text("Import");
+ get_ok()->set_text(TTR("Import"));
//move stuff up
//for(int i=0;i<4;i++)
@@ -632,7 +632,7 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin*
error_dialog = memnew ( ConfirmationDialog );
add_child(error_dialog);
- error_dialog->get_ok()->set_text("Accept");
+ error_dialog->get_ok()->set_text(TTR("Accept"));
// error_dialog->get_cancel()->hide();
set_hide_on_ok(false);
@@ -647,14 +647,14 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin*
texture_options->set_quality(0.7);
texture_options->set_format(EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSY);
//texture_options->show_2d_notice();
- set_title("Import Textures for Atlas (2D)");
+ set_title(TTR("Import Textures for Atlas (2D)"));
} else if (large) {
texture_options->set_flags(EditorTextureImportPlugin::IMAGE_FLAG_FIX_BORDER_ALPHA|EditorTextureImportPlugin::IMAGE_FLAG_NO_MIPMAPS|EditorTextureImportPlugin::IMAGE_FLAG_FILTER);
texture_options->set_quality(0.7);
texture_options->set_format(EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSLESS);
texture_options->show_2d_notice();
- set_title("Import Large Textures (2D)");
+ set_title(TTR("Import Large Textures (2D)"));
} else if (p_2d) {
@@ -662,14 +662,14 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin*
texture_options->set_quality(0.7);
texture_options->set_format(EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_DISK_LOSSY);
texture_options->show_2d_notice();
- set_title("Import Textures for 2D");
+ set_title(TTR("Import Textures for 2D"));
} else {
//texture_options->set_flags(EditorTextureImportPlugin::IMAGE_FLAG_);
//texture_options->set_flags(EditorTextureImportPlugin::IMAGE_FLAG_NO_MIPMAPS);
texture_options->set_flags(EditorTextureImportPlugin::IMAGE_FLAG_FIX_BORDER_ALPHA|EditorTextureImportPlugin::IMAGE_FLAG_FILTER|EditorTextureImportPlugin::IMAGE_FLAG_REPEAT);
texture_options->set_format(EditorTextureImportPlugin::IMAGE_FORMAT_COMPRESS_RAM);
- set_title("Import Textures for 3D");
+ set_title(TTR("Import Textures for 3D"));
}
@@ -918,7 +918,7 @@ Error EditorTextureImportPlugin::_process_texture_data(Ref<ImageTexture> &textur
//if ((image.get_format()==Image::FORMAT_RGB || image.get_format()==Image::FORMAT_RGBA) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) {
//
- // print_line("CONVERT BECAUSE: "+itos(flags));
+ // print_line(TTR("CONVERT BECAUSE: ")+itos(flags));
// image.srgb_to_linear();
//}
@@ -1000,16 +1000,16 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
int cell_size=from->get_option("large_cell_size");
ERR_FAIL_COND_V(cell_size<128 || cell_size>16384,ERR_CANT_OPEN);
- EditorProgress pg("ltex","Import Large Texture",3);
+ EditorProgress pg("ltex",TTR("Import Large Texture"),3);
- pg.step("Load Source Image",0);
+ pg.step(TTR("Load Source Image"),0);
Image img;
Error err = ImageLoader::load_image(src_path,&img);
if (err) {
return err;
}
- pg.step("Slicing",1);
+ pg.step(TTR("Slicing"),1);
Map<Vector2,Image> pieces;
for(int i=0;i<img.get_width();i+=cell_size) {
@@ -1021,7 +1021,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
piece.blit_rect(img,Rect2(i,j,w,h),Point2(0,0));
if (!piece.is_invisible()) {
pieces[Vector2(i,j)]=piece;
- //print_line("ADDING PIECE AT "+Vector2(i,j));
+ //print_line(TTR("ADDING PIECE AT ")+Vector2(i,j));
}
}
}
@@ -1038,7 +1038,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
}
existing->set_size(Size2(img.get_width(),img.get_height()));
- pg.step("Inserting",2);
+ pg.step(TTR("Inserting"),2);
for (Map<Vector2,Image>::Element *E=pieces.front();E;E=E->next()) {
@@ -1053,11 +1053,11 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
existing->set_path(p_path);
existing->set_import_metadata(from);
}
- pg.step("Saving",3);
+ pg.step(TTR("Saving"),3);
err = ResourceSaver::save(p_path,existing);
if (err!=OK) {
- EditorNode::add_io_error("Couldn't save large texture: "+p_path);
+ EditorNode::add_io_error(TTR("Couldn't save large texture: ")+p_path);
return err;
}
@@ -1072,7 +1072,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
bool alpha=false;
bool crop = from->get_option("crop");
- EditorProgress ep("make_atlas","Build Atlas For: "+p_path.get_file(),from->get_source_count()+3);
+ EditorProgress ep("make_atlas",TTR("Build Atlas For: ")+p_path.get_file(),from->get_source_count()+3);
print_line("sources: "+itos(from->get_source_count()));
@@ -1081,12 +1081,12 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
String path = EditorImportPlugin::expand_source_path(from->get_source_path(i));
String md5 = FileAccess::get_md5(path);
from->set_source_md5(i,FileAccess::get_md5(path));
- ep.step("Loading Image: "+path,i);
+ ep.step(TTR("Loading Image: ")+path,i);
print_line("source path: "+path+" md5 "+md5);
Image src;
Error err = ImageLoader::load_image(path,&src);
if (err) {
- EditorNode::add_io_error("Couldn't load image: "+path);
+ EditorNode::add_io_error(TTR("Couldn't load image: ")+path);
return err;
}
@@ -1095,7 +1095,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
tsources.push_back(src);
}
- ep.step("Converting Images",sources.size());
+ ep.step(TTR("Converting Images"),sources.size());
int base_index=0;
@@ -1131,7 +1131,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
if (source_md5.has(*cmp)) {
int sidx=source_md5[*cmp];
source_map[sidx].push_back(i);
- print_line("REUSING "+from->get_source_path(i));
+ print_line(TTR("REUSING ")+from->get_source_path(i));
} else {
int sidx=sources.size();
@@ -1154,14 +1154,14 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
Vector<Size2i> src_sizes;
Vector<Rect2> crops;
- ep.step("Cropping Images",sources.size()+1);
+ ep.step(TTR("Cropping Images"),sources.size()+1);
for(int j=0;j<sources.size();j++) {
Size2i s;
if (crop) {
Rect2 crop = sources[j].get_used_rect();
- print_line("CROP: "+crop);
+ print_line(TTR("CROP: ")+crop);
s=crop.size;
crops.push_back(crop);
} else {
@@ -1178,7 +1178,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
print_line("size that workeD: "+itos(dst_size.width)+","+itos(dst_size.height));
- ep.step("Blitting Images",sources.size()+2);
+ ep.step(TTR("Blitting Images"),sources.size()+2);
bool blit_to_po2=tex_flags&Texture::FLAG_MIPMAPS;
int atlas_w=dst_size.width;
@@ -1231,7 +1231,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
at->set_margin(margin);
at->set_path(apath);
atlases[E->get()]=at;
- print_line("Atlas Tex: "+apath);
+ print_line(TTR("Atlas Tex: ")+apath);
}
}
if (ResourceCache::has(p_path)) {
@@ -1291,7 +1291,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
atlases[i]->set_atlas(texture);
Error err = ResourceSaver::save(apath,atlases[i]);
if (err) {
- EditorNode::add_io_error("Couldn't save atlas image: "+apath);
+ EditorNode::add_io_error(TTR("Couldn't save atlas image: ")+apath);
return err;
}
//from->set_source_md5(i,FileAccess::get_md5(apath));
@@ -1391,7 +1391,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
//if ((image.get_format()==Image::FORMAT_RGB || image.get_format()==Image::FORMAT_RGBA) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) {
//
- // print_line("CONVERT BECAUSE: "+itos(flags));
+ // print_line(TTR("CONVERT BECAUSE: ")+itos(flags));
// image.srgb_to_linear();
//}
@@ -1433,7 +1433,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
Error err = ResourceSaver::save(p_path,texture,save_flags);
if (err!=OK) {
- EditorNode::add_io_error("Couldn't save converted texture: "+p_path);
+ EditorNode::add_io_error(TTR("Couldn't save converted texture: ")+p_path);
return err;
}
diff --git a/tools/editor/io_plugins/editor_translation_import_plugin.cpp b/tools/editor/io_plugins/editor_translation_import_plugin.cpp
index 1edfe697b6..03abc3a82b 100644
--- a/tools/editor/io_plugins/editor_translation_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_translation_import_plugin.cpp
@@ -64,7 +64,7 @@ public:
FileAccess *f = FileAccess::open(p_path,FileAccess::READ);
if (!f) {
- error_dialog->set_text("Invalid source!");
+ error_dialog->set_text(TTR("Invalid source!"));
error_dialog->popup_centered(Size2(200,100));
return;
@@ -75,7 +75,7 @@ public:
if (csvh.size()<2) {
- error_dialog->set_text("Invalid translation source!");
+ error_dialog->set_text(TTR("Invalid translation source!"));
error_dialog->popup_centered(Size2(200,100));
return;
@@ -86,8 +86,8 @@ public:
TreeItem *root = columns->create_item();
columns->set_hide_root(true);
columns->set_column_titles_visible(true);
- columns->set_column_title(0,"Column");
- columns->set_column_title(1,"Language");
+ columns->set_column_title(0,TTR("Column"));
+ columns->set_column_title(1,TTR("Language"));
Vector<String> langs = TranslationServer::get_all_locales();
Vector<String> names = TranslationServer::get_all_locale_names();
if (csvh[0]=="")
@@ -231,16 +231,16 @@ public:
if (items.size()==0) {
- error_dialog->set_text("No items to import!");
+ error_dialog->set_text(TTR("No items to import!"));
error_dialog->popup_centered(Size2(200,100));
}
if (!save_path->get_text().begins_with("res://")) {
- error_dialog->set_text("No target path!!");
+ error_dialog->set_text(TTR("No target path!!"));
error_dialog->popup_centered(Size2(200,100));
}
- EditorProgress progress("import_xl","Import Translations",items.size());
+ EditorProgress progress("import_xl",TTR("Import Translations"),items.size());
for(int i=0;i<items.size();i++) {
progress.step(items[i]->get_metadata(1),i);
@@ -258,7 +258,7 @@ public:
String savefile = save_path->get_text().plus_file(import_path->get_text().get_file().basename()+"."+locale+".xl");
Error err = plugin->import(savefile,imd);
if (err!=OK) {
- error_dialog->set_text("Couldnt import!");
+ error_dialog->set_text(TTR("Couldnt import!"));
error_dialog->popup_centered(Size2(200,100));
} else if (add_to_project->is_pressed()) {
@@ -295,7 +295,7 @@ public:
plugin=p_plugin;
- set_title("Import Translation");
+ set_title(TTR("Import Translation"));
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
@@ -307,13 +307,13 @@ public:
HBoxContainer *hbc = memnew( HBoxContainer );
csvb->add_child(hbc);
- vbc->add_margin_child("Source CSV:",csvb);
+ vbc->add_margin_child(TTR("Source CSV:"),csvb);
import_path = memnew( LineEdit );
import_path->set_h_size_flags(SIZE_EXPAND_FILL);
hbc->add_child(import_path);
ignore_first = memnew( CheckButton );
- ignore_first->set_text("Ignore First Row");
+ ignore_first->set_text(TTR("Ignore First Row"));
csvb->add_child(ignore_first);
Button * import_choose = memnew( Button );
@@ -325,7 +325,7 @@ public:
VBoxContainer *tcomp = memnew( VBoxContainer);
hbc = memnew( HBoxContainer );
tcomp->add_child(hbc);
- vbc->add_margin_child("Target Path:",tcomp);
+ vbc->add_margin_child(TTR("Target Path:"),tcomp);
save_path = memnew( LineEdit );
save_path->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -339,12 +339,12 @@ public:
compress = memnew( CheckButton);
compress->set_pressed(true);
- compress->set_text("Compress");
+ compress->set_text(TTR("Compress"));
tcomp->add_child(compress);
add_to_project = memnew( CheckButton);
add_to_project->set_pressed(true);
- add_to_project->set_text("Add to Project (engine.cfg)");
+ add_to_project->set_text(TTR("Add to Project (engine.cfg)"));
tcomp->add_child(add_to_project);
file_select = memnew(EditorFileDialog);
@@ -360,18 +360,18 @@ public:
save_select->connect("dir_selected", this,"_choose_save_dir");
get_ok()->connect("pressed", this,"_import");
- get_ok()->set_text("Import");
+ get_ok()->set_text(TTR("Import"));
error_dialog = memnew ( ConfirmationDialog );
add_child(error_dialog);
- error_dialog->get_ok()->set_text("Accept");
+ error_dialog->get_ok()->set_text(TTR("Accept"));
// error_dialog->get_cancel()->hide();
set_hide_on_ok(false);
columns = memnew( Tree );
- vbc->add_margin_child("Import Languages:",columns,true);
+ vbc->add_margin_child(TTR("Import Languages:"),columns,true);
}
~EditorTranslationImportDialog() {
diff --git a/tools/editor/multi_node_edit.cpp b/tools/editor/multi_node_edit.cpp
index cfa998bee9..54697d41ab 100644
--- a/tools/editor/multi_node_edit.cpp
+++ b/tools/editor/multi_node_edit.cpp
@@ -9,7 +9,7 @@ bool MultiNodeEdit::_set(const StringName& p_name, const Variant& p_value){
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("MultiNode Set "+String(p_name));
+ ur->create_action(TTR("MultiNode Set ")+String(p_name));
for (const List<NodePath>::Element *E=nodes.front();E;E=E->next()) {
if (!es->has_node(E->get()))
diff --git a/tools/editor/plugins/animation_player_editor_plugin.cpp b/tools/editor/plugins/animation_player_editor_plugin.cpp
index da7c083c5a..745266e19a 100644
--- a/tools/editor/plugins/animation_player_editor_plugin.cpp
+++ b/tools/editor/plugins/animation_player_editor_plugin.cpp
@@ -144,7 +144,7 @@ void AnimationPlayerEditor::_autoplay_pressed() {
String current = animation->get_item_text( animation->get_selected() );
if (player->get_autoplay()==current) {
//unset
- undo_redo->create_action("Toggle Autoplay");
+ undo_redo->create_action(TTR("Toggle Autoplay"));
undo_redo->add_do_method(player,"set_autoplay","");
undo_redo->add_undo_method(player,"set_autoplay",player->get_autoplay());
undo_redo->add_do_method(this,"_animation_player_changed",player);
@@ -154,7 +154,7 @@ void AnimationPlayerEditor::_autoplay_pressed() {
} else {
//set
- undo_redo->create_action("Toggle Autoplay");
+ undo_redo->create_action(TTR("Toggle Autoplay"));
undo_redo->add_do_method(player,"set_autoplay",current);
undo_redo->add_undo_method(player,"set_autoplay",player->get_autoplay());
undo_redo->add_do_method(this,"_animation_player_changed",player);
@@ -317,10 +317,10 @@ void AnimationPlayerEditor::_animation_selected(int p_which) {
void AnimationPlayerEditor::_animation_new() {
renaming=false;
- name_title->set_text("New Animation Name:");
+ name_title->set_text(TTR("New Animation Name:"));
int count=1;
- String base="New Anim";
+ String base=TTR("New Anim");
while(true) {
String attempt = base;
if (count>1)
@@ -345,7 +345,7 @@ void AnimationPlayerEditor::_animation_rename() {
int selected = animation->get_selected();
String selected_name = animation->get_item_text(selected);
- name_title->set_text("Change Animation Name:");
+ name_title->set_text(TTR("Change Animation Name:"));
name->set_text(selected_name);
renaming=true;
name_dialog->popup_centered(Size2(300,90));
@@ -383,7 +383,7 @@ void AnimationPlayerEditor::_animation_save_in_path(const Ref<Resource>& p_resou
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;
}
@@ -437,7 +437,7 @@ void AnimationPlayerEditor::_animation_save_as(const Ref<Resource>& p_resource)
}
file->popup_centered_ratio();
- file->set_title("Save Resource As..");
+ file->set_title(TTR("Save Resource As.."));
current_option = RESOURCE_SAVE;
}
void AnimationPlayerEditor::_animation_remove() {
@@ -449,7 +449,7 @@ void AnimationPlayerEditor::_animation_remove() {
Ref<Animation> anim = player->get_animation(current);
- undo_redo->create_action("Remove Animation");
+ undo_redo->create_action(TTR("Remove Animation"));
undo_redo->add_do_method(player,"remove_animation",current);
undo_redo->add_undo_method(player,"add_animation",current,anim);
undo_redo->add_do_method(this,"_animation_player_changed",player);
@@ -485,7 +485,7 @@ void AnimationPlayerEditor::_animation_name_edited() {
String new_name = name->get_text();
if (new_name=="" || new_name.find(":")!=-1 || new_name.find("/")!=-1) {
- error_dialog->set_text("ERROR: Invalid animation name!");
+ error_dialog->set_text(TTR("ERROR: Invalid animation name!"));
error_dialog->popup_centered_minsize();
return;
}
@@ -496,7 +496,7 @@ void AnimationPlayerEditor::_animation_name_edited() {
}
if (player->has_animation(new_name)) {
- error_dialog->set_text("ERROR: Animation Name Already Exists!");
+ error_dialog->set_text(TTR("ERROR: Animation Name Already Exists!"));
error_dialog->popup_centered_minsize();
return;
}
@@ -505,7 +505,7 @@ void AnimationPlayerEditor::_animation_name_edited() {
String current = animation->get_item_text(animation->get_selected());
Ref<Animation> anim = player->get_animation(current);
- undo_redo->create_action("Rename Animation");
+ undo_redo->create_action(TTR("Rename Animation"));
undo_redo->add_do_method(player,"rename_animation",current,new_name);
undo_redo->add_do_method(anim.ptr(),"set_name",new_name);
undo_redo->add_undo_method(player,"rename_animation",new_name,current);
@@ -521,7 +521,7 @@ void AnimationPlayerEditor::_animation_name_edited() {
Ref<Animation> new_anim = Ref<Animation>(memnew( Animation ));
new_anim->set_name(new_name);
- undo_redo->create_action("Add Animation");
+ undo_redo->create_action(TTR("Add Animation"));
undo_redo->add_do_method(player,"add_animation",new_name,new_anim);
undo_redo->add_undo_method(player,"remove_animation",new_name);
undo_redo->add_do_method(this,"_animation_player_changed",player);
@@ -605,7 +605,7 @@ void AnimationPlayerEditor::_blend_edited() {
float blend_time = selected->get_range(1);
float prev_blend_time = player->get_blend_time(current,to);
- undo_redo->create_action("Change Blend Time");
+ undo_redo->create_action(TTR("Change Blend Time"));
undo_redo->add_do_method(player,"set_blend_time",current,to,blend_time);
undo_redo->add_undo_method(player,"set_blend_time",current,to,prev_blend_time);
undo_redo->add_do_method(this,"_animation_player_changed",player);
@@ -717,7 +717,7 @@ void AnimationPlayerEditor::_dialog_action(String p_file) {
if (p_file.find(".") != -1)
p_file = p_file.substr(0, p_file.find("."));
- undo_redo->create_action("Load Animation");
+ undo_redo->create_action(TTR("Load Animation"));
undo_redo->add_do_method(player, "add_animation", p_file, res);
undo_redo->add_undo_method(player, "remove_animation", p_file);
if (player->has_animation(p_file)) {
@@ -910,7 +910,7 @@ void AnimationPlayerEditor::_animation_duplicate() {
}
- undo_redo->create_action("Duplicate Animation");
+ undo_redo->create_action(TTR("Duplicate Animation"));
undo_redo->add_do_method(player,"add_animation",new_name,new_anim);
undo_redo->add_undo_method(player,"remove_animation",new_name);
undo_redo->add_do_method(this,"_animation_player_changed",player);
@@ -1000,7 +1000,7 @@ void AnimationPlayerEditor::_editor_store() {
return; //already there
- undo_redo->create_action("Store anim in editor");
+ undo_redo->create_action(TTR("Store anim in editor"));
undo_redo->add_do_method(key_editor,"set_animation",anim);
undo_redo->add_undo_method(key_editor,"remove_animation",anim);
undo_redo->commit_action();
@@ -1022,7 +1022,7 @@ void AnimationPlayerEditor::_editor_load(){
String base=anim->get_name();
bool noname=false;
if (base=="") {
- base="New Anim";
+ base=TTR("New Anim");
noname=true;
}
@@ -1041,7 +1041,7 @@ void AnimationPlayerEditor::_editor_load(){
if (noname)
anim->set_name(base);
- undo_redo->create_action("Add Animation From Editor");
+ undo_redo->create_action(TTR("Add Animation From Editor"));
undo_redo->add_do_method(player,"add_animation",base,anim);
undo_redo->add_undo_method(player,"remove_animation",base);
undo_redo->add_do_method(this,"_animation_player_changed",player);
@@ -1108,7 +1108,7 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
case TOOL_COPY_ANIM: {
if (!animation->get_item_count()) {
- error_dialog->set_text("ERROR: No animation to copy!");
+ error_dialog->set_text(TTR("ERROR: No animation to copy!"));
error_dialog->popup_centered_minsize();
return;
}
@@ -1123,14 +1123,14 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
Ref<Animation> anim = EditorSettings::get_singleton()->get_resource_clipboard();
if (!anim.is_valid()) {
- error_dialog->set_text("ERROR: No animation resource on clipboard!");
+ error_dialog->set_text(TTR("ERROR: No animation resource on clipboard!"));
error_dialog->popup_centered_minsize();
return;
}
String name = anim->get_name();
if (name=="") {
- name="Pasted Animation";
+ name=TTR("Pasted Animation");
}
int idx=1;
@@ -1141,7 +1141,7 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
name=base+" "+itos(idx);
}
- undo_redo->create_action("Paste Animation");
+ undo_redo->create_action(TTR("Paste Animation"));
undo_redo->add_do_method(player,"add_animation",name,anim);
undo_redo->add_undo_method(player,"remove_animation",name);
undo_redo->add_do_method(this,"_animation_player_changed",player);
@@ -1155,7 +1155,7 @@ void AnimationPlayerEditor::_animation_tool_menu(int p_option) {
case TOOL_EDIT_RESOURCE: {
if (!animation->get_item_count()) {
- error_dialog->set_text("ERROR: No animation to edit!");
+ error_dialog->set_text(TTR("ERROR: No animation to edit!"));
error_dialog->popup_centered_minsize();
return;
}
@@ -1276,7 +1276,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
Label * l;
/*l= memnew( Label );
- l->set_text("Animation Player:");
+ l->set_text(TTR("Animation Player:"));
add_child(l);*/
HBoxContainer *hb = memnew( HBoxContainer );
@@ -1284,25 +1284,25 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
play_bw_from = memnew( ToolButton );
- play_bw_from->set_tooltip("Play backwards selected animation from current pos. (A)");
+ play_bw_from->set_tooltip(TTR("Play backwards selected animation from current pos. (A)"));
hb->add_child(play_bw_from);
play_bw = memnew( ToolButton );
- play_bw->set_tooltip("Play backwards selected animation from end. (Shift+A)");
+ play_bw->set_tooltip(TTR("Play backwards selected animation from end. (Shift+A)"));
hb->add_child(play_bw);
stop = memnew( ToolButton );
stop->set_toggle_mode(true);
hb->add_child(stop);
- stop->set_tooltip("Stop animation playback. (S)");
+ stop->set_tooltip(TTR("Stop animation playback. (S)"));
play = memnew( ToolButton );
- play->set_tooltip("Play selected animation from start. (Shift+D)");
+ play->set_tooltip(TTR("Play selected animation from start. (Shift+D)"));
hb->add_child(play);
play_from = memnew( ToolButton );
- play_from->set_tooltip("Play selected animation from current pos. (D)");
+ play_from->set_tooltip(TTR("Play selected animation from current pos. (D)"));
hb->add_child(play_from);
@@ -1315,7 +1315,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
hb->add_child(frame);
frame->set_custom_minimum_size(Size2(60,0));
frame->set_stretch_ratio(2);
- frame->set_tooltip("Animation position (in seconds).");
+ frame->set_tooltip(TTR("Animation position (in seconds)."));
hb->add_child( memnew( VSeparator));
@@ -1323,24 +1323,24 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
hb->add_child(scale);
scale->set_h_size_flags(SIZE_EXPAND_FILL);
scale->set_stretch_ratio(1);
- scale->set_tooltip("Scale animation playback globally for the node.");
+ scale->set_tooltip(TTR("Scale animation playback globally for the node."));
scale->hide();
add_anim = memnew( ToolButton );
- add_anim->set_tooltip("Create new animation in player.");
+ add_anim->set_tooltip(TTR("Create new animation in player."));
hb->add_child(add_anim);
load_anim = memnew( ToolButton );
- load_anim->set_tooltip("Load an animation from disk.");
+ load_anim->set_tooltip(TTR("Load an animation from disk."));
hb->add_child(load_anim);
save_anim = memnew(MenuButton);
- save_anim->set_tooltip("Save the current animation");
- save_anim->get_popup()->add_item("Save", ANIM_SAVE);
- save_anim->get_popup()->add_item("Save As..", ANIM_SAVE_AS);
+ save_anim->set_tooltip(TTR("Save the current animation"));
+ save_anim->get_popup()->add_item(TTR("Save"), ANIM_SAVE);
+ save_anim->get_popup()->add_item(TTR("Save As.."), ANIM_SAVE_AS);
save_anim->set_focus_mode(Control::FOCUS_NONE);
hb->add_child(save_anim);
@@ -1350,40 +1350,40 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
duplicate_anim = memnew( ToolButton );
hb->add_child(duplicate_anim);
- duplicate_anim->set_tooltip("Duplicate Animation");
+ duplicate_anim->set_tooltip(TTR("Duplicate Animation"));
rename_anim = memnew( ToolButton );
hb->add_child(rename_anim);
- rename_anim->set_tooltip("Rename Animation");
+ rename_anim->set_tooltip(TTR("Rename Animation"));
remove_anim = memnew( ToolButton );
hb->add_child(remove_anim);
- remove_anim->set_tooltip("Remove Animation");
+ remove_anim->set_tooltip(TTR("Remove Animation"));
animation = memnew( OptionButton );
hb->add_child(animation);
animation->set_h_size_flags(SIZE_EXPAND_FILL);
- animation->set_tooltip("Display list of animations in player.");
+ animation->set_tooltip(TTR("Display list of animations in player."));
autoplay = memnew( ToolButton );
hb->add_child(autoplay);
- autoplay->set_tooltip("Autoplay On Load");
+ autoplay->set_tooltip(TTR("Autoplay On Load"));
blend_anim = memnew( ToolButton );
hb->add_child(blend_anim);
- blend_anim->set_tooltip("Edit Target Blend Times");
+ blend_anim->set_tooltip(TTR("Edit Target Blend Times"));
tool_anim = memnew( MenuButton);
//tool_anim->set_flat(false);
- tool_anim->set_tooltip("Animation Tools");
- tool_anim->get_popup()->add_item("Copy Animation",TOOL_COPY_ANIM);
- tool_anim->get_popup()->add_item("Paste Animation",TOOL_PASTE_ANIM);
+ tool_anim->set_tooltip(TTR("Animation Tools"));
+ tool_anim->get_popup()->add_item(TTR("Copy Animation"),TOOL_COPY_ANIM);
+ tool_anim->get_popup()->add_item(TTR("Paste Animation"),TOOL_PASTE_ANIM);
//tool_anim->get_popup()->add_separator();
- //tool_anim->get_popup()->add_item("Edit Anim Resource",TOOL_PASTE_ANIM);
+ //tool_anim->get_popup()->add_item(TTR("Edit Anim Resource"),TOOL_PASTE_ANIM);
hb->add_child(tool_anim);
nodename = memnew( Button );
@@ -1403,7 +1403,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
add_child(file);
name_dialog = memnew( ConfirmationDialog );
- name_dialog->set_title("Create New Animation");
+ name_dialog->set_title(TTR("Create New Animation"));
name_dialog->set_hide_on_ok(false);
add_child(name_dialog);
name = memnew( LineEdit );
@@ -1414,33 +1414,33 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
l = memnew( Label );
- l->set_text("Animation Name:");
+ l->set_text(TTR("Animation Name:"));
l->set_pos( Point2(10,10) );
name_dialog->add_child(l);
name_title=l;
error_dialog = memnew( ConfirmationDialog );
- error_dialog->get_ok()->set_text("Close");
- //error_dialog->get_cancel()->set_text("Close");
- error_dialog->set_text("Error!");
+ error_dialog->get_ok()->set_text(TTR("Close"));
+ //error_dialog->get_cancel()->set_text(TTR("Close"));
+ error_dialog->set_text(TTR("Error!"));
add_child(error_dialog);
name_dialog->connect("confirmed", this,"_animation_name_edited");
blend_editor.dialog = memnew( AcceptDialog );
add_child(blend_editor.dialog);
- blend_editor.dialog->get_ok()->set_text("Close");
+ blend_editor.dialog->get_ok()->set_text(TTR("Close"));
blend_editor.dialog->set_hide_on_ok(true);
VBoxContainer *blend_vb = memnew( VBoxContainer);
blend_editor.dialog->add_child(blend_vb);
blend_editor.dialog->set_child_rect(blend_vb);
blend_editor.tree = memnew( Tree );
blend_editor.tree->set_columns(2);
- blend_vb->add_margin_child("Blend Times: ",blend_editor.tree,true);
+ blend_vb->add_margin_child(TTR("Blend Times: "),blend_editor.tree,true);
blend_editor.next = memnew( LineEdit );
- blend_vb->add_margin_child("Next (Auto Queue):",blend_editor.next);
- blend_editor.dialog->set_title("Cross-Animation Blend Times");
+ blend_vb->add_margin_child(TTR("Next (Auto Queue):"),blend_editor.next);
+ blend_editor.dialog->set_title(TTR("Cross-Animation Blend Times"));
updating_blends=false;
blend_editor.tree->connect("item_edited",this,"_blend_edited");
diff --git a/tools/editor/plugins/animation_player_editor_plugin.h b/tools/editor/plugins/animation_player_editor_plugin.h
index 0ad849c2f9..5f3c8ec49b 100644
--- a/tools/editor/plugins/animation_player_editor_plugin.h
+++ b/tools/editor/plugins/animation_player_editor_plugin.h
@@ -203,7 +203,7 @@ public:
virtual Dictionary get_state() const { return anim_editor->get_state(); }
virtual void set_state(const Dictionary& p_state) { anim_editor->set_state(p_state); }
- virtual String get_name() const { return "Anim"; }
+ virtual String get_name() const { return TTR("Anim"); }
bool has_main_screen() const { return false; }
virtual void edit(Object *p_node);
virtual bool handles(Object *p_node) const;
diff --git a/tools/editor/plugins/animation_tree_editor_plugin.cpp b/tools/editor/plugins/animation_tree_editor_plugin.cpp
index 7e1214ec83..dc857bfacb 100644
--- a/tools/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/tools/editor/plugins/animation_tree_editor_plugin.cpp
@@ -274,7 +274,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
if (renaming_edit) {
- edit_label[0]->set_text("New name:");
+ edit_label[0]->set_text(TTR("New name:"));
edit_label[0]->set_pos(Point2(5,5));
edit_label[0]->show();
edit_line[0]->set_begin(Point2(15,25));
@@ -314,7 +314,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
}
return;
case AnimationTreePlayer::NODE_TIMESCALE:
- edit_label[0]->set_text("Scale:");
+ edit_label[0]->set_text(TTR("Scale:"));
edit_label[0]->set_pos(Point2(5,5));
edit_label[0]->show();
edit_line[0]->set_begin(Point2(15,25));
@@ -323,13 +323,13 @@ void AnimationTreeEditor::_popup_edit_dialog() {
edit_dialog->set_size(Size2(150,50));
break;
case AnimationTreePlayer::NODE_ONESHOT:
- edit_label[0]->set_text("Fade In (s):");
+ edit_label[0]->set_text(TTR("Fade In (s):"));
edit_label[0]->set_pos(Point2(5,5));
edit_label[0]->show();
edit_line[0]->set_begin(Point2(15,25));
edit_line[0]->set_text(rtos(anim_tree->oneshot_node_get_fadein_time(edited_node)));
edit_line[0]->show();
- edit_label[1]->set_text("Fade Out (s):");
+ edit_label[1]->set_text(TTR("Fade Out (s):"));
edit_label[1]->set_pos(Point2(5,55));
edit_label[1]->show();
edit_line[1]->set_begin(Point2(15,75));
@@ -337,25 +337,25 @@ void AnimationTreeEditor::_popup_edit_dialog() {
edit_line[1]->show();
edit_option->clear();
- edit_option->add_item("Blend",0);
- edit_option->add_item("Mix",1);
+ edit_option->add_item(TTR("Blend"),0);
+ edit_option->add_item(TTR("Mix"),1);
edit_option->set_begin(Point2(15,105));
edit_option->select( anim_tree->oneshot_node_get_mix_mode(edited_node));
edit_option->show();
- edit_check->set_text("Auto Restart:");
+ edit_check->set_text(TTR("Auto Restart:"));
edit_check->set_begin(Point2(15,125));
edit_check->set_pressed(anim_tree->oneshot_node_has_autorestart(edited_node));
edit_check->show();
- edit_label[2]->set_text("Restart (s):");
+ edit_label[2]->set_text(TTR("Restart (s):"));
edit_label[2]->set_pos(Point2(5,145));
edit_label[2]->show();
edit_line[2]->set_begin(Point2(15,165));
edit_line[2]->set_text(rtos(anim_tree->oneshot_node_get_autorestart_delay(edited_node)));
edit_line[2]->show();
- edit_label[3]->set_text("Random Restart (s):");
+ edit_label[3]->set_text(TTR("Random Restart (s):"));
edit_label[3]->set_pos(Point2(5,195));
edit_label[3]->show();
edit_line[3]->set_begin(Point2(15,215));
@@ -366,7 +366,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
filter_button->show();
edit_button->set_begin(Point2(10,268));
- edit_button->set_text("Start!");
+ edit_button->set_text(TTR("Start!"));
edit_button->show();
@@ -376,7 +376,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
case AnimationTreePlayer::NODE_MIX:
- edit_label[0]->set_text("Amount:");
+ edit_label[0]->set_text(TTR("Amount:"));
edit_label[0]->set_pos(Point2(5,5));
edit_label[0]->show();
edit_scroll[0]->set_min(0);
@@ -388,7 +388,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
break;
case AnimationTreePlayer::NODE_BLEND2:
- edit_label[0]->set_text("Blend:");
+ edit_label[0]->set_text(TTR("Blend:"));
edit_label[0]->set_pos(Point2(5,5));
edit_label[0]->show();
edit_scroll[0]->set_min(0);
@@ -403,7 +403,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
break;
case AnimationTreePlayer::NODE_BLEND3:
- edit_label[0]->set_text("Blend:");
+ edit_label[0]->set_text(TTR("Blend:"));
edit_label[0]->set_pos(Point2(5,5));
edit_label[0]->show();
edit_scroll[0]->set_min(-1);
@@ -416,7 +416,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
break;
case AnimationTreePlayer::NODE_BLEND4:
- edit_label[0]->set_text("Blend 0:");
+ edit_label[0]->set_text(TTR("Blend 0:"));
edit_label[0]->set_pos(Point2(5,5));
edit_label[0]->show();
edit_scroll[0]->set_min(0);
@@ -424,7 +424,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
edit_scroll[0]->set_val(anim_tree->blend4_node_get_amount(edited_node).x);
edit_scroll[0]->set_begin(Point2(15,25));
edit_scroll[0]->show();
- edit_label[1]->set_text("Blend 1:");
+ edit_label[1]->set_text(TTR("Blend 1:"));
edit_label[1]->set_pos(Point2(5,55));
edit_label[1]->show();
edit_scroll[1]->set_min(0);
@@ -439,14 +439,14 @@ void AnimationTreeEditor::_popup_edit_dialog() {
case AnimationTreePlayer::NODE_TRANSITION: {
- edit_label[0]->set_text("X-Fade Time (s):");
+ edit_label[0]->set_text(TTR("X-Fade Time (s):"));
edit_label[0]->set_pos(Point2(5,5));
edit_label[0]->show();
edit_line[0]->set_begin(Point2(15,25));
edit_line[0]->set_text(rtos(anim_tree->transition_node_get_xfade_time(edited_node)));
edit_line[0]->show();
- edit_label[1]->set_text("Current:");
+ edit_label[1]->set_text(TTR("Current:"));
edit_label[1]->set_pos(Point2(5,55));
edit_label[1]->show();
edit_option->set_begin(Point2(15,75));
@@ -812,15 +812,15 @@ void AnimationTreeEditor::_input_event(InputEvent p_event) {
if (rclick_type==CLICK_INPUT_SLOT || rclick_type==CLICK_OUTPUT_SLOT) {
node_popup->clear();
- node_popup->add_item("Disconnect",NODE_DISCONNECT);
+ node_popup->add_item(TTR("Disconnect"),NODE_DISCONNECT);
if (anim_tree->node_get_type(rclick_node)==AnimationTreePlayer::NODE_TRANSITION) {
- node_popup->add_item("Add Input",NODE_ADD_INPUT);
+ node_popup->add_item(TTR("Add Input"),NODE_ADD_INPUT);
if (rclick_type==CLICK_INPUT_SLOT) {
if (anim_tree->transition_node_has_input_auto_advance(rclick_node,rclick_slot))
- node_popup->add_item("Clear Auto-Advance",NODE_CLEAR_AUTOADVANCE);
+ node_popup->add_item(TTR("Clear Auto-Advance"),NODE_CLEAR_AUTOADVANCE);
else
- node_popup->add_item("Set Auto-Advance",NODE_SET_AUTOADVANCE);
- node_popup->add_item("Delete Input",NODE_DELETE_INPUT);
+ node_popup->add_item(TTR("Set Auto-Advance"),NODE_SET_AUTOADVANCE);
+ node_popup->add_item(TTR("Delete Input"),NODE_DELETE_INPUT);
}
}
@@ -832,10 +832,10 @@ void AnimationTreeEditor::_input_event(InputEvent p_event) {
if (rclick_type==CLICK_NODE) {
node_popup->clear();
- node_popup->add_item("Rename",NODE_RENAME);
- node_popup->add_item("Remove",NODE_ERASE);
+ node_popup->add_item(TTR("Rename"),NODE_RENAME);
+ node_popup->add_item(TTR("Remove"),NODE_ERASE);
if (anim_tree->node_get_type(rclick_node)==AnimationTreePlayer::NODE_TRANSITION)
- node_popup->add_item("Add Input",NODE_ADD_INPUT);
+ node_popup->add_item(TTR("Add Input"),NODE_ADD_INPUT);
node_popup->set_pos(rclick_pos+get_global_pos());
node_popup->popup();
}
@@ -990,12 +990,12 @@ void AnimationTreeEditor::_notification(int p_what) {
case AnimationTreePlayer::CONNECT_OK: {
Ref<Font> f = get_font("font","Label");
- f->draw(get_canvas_item(),Point2(5,25+f->get_ascent()),"Animation Tree is Valid.",Color(0,1,0.6,0.8));
+ f->draw(get_canvas_item(),Point2(5,25+f->get_ascent()),TTR("Animation Tree is Valid."),Color(0,1,0.6,0.8));
} break;
default: {
Ref<Font> f = get_font("font","Label");
- f->draw(get_canvas_item(),Point2(5,25+f->get_ascent()),"Animation Tree is Invalid.",Color(1,0.6,0.0,0.8));
+ f->draw(get_canvas_item(),Point2(5,25+f->get_ascent()),TTR("Animation Tree is Invalid."),Color(1,0.6,0.0,0.8));
} break;
}
@@ -1359,19 +1359,19 @@ AnimationTreeEditor::AnimationTreeEditor() {
add_child( add_menu );
p=add_menu->get_popup();
- p->add_item("Animation Node",AnimationTreePlayer::NODE_ANIMATION);
- p->add_item("OneShot Node",AnimationTreePlayer::NODE_ONESHOT);
- p->add_item("Mix Node",AnimationTreePlayer::NODE_MIX);
- p->add_item("Blend2 Node",AnimationTreePlayer::NODE_BLEND2);
- p->add_item("Blend3 Node",AnimationTreePlayer::NODE_BLEND3);
- p->add_item("Blend4 Node",AnimationTreePlayer::NODE_BLEND4);
- p->add_item("TimeScale Node",AnimationTreePlayer::NODE_TIMESCALE);
- p->add_item("TimeSeek Node",AnimationTreePlayer::NODE_TIMESEEK);
- p->add_item("Transition Node",AnimationTreePlayer::NODE_TRANSITION);
+ p->add_item(TTR("Animation Node"),AnimationTreePlayer::NODE_ANIMATION);
+ p->add_item(TTR("OneShot Node"),AnimationTreePlayer::NODE_ONESHOT);
+ p->add_item(TTR("Mix Node"),AnimationTreePlayer::NODE_MIX);
+ p->add_item(TTR("Blend2 Node"),AnimationTreePlayer::NODE_BLEND2);
+ p->add_item(TTR("Blend3 Node"),AnimationTreePlayer::NODE_BLEND3);
+ p->add_item(TTR("Blend4 Node"),AnimationTreePlayer::NODE_BLEND4);
+ p->add_item(TTR("TimeScale Node"),AnimationTreePlayer::NODE_TIMESCALE);
+ p->add_item(TTR("TimeSeek Node"),AnimationTreePlayer::NODE_TIMESEEK);
+ p->add_item(TTR("Transition Node"),AnimationTreePlayer::NODE_TRANSITION);
p->add_separator();
- p->add_item("Import Animations...", MENU_IMPORT_ANIMATIONS); // wtf
+ p->add_item(TTR("Import Animations..."), MENU_IMPORT_ANIMATIONS); // wtf
p->add_separator();
- p->add_item("Clear",MENU_GRAPH_CLEAR);
+ p->add_item(TTR("Clear"),MENU_GRAPH_CLEAR);
p->connect("item_pressed", this,"_add_menu_item");
@@ -1471,7 +1471,7 @@ AnimationTreeEditor::AnimationTreeEditor() {
file_dialog->connect("file_selected", this, "_file_dialog_selected");
filter_dialog = memnew( AcceptDialog );
- filter_dialog->set_title("Edit Node Filters");
+ filter_dialog->set_title(TTR("Edit Node Filters"));
add_child(filter_dialog);
filter = memnew( Tree );
@@ -1484,7 +1484,7 @@ AnimationTreeEditor::AnimationTreeEditor() {
filter_button->set_margin(MARGIN_RIGHT, 10);
edit_dialog->add_child(filter_button);
filter_button->hide();;
- filter_button->set_text("Filters..");
+ filter_button->set_text(TTR("Filters.."));
filter_button->connect("pressed", this,"_edit_filters");
}
@@ -1524,7 +1524,7 @@ AnimationTreeEditorPlugin::AnimationTreeEditorPlugin(EditorNode *p_node) {
anim_tree_editor = memnew( AnimationTreeEditor );
anim_tree_editor->set_custom_minimum_size(Size2(0,300));
- button=editor->add_bottom_panel_item("AnimationTree",anim_tree_editor);
+ button=editor->add_bottom_panel_item(TTR("AnimationTree"),anim_tree_editor);
button->hide();
diff --git a/tools/editor/plugins/animation_tree_editor_plugin.h b/tools/editor/plugins/animation_tree_editor_plugin.h
index 4884a22d90..989a6b0b04 100644
--- a/tools/editor/plugins/animation_tree_editor_plugin.h
+++ b/tools/editor/plugins/animation_tree_editor_plugin.h
@@ -180,7 +180,7 @@ class AnimationTreeEditorPlugin : public EditorPlugin {
public:
- virtual String get_name() const { return "AnimTree"; }
+ virtual String get_name() const { return TTR("AnimTree"); }
bool has_main_screen() const { return false; }
virtual void edit(Object *p_node);
virtual bool handles(Object *p_node) const;
diff --git a/tools/editor/plugins/baked_light_baker.cpp b/tools/editor/plugins/baked_light_baker.cpp
index 4599dbfb54..a37bbce6fe 100644
--- a/tools/editor/plugins/baked_light_baker.cpp
+++ b/tools/editor/plugins/baked_light_baker.cpp
@@ -728,14 +728,14 @@ void BakedLightBaker::_make_octree() {
for(int i=0;i<8;i++)
root->children[i]=0;
- EditorProgress ep("bake_octree","Parsing "+itos(triangles.size())+" Triangles:",triangles.size());
+ EditorProgress ep("bake_octree",TTR("Parsing ")+itos(triangles.size())+" Triangles:",triangles.size());
for(int i=0;i<triangles.size();i++) {
_octree_insert(0,&triangles[i],octree_depth-1);
if ((i%1000)==0) {
- ep.step("Triangle# "+itos(i),i);
+ ep.step(TTR("Triangle# ")+itos(i),i);
}
}
@@ -1533,7 +1533,7 @@ void BakedLightBaker::_make_octree_texture() {
baked_octree_texture_h=nearest_power_of_2(baked_octree_texture_h);
- print_line("RESULT! "+itos(baked_octree_texture_w)+","+itos(baked_octree_texture_h));
+ print_line(TTR("RESULT! ")+itos(baked_octree_texture_w)+","+itos(baked_octree_texture_h));
}
@@ -1716,7 +1716,7 @@ void BakedLightBaker::bake(const Ref<BakedLight> &p_light, Node* p_node) {
cell_count=0;
base_inv=p_node->cast_to<Spatial>()->get_global_transform().affine_inverse();
- EditorProgress ep("bake","Light Baker Setup:",5);
+ EditorProgress ep("bake",TTR("Light Baker Setup:"),5);
baked_light=p_light;
lattice_size=baked_light->get_initial_lattice_subdiv();
octree_depth=baked_light->get_cell_subdivision();
@@ -1743,18 +1743,18 @@ void BakedLightBaker::bake(const Ref<BakedLight> &p_light, Node* p_node) {
}
- ep.step("Parsing Geometry",0);
+ ep.step(TTR("Parsing Geometry"),0);
_parse_geometry(p_node);
mat_map.clear();
tex_map.clear();
print_line("\ttotal triangles: "+itos(triangles.size()));
- ep.step("Fixing Lights",1);
+ ep.step(TTR("Fixing Lights"),1);
_fix_lights();
- ep.step("Making BVH",2);
+ ep.step(TTR("Making BVH"),2);
_make_bvh();
- ep.step("Creating Light Octree",3);
+ ep.step(TTR("Creating Light Octree"),3);
_make_octree();
- ep.step("Creating Octree Texture",4);
+ ep.step(TTR("Creating Octree Texture"),4);
_make_octree_texture();
baking=true;
_start_thread();
@@ -1810,7 +1810,7 @@ void BakedLightBaker::update_octree_sampler(DVector<int> &p_sampler) {
if (octant.children[j]) {
tmp_smp.push_back(octants[octant.children[j]].sampler_ofs);
if (octants[octant.children[j]].sampler_ofs==0) {
- print_line("FUUUUUUUUCK");
+ print_line(TTR("FUUUUUUUUCK"));
}
}
}
@@ -2357,7 +2357,7 @@ Error BakedLightBaker::transfer_to_lightmaps() {
if (!triangles.size() || baked_textures.size()==0)
return ERR_UNCONFIGURED;
- EditorProgress ep("transfer_to_lightmaps","Transfer to Lightmaps:",baked_textures.size()*2+triangles.size());
+ EditorProgress ep("transfer_to_lightmaps",TTR("Transfer to Lightmaps:"),baked_textures.size()*2+triangles.size());
for(int i=0;i<baked_textures.size();i++) {
@@ -2365,7 +2365,7 @@ Error BakedLightBaker::transfer_to_lightmaps() {
baked_textures[i].data.resize( baked_textures[i].width*baked_textures[i].height*4 );
zeromem(baked_textures[i].data.ptr(),baked_textures[i].data.size());
- ep.step("Allocating Texture #"+itos(i+1),i);
+ ep.step(TTR("Allocating Texture #")+itos(i+1),i);
}
Vector<double> norm_arr;
@@ -2382,7 +2382,7 @@ Error BakedLightBaker::transfer_to_lightmaps() {
for(int i=0;i<triangles.size();i++) {
if (i%200==0) {
- ep.step("Baking Triangle #"+itos(i),i+baked_textures.size());
+ ep.step(TTR("Baking Triangle #")+itos(i),i+baked_textures.size());
}
Triangle &t=triangles[i];
if (t.baked_texture<0 || t.baked_texture>=baked_textures.size())
@@ -2505,7 +2505,7 @@ Error BakedLightBaker::transfer_to_lightmaps() {
{
- ep.step("Post-Processing Texture #"+itos(i),i+baked_textures.size()+triangles.size());
+ ep.step(TTR("Post-Processing Texture #")+itos(i),i+baked_textures.size()+triangles.size());
BakeTexture &bt=baked_textures[i];
diff --git a/tools/editor/plugins/baked_light_editor_plugin.cpp b/tools/editor/plugins/baked_light_editor_plugin.cpp
index 56aabaf6d9..690b2cd55e 100644
--- a/tools/editor/plugins/baked_light_editor_plugin.cpp
+++ b/tools/editor/plugins/baked_light_editor_plugin.cpp
@@ -97,7 +97,7 @@ void BakedLightEditor::_notification(int p_option) {
}
}
- print_line("MSCOL: "+itos(OS::get_singleton()->get_ticks_msec()-t));
+ print_line(TTR("MSCOL: ")+itos(OS::get_singleton()->get_ticks_msec()-t));
t = OS::get_singleton()->get_ticks_msec();
Array a;
@@ -132,14 +132,14 @@ void BakedLightEditor::_notification(int p_option) {
bake_info->set_text("rays/s: "+itos(rays_sec));
update_timeout=1;
- print_line("MSUPDATE: "+itos(OS::get_singleton()->get_ticks_msec()-t));
+ print_line(TTR("MSUPDATE: ")+itos(OS::get_singleton()->get_ticks_msec()-t));
t=OS::get_singleton()->get_ticks_msec();
node->get_baked_light()->set_octree(octree_texture);
node->get_baked_light()->set_light(light_texture);
node->get_baked_light()->set_sampler_octree(octree_sampler);
node->get_baked_light()->set_edited(true);
- print_line("MSSET: "+itos(OS::get_singleton()->get_ticks_msec()-t));
+ print_line(TTR("MSSET: ")+itos(OS::get_singleton()->get_ticks_msec()-t));
@@ -179,7 +179,7 @@ void BakedLightEditor::_bake_pressed() {
ERR_FAIL_COND(!node);
if (node->get_baked_light().is_null()) {
- err_dialog->set_text("BakedLightInstance does not contain a BakedLight resource.");
+ err_dialog->set_text(TTR("BakedLightInstance does not contain a BakedLight resource."));
err_dialog->popup_centered_minsize();
button_bake->set_pressed(false);
return;
@@ -264,7 +264,7 @@ BakedLightEditor::BakedLightEditor() {
bake_hbox = memnew( HBoxContainer );
button_bake = memnew( ToolButton );
- button_bake->set_text("Bake!");
+ button_bake->set_text(TTR("Bake!"));
button_bake->set_toggle_mode(true);
button_reset = memnew( Button );
button_make_lightmaps = memnew( Button );
@@ -289,7 +289,7 @@ BakedLightEditor::BakedLightEditor() {
button_reset->connect("pressed",this,"_clear_pressed");
button_make_lightmaps->connect("pressed",this,"_bake_lightmaps");
button_reset->hide();
- button_reset->set_tooltip("Reset the lightmap octree baking process (start over).");
+ button_reset->set_tooltip(TTR("Reset the lightmap octree baking process (start over)."));
update_timeout=0;
diff --git a/tools/editor/plugins/camera_editor_plugin.cpp b/tools/editor/plugins/camera_editor_plugin.cpp
index 7433264b16..9c25de695c 100644
--- a/tools/editor/plugins/camera_editor_plugin.cpp
+++ b/tools/editor/plugins/camera_editor_plugin.cpp
@@ -87,7 +87,7 @@ CameraEditor::CameraEditor() {
preview = memnew( Button );
add_child(preview);
- preview->set_text("Preview");
+ preview->set_text(TTR("Preview"));
preview->set_toggle_mode(true);
preview->set_anchor(MARGIN_LEFT,Control::ANCHOR_END);
preview->set_anchor(MARGIN_RIGHT,Control::ANCHOR_END);
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp
index 31f50b65f5..76fa1ef8e2 100644
--- a/tools/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp
@@ -62,8 +62,8 @@ public:
VBoxContainer *container;
GridContainer *child_container;
- set_title("Configure Snap");
- get_ok()->set_text("Close");
+ set_title(TTR("Configure Snap"));
+ get_ok()->set_text(TTR("Close"));
container = memnew( VBoxContainer );
add_child(container);
@@ -74,7 +74,7 @@ public:
container->add_child(child_container);
label = memnew( Label );
- label->set_text("Grid Offset:");
+ label->set_text(TTR("Grid Offset:"));
child_container->add_child(label);
label->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -91,7 +91,7 @@ public:
child_container->add_child(grid_offset_y);
label = memnew( Label );
- label->set_text("Grid Step:");
+ label->set_text(TTR("Grid Step:"));
child_container->add_child(label);
label->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -114,7 +114,7 @@ public:
container->add_child(child_container);
label = memnew( Label );
- label->set_text("Rotation Offset:");
+ label->set_text(TTR("Rotation Offset:"));
child_container->add_child(label);
label->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -125,7 +125,7 @@ public:
child_container->add_child(rotation_offset);
label = memnew( Label );
- label->set_text("Rotation Step:");
+ label->set_text(TTR("Rotation Step:"));
child_container->add_child(label);
label->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -158,7 +158,7 @@ public:
void CanvasItemEditor::_edit_set_pivot(const Vector2& mouse_pos) {
List<Node*> &selection = editor_selection->get_selected_node_list();
- undo_redo->create_action("Move Pivot");
+ undo_redo->create_action(TTR("Move Pivot"));
for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
@@ -645,7 +645,7 @@ void CanvasItemEditor::_key_move(const Vector2& p_dir, bool p_snap, KeyMoveMODE
if (editor_selection->get_selected_node_list().empty())
return;
- undo_redo->create_action("Move Action",true);
+ undo_redo->create_action(TTR("Move Action"),true);
List<Node*> &selection = editor_selection->get_selected_node_list();
@@ -1193,7 +1193,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
if (bone_ik_list.size()) {
- undo_redo->create_action("Edit IK Chain");
+ undo_redo->create_action(TTR("Edit IK Chain"));
for(List<BoneIK>::Element *E=bone_ik_list.back();E;E=E->prev()) {
@@ -1209,7 +1209,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
undo_redo->commit_action();
} else {
- undo_redo->create_action("Edit CanvasItem");
+ undo_redo->create_action(TTR("Edit CanvasItem"));
List<Node*> &selection = editor_selection->get_selected_node_list();
@@ -1730,7 +1730,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
if ((leaf_pos.distance_to(root_pos)) > total_len) {
//oops dude you went too far
- //print_line("TOO FAR!");
+ //print_line(TTR("TOO FAR!"));
Vector2 rel = leaf_pos - root_pos;
rel = rel.normalized() * total_len;
leaf_pos=root_pos+rel;
@@ -1739,7 +1739,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
bone_ik_list.front()->get().pos=leaf_pos;
- //print_line("BONE IK LIST "+itos(bone_ik_list.size()));
+ //print_line(TTR("BONE IK LIST ")+itos(bone_ik_list.size()));
if (bone_ik_list.size()>2) {
@@ -1764,22 +1764,22 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
//print_line("back");
Vector2 rel = E->get().pos - E->next()->get().pos;
- //print_line("PREV "+E->get().pos);
+ //print_line(TTR("PREV ")+E->get().pos);
Vector2 desired = E->next()->get().pos+rel.normalized()*len;
- //print_line("DESIRED "+desired);
+ //print_line(TTR("DESIRED ")+desired);
E->get().pos=E->get().pos.linear_interpolate(desired,solver_k);
- //print_line("POST "+E->get().pos);
+ //print_line(TTR("POST ")+E->get().pos);
} else if (E==bone_ik_list.front()) {
//only adjust parent
//print_line("front");
Vector2 rel = E->next()->get().pos - E->get().pos;
- //print_line("PREV "+E->next()->get().pos);
+ //print_line(TTR("PREV ")+E->next()->get().pos);
Vector2 desired = E->get().pos+rel.normalized()*len;
- //print_line("DESIRED "+desired);
+ //print_line(TTR("DESIRED ")+desired);
E->next()->get().pos=E->next()->get().pos.linear_interpolate(desired,solver_k);
- //print_line("POST "+E->next()->get().pos);
+ //print_line(TTR("POST ")+E->next()->get().pos);
} else {
Vector2 rel = E->next()->get().pos - E->get().pos;
@@ -1904,7 +1904,7 @@ void CanvasItemEditor::_viewport_draw() {
if (h_scroll->is_visible())
size.height-=h_scroll->get_size().height;
- get_stylebox("EditorFocus","EditorStyles")->draw(ci,Rect2(Point2(),size));
+ get_stylebox(TTR("EditorFocus"),"EditorStyles")->draw(ci,Rect2(Point2(),size));
}
Ref<Texture> lock = get_icon("Lock","EditorIcons");
@@ -2227,7 +2227,7 @@ void CanvasItemEditor::_notification(int p_what) {
key_insert_button->set_icon(get_icon("Key","EditorIcons"));
- //anchor_menu->add_icon_override("Align Top Left");
+ //anchor_menu->add_icon_override(TTR("Align Top Left"));
anchor_menu->set_icon(get_icon("Anchor","EditorIcons"));
PopupMenu *p=anchor_menu->get_popup();
@@ -2462,7 +2462,7 @@ void CanvasItemEditor::_update_scroll(float) {
void CanvasItemEditor::_set_anchor(Control::AnchorType p_left,Control::AnchorType p_top,Control::AnchorType p_right,Control::AnchorType p_bottom) {
List<Node*> &selection = editor_selection->get_selected_node_list();
- undo_redo->create_action("Change Anchors");
+ undo_redo->create_action(TTR("Change Anchors"));
for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
Control *c = E->get()->cast_to<Control>();
@@ -2541,7 +2541,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
updating_value_dialog=true;
- dialog_label->set_text("Zoom (%):");
+ dialog_label->set_text(TTR("Zoom (%):"));
dialog_val->set_min(0.1);
dialog_val->set_step(0.1);
dialog_val->set_max(800);
@@ -2896,7 +2896,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
if (!pose_clipboard.size())
break;
- undo_redo->create_action("Paste Pose");
+ undo_redo->create_action(TTR("Paste Pose"));
for (List<PoseClipboard>::Element *E=pose_clipboard.front();E;E=E->next()) {
Object *o = ObjectDB::get_instance(E->get().id);
@@ -3145,7 +3145,7 @@ void CanvasItemEditor::end_drag() {
if (undo_redo) {
- undo_redo->create_action("Edit CanvasItem");
+ undo_redo->create_action(TTR("Edit CanvasItem"));
for(CanvasItemMap::Element *E=canvas_items.front();E;E=E->next()) {
CanvasItem *canvas_item = E->key();
Variant state=canvas_item->edit_get_state();
@@ -3290,13 +3290,13 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
move_button->set_toggle_mode(true);
hb->add_child(move_button);
move_button->connect("pressed",this,"_tool_select",make_binds(TOOL_MOVE));
- move_button->set_tooltip("Move Mode (W)");
+ move_button->set_tooltip(TTR("Move Mode (W)"));
rotate_button = memnew( ToolButton );
rotate_button->set_toggle_mode(true);
hb->add_child(rotate_button);
rotate_button->connect("pressed",this,"_tool_select",make_binds(TOOL_ROTATE));
- rotate_button->set_tooltip("Rotate Mode (E)");
+ rotate_button->set_tooltip(TTR("Rotate Mode (E)"));
hb->add_child(memnew(VSeparator));
@@ -3310,13 +3310,13 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
pivot_button->set_toggle_mode(true);
hb->add_child(pivot_button);
pivot_button->connect("pressed",this,"_tool_select",make_binds(TOOL_EDIT_PIVOT));
- pivot_button->set_tooltip("Click to change object's rotation pivot");
+ pivot_button->set_tooltip(TTR("Click to change object's rotation pivot"));
pan_button = memnew( ToolButton );
pan_button->set_toggle_mode(true);
hb->add_child(pan_button);
pan_button->connect("pressed",this,"_tool_select",make_binds(TOOL_PAN));
- pan_button->set_tooltip("Pan Mode");
+ pan_button->set_tooltip(TTR("Pan Mode"));
hb->add_child(memnew(VSeparator));
@@ -3329,7 +3329,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
unlock_button = memnew( ToolButton );
hb->add_child(unlock_button);
unlock_button->connect("pressed",this,"_popup_callback",varray(UNLOCK_SELECTED));
- unlock_button->set_tooltip("Unlock the selected object (can be moved).");
+ unlock_button->set_tooltip(TTR("Unlock the selected object (can be moved)."));
group_button = memnew( ToolButton );
hb->add_child(group_button);
@@ -3344,57 +3344,57 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
hb->add_child(memnew(VSeparator));
edit_menu = memnew( MenuButton );
- edit_menu->set_text("Edit");
+ edit_menu->set_text(TTR("Edit"));
hb->add_child(edit_menu);
edit_menu->get_popup()->connect("item_pressed", this,"_popup_callback");
PopupMenu *p;
p = edit_menu->get_popup();
- p->add_check_item("Use Snap",SNAP_USE);
- p->add_check_item("Show Grid",SNAP_SHOW_GRID);
- p->add_check_item("Use Rotation Snap",SNAP_USE_ROTATION);
- p->add_check_item("Snap Relative",SNAP_RELATIVE);
- p->add_item("Configure Snap..",SNAP_CONFIGURE);
+ p->add_check_item(TTR("Use Snap"),SNAP_USE);
+ p->add_check_item(TTR("Show Grid"),SNAP_SHOW_GRID);
+ p->add_check_item(TTR("Use Rotation Snap"),SNAP_USE_ROTATION);
+ p->add_check_item(TTR("Snap Relative"),SNAP_RELATIVE);
+ p->add_item(TTR("Configure Snap.."),SNAP_CONFIGURE);
p->add_separator();
- p->add_check_item("Use Pixel Snap",SNAP_USE_PIXEL);
+ p->add_check_item(TTR("Use Pixel Snap"),SNAP_USE_PIXEL);
p->add_separator();
- p->add_item("Expand to Parent",EXPAND_TO_PARENT,KEY_MASK_CMD|KEY_P);
+ p->add_item(TTR("Expand to Parent"),EXPAND_TO_PARENT,KEY_MASK_CMD|KEY_P);
p->add_separator();
- p->add_submenu_item("Skeleton..","skeleton");
+ p->add_submenu_item(TTR("Skeleton.."),"skeleton");
PopupMenu *p2 = memnew(PopupMenu);
p->add_child(p2);
p2->set_name("skeleton");
- p2->add_item("Make Bones",SKELETON_MAKE_BONES,KEY_MASK_CMD|KEY_MASK_SHIFT|KEY_B);
- p2->add_item("Clear Bones",SKELETON_CLEAR_BONES);
+ p2->add_item(TTR("Make Bones"),SKELETON_MAKE_BONES,KEY_MASK_CMD|KEY_MASK_SHIFT|KEY_B);
+ p2->add_item(TTR("Clear Bones"),SKELETON_CLEAR_BONES);
p2->add_separator();
- p2->add_item("Make IK Chain",SKELETON_SET_IK_CHAIN);
- p2->add_item("Clear IK Chain",SKELETON_CLEAR_IK_CHAIN);
+ p2->add_item(TTR("Make IK Chain"),SKELETON_SET_IK_CHAIN);
+ p2->add_item(TTR("Clear IK Chain"),SKELETON_CLEAR_IK_CHAIN);
p2->connect("item_pressed", this,"_popup_callback");
/*
- p->add_item("Align Horizontal",ALIGN_HORIZONTAL);
- p->add_item("Align Vertical",ALIGN_VERTICAL);
- p->add_item("Space Horizontal",SPACE_HORIZONTAL);
- p->add_item("Space Vertical",SPACE_VERTICAL);*/
+ p->add_item(TTR("Align Horizontal"),ALIGN_HORIZONTAL);
+ p->add_item(TTR("Align Vertical"),ALIGN_VERTICAL);
+ p->add_item(TTR("Space Horizontal"),SPACE_HORIZONTAL);
+ p->add_item(TTR("Space Vertical"),SPACE_VERTICAL);*/
view_menu = memnew( MenuButton );
- view_menu->set_text("View");
+ view_menu->set_text(TTR("View"));
hb->add_child(view_menu);
view_menu->get_popup()->connect("item_pressed", this,"_popup_callback");
p = view_menu->get_popup();
- p->add_item("Zoom In",ZOOM_IN);
- p->add_item("Zoom Out",ZOOM_OUT);
- p->add_item("Zoom Reset",ZOOM_RESET);
- p->add_item("Zoom Set..",ZOOM_SET);
+ p->add_item(TTR("Zoom In"),ZOOM_IN);
+ p->add_item(TTR("Zoom Out"),ZOOM_OUT);
+ p->add_item(TTR("Zoom Reset"),ZOOM_RESET);
+ p->add_item(TTR("Zoom Set.."),ZOOM_SET);
p->add_separator();
- p->add_item("Center Selection", VIEW_CENTER_TO_SELECTION, KEY_F);
- p->add_item("Frame Selection", VIEW_FRAME_TO_SELECTION, KEY_MASK_CMD|KEY_F);
+ p->add_item(TTR("Center Selection"), VIEW_CENTER_TO_SELECTION, KEY_F);
+ p->add_item(TTR("Frame Selection"), VIEW_FRAME_TO_SELECTION, KEY_MASK_CMD|KEY_F);
anchor_menu = memnew( MenuButton );
- anchor_menu->set_text("Anchor");
+ anchor_menu->set_text(TTR("Anchor"));
hb->add_child(anchor_menu);
anchor_menu->get_popup()->connect("item_pressed", this,"_popup_callback");
anchor_menu->hide();
@@ -3434,7 +3434,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
key_insert_button = memnew( Button );
key_insert_button->set_focus_mode(FOCUS_NONE);
key_insert_button->connect("pressed",this,"_popup_callback",varray(ANIM_INSERT_KEY));
- key_insert_button->set_tooltip("Insert Keys (Insert)");
+ key_insert_button->set_tooltip(TTR("Insert Keys (Insert)"));
animation_hb->add_child(key_insert_button);
@@ -3445,24 +3445,24 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
p = animation_menu->get_popup();
- p->add_item("Insert Key",ANIM_INSERT_KEY,KEY_INSERT);
- p->add_item("Insert Key (Existing Tracks)",ANIM_INSERT_KEY_EXISTING,KEY_MASK_CMD+KEY_INSERT);
+ p->add_item(TTR("Insert Key"),ANIM_INSERT_KEY,KEY_INSERT);
+ p->add_item(TTR("Insert Key (Existing Tracks)"),ANIM_INSERT_KEY_EXISTING,KEY_MASK_CMD+KEY_INSERT);
p->add_separator();
- p->add_item("Copy Pose",ANIM_COPY_POSE);
- p->add_item("Paste Pose",ANIM_PASTE_POSE);
- p->add_item("Clear Pose",ANIM_CLEAR_POSE,KEY_MASK_SHIFT|KEY_K);
+ p->add_item(TTR("Copy Pose"),ANIM_COPY_POSE);
+ p->add_item(TTR("Paste Pose"),ANIM_PASTE_POSE);
+ p->add_item(TTR("Clear Pose"),ANIM_CLEAR_POSE,KEY_MASK_SHIFT|KEY_K);
snap_dialog = memnew( SnapDialog );
snap_dialog->connect("confirmed",this,"_snap_changed");
add_child(snap_dialog);
value_dialog = memnew( AcceptDialog );
- value_dialog->set_title("Set a Value");
- value_dialog->get_ok()->set_text("Close");
+ value_dialog->set_title(TTR("Set a Value"));
+ value_dialog->get_ok()->set_text(TTR("Close"));
add_child(value_dialog);
Label *l = memnew(Label);
- l->set_text("Snap (Pixels):");
+ l->set_text(TTR("Snap (Pixels):"));
l->set_pos(Point2(5,5));
value_dialog->add_child(l);
dialog_label=l;
diff --git a/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp
index 8eea723126..8abb51159e 100644
--- a/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp
@@ -57,7 +57,7 @@ void CollisionPolygon2DEditor::_menu_option(int p_option) {
void CollisionPolygon2DEditor::_wip_close() {
- undo_redo->create_action("Create Poly");
+ undo_redo->create_action(TTR("Create Poly"));
undo_redo->add_undo_method(node,"set_polygon",node->get_polygon());
undo_redo->add_do_method(node,"set_polygon",wip);
undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
@@ -149,7 +149,7 @@ bool CollisionPolygon2DEditor::forward_input_event(const InputEvent& p_event) {
if (poly.size() < 3) {
- undo_redo->create_action("Edit Poly");
+ undo_redo->create_action(TTR("Edit Poly"));
undo_redo->add_undo_method(node,"set_polygon",poly);
poly.push_back(cpoint);
undo_redo->add_do_method(node,"set_polygon",poly);
@@ -229,7 +229,7 @@ bool CollisionPolygon2DEditor::forward_input_event(const InputEvent& p_event) {
ERR_FAIL_INDEX_V(edited_point,poly.size(),false);
poly[edited_point]=edited_point_pos;
- undo_redo->create_action("Edit Poly");
+ undo_redo->create_action(TTR("Edit Poly"));
undo_redo->add_do_method(node,"set_polygon",poly);
undo_redo->add_undo_method(node,"set_polygon",pre_move_edit);
undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
@@ -263,7 +263,7 @@ bool CollisionPolygon2DEditor::forward_input_event(const InputEvent& p_event) {
if (closest_idx>=0) {
- undo_redo->create_action("Edit Poly (Remove Point)");
+ undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
undo_redo->add_undo_method(node,"set_polygon",poly);
poly.remove(closest_idx);
undo_redo->add_do_method(node,"set_polygon",poly);
@@ -390,7 +390,7 @@ CollisionPolygon2DEditor::CollisionPolygon2DEditor(EditorNode *p_editor) {
add_child(button_create);
button_create->connect("pressed",this,"_menu_option",varray(MODE_CREATE));
button_create->set_toggle_mode(true);
- button_create->set_tooltip("Create a new polygon from scratch");
+ button_create->set_tooltip(TTR("Create a new polygon from scratch"));
button_edit = memnew( ToolButton );
add_child(button_edit);
@@ -404,8 +404,8 @@ CollisionPolygon2DEditor::CollisionPolygon2DEditor(EditorNode *p_editor) {
options = memnew( MenuButton );
add_child(options);
options->set_area_as_parent_rect();
- options->set_text("Polygon");
- //options->get_popup()->add_item("Parse BBCODE",PARSE_BBCODE);
+ options->set_text(TTR("Polygon"));
+ //options->get_popup()->add_item(TTR("Parse BBCODE"),PARSE_BBCODE);
options->get_popup()->connect("item_pressed", this,"_menu_option");
#endif
diff --git a/tools/editor/plugins/collision_polygon_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_editor_plugin.cpp
index 44854e655f..5cd09f1a93 100644
--- a/tools/editor/plugins/collision_polygon_editor_plugin.cpp
+++ b/tools/editor/plugins/collision_polygon_editor_plugin.cpp
@@ -92,7 +92,7 @@ void CollisionPolygonEditor::_menu_option(int p_option) {
void CollisionPolygonEditor::_wip_close() {
- undo_redo->create_action("Create Poly3D");
+ undo_redo->create_action(TTR("Create Poly3D"));
undo_redo->add_undo_method(node,"set_polygon",node->get_polygon());
undo_redo->add_do_method(node,"set_polygon",wip);
undo_redo->add_do_method(this,"_polygon_draw");
@@ -200,7 +200,7 @@ bool CollisionPolygonEditor::forward_spatial_input_event(Camera* p_camera,const
if (poly.size() < 3) {
- undo_redo->create_action("Edit Poly");
+ undo_redo->create_action(TTR("Edit Poly"));
undo_redo->add_undo_method(node,"set_polygon",poly);
poly.push_back(cpoint);
undo_redo->add_do_method(node,"set_polygon",poly);
@@ -282,7 +282,7 @@ bool CollisionPolygonEditor::forward_spatial_input_event(Camera* p_camera,const
ERR_FAIL_INDEX_V(edited_point,poly.size(),false);
poly[edited_point]=edited_point_pos;
- undo_redo->create_action("Edit Poly");
+ undo_redo->create_action(TTR("Edit Poly"));
undo_redo->add_do_method(node,"set_polygon",poly);
undo_redo->add_undo_method(node,"set_polygon",pre_move_edit);
undo_redo->add_do_method(this,"_polygon_draw");
@@ -316,7 +316,7 @@ bool CollisionPolygonEditor::forward_spatial_input_event(Camera* p_camera,const
if (closest_idx>=0) {
- undo_redo->create_action("Edit Poly (Remove Point)");
+ undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
undo_redo->add_undo_method(node,"set_polygon",poly);
poly.remove(closest_idx);
undo_redo->add_do_method(node,"set_polygon",poly);
@@ -559,8 +559,8 @@ CollisionPolygonEditor::CollisionPolygonEditor(EditorNode *p_editor) {
options = memnew( MenuButton );
add_child(options);
options->set_area_as_parent_rect();
- options->set_text("Polygon");
- //options->get_popup()->add_item("Parse BBCODE",PARSE_BBCODE);
+ options->set_text(TTR("Polygon"));
+ //options->get_popup()->add_item(TTR("Parse BBCODE"),PARSE_BBCODE);
options->get_popup()->connect("item_pressed", this,"_menu_option");
#endif
diff --git a/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp b/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp
index 1916d55ee1..296362447f 100644
--- a/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -180,7 +180,7 @@ void CollisionShape2DEditor::set_handle(int idx, Point2& p_point) {
void CollisionShape2DEditor::commit_handle(int idx, Variant& p_org) {
Control* c = canvas_item_editor->get_viewport_control();
- undo_redo->create_action("Set Handle");
+ undo_redo->create_action(TTR("Set Handle"));
switch ( shape_type ) {
case CAPSULE_SHAPE: {
diff --git a/tools/editor/plugins/color_ramp_editor_plugin.cpp b/tools/editor/plugins/color_ramp_editor_plugin.cpp
index 133775115d..854a0149a5 100644
--- a/tools/editor/plugins/color_ramp_editor_plugin.cpp
+++ b/tools/editor/plugins/color_ramp_editor_plugin.cpp
@@ -63,9 +63,9 @@ void ColorRampEditorPlugin::_ramp_changed() {
Vector<Color> old_colors=color_ramp_ref->get_colors();
if (old_offsets.size()!=new_offsets.size())
- ur->create_action("Add/Remove Color Ramp Point");
+ ur->create_action(TTR("Add/Remove Color Ramp Point"));
else
- ur->create_action("Modify Color Ramp",true);
+ ur->create_action(TTR("Modify Color Ramp"),true);
ur->add_do_method(this,"undo_redo_color_ramp",new_offsets,new_colors);
ur->add_undo_method(this,"undo_redo_color_ramp",old_offsets,old_colors);
ur->commit_action();
diff --git a/tools/editor/plugins/control_editor_plugin.cpp b/tools/editor/plugins/control_editor_plugin.cpp
index 9dff5e6ce4..0958343f2c 100644
--- a/tools/editor/plugins/control_editor_plugin.cpp
+++ b/tools/editor/plugins/control_editor_plugin.cpp
@@ -112,7 +112,7 @@ void ControlEditor::_key_move(const Vector2& p_dir, bool p_snap) {
if (p_snap)
motion*=snap_val->get_text().to_double();
- undo_redo->create_action("Edit Control");
+ undo_redo->create_action(TTR("Edit Control"));
for(ControlMap::Element *E=controls.front();E;E=E->next()) {
Control *control = E->key();
undo_redo->add_do_method(control,"set_pos",control->get_pos()+motion);
@@ -156,7 +156,7 @@ void ControlEditor::_input_event(InputEvent p_event) {
if (undo_redo) {
- undo_redo->create_action("Edit Control");
+ undo_redo->create_action(TTR("Edit Control"));
for(ControlMap::Element *E=controls.front();E;E=E->next()) {
Control *control = E->key();
undo_redo->add_do_method(control,"set_pos",control->get_pos());
@@ -752,17 +752,17 @@ ControlEditor::ControlEditor(EditorNode *p_editor) {
handle_len=10;
popup=memnew( PopupMenu );
- popup->add_check_item("Use Snap");
- popup->add_item("Configure Snap..");
+ popup->add_check_item(TTR("Use Snap"));
+ popup->add_item(TTR("Configure Snap.."));
add_child(popup);
snap_dialog = memnew( ConfirmationDialog );
snap_dialog->get_ok()->hide();
- snap_dialog->get_cancel()->set_text("Close");
+ snap_dialog->get_cancel()->set_text(TTR("Close"));
add_child(snap_dialog);
Label *l = memnew(Label);
- l->set_text("Snap:");
+ l->set_text(TTR("Snap:"));
l->set_pos(Point2(5,5));
snap_dialog->add_child(l);
diff --git a/tools/editor/plugins/control_editor_plugin.h b/tools/editor/plugins/control_editor_plugin.h
index 6234698ee8..67db981c0d 100644
--- a/tools/editor/plugins/control_editor_plugin.h
+++ b/tools/editor/plugins/control_editor_plugin.h
@@ -125,7 +125,7 @@ class ControlEditorPlugin : public EditorPlugin {
public:
- virtual String get_name() const { return "GUI"; }
+ virtual String get_name() const { return TTR("GUI"); }
bool has_main_screen() const { return true; }
virtual void edit(Object *p_object);
virtual bool handles(Object *p_object) const;
diff --git a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp
index 4d6ea5dfb0..3c9f1886b7 100644
--- a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp
+++ b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp
@@ -165,7 +165,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
VS::get_singleton()->camera_set_orthogonal(cam,1.0,0.01,1000.0);
- EditorProgress ep("mlib","Creating Mesh Library",ids.size());
+ EditorProgress ep("mlib",TTR("Creating Mesh Library"),ids.size());
for(int i=0;i<ids.size();i++) {
@@ -193,7 +193,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
xform.origin.z-=rot_aabb.size.z*2;
RID inst = VS::get_singleton()->instance_create2(mesh->get_rid(),scen);
VS::get_singleton()->instance_set_transform(inst,xform);
- ep.step("Thumbnail..",i);
+ ep.step(TTR("Thumbnail.."),i);
VS::get_singleton()->viewport_queue_screen_capture(vp);
Main::iteration();
Image img = VS::get_singleton()->viewport_get_screen_capture(vp);
@@ -220,7 +220,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
void MeshLibraryEditor::_import_scene_cbk(const String& p_str) {
- print_line("Impot Callback!");
+ print_line(TTR("Impot Callback!"));
Ref<PackedScene> ps = ResourceLoader::load(p_str,"PackedScene");
ERR_FAIL_COND(ps.is_null());
@@ -256,7 +256,7 @@ void MeshLibraryEditor::_menu_cbk(int p_option) {
if (p.begins_with("/MeshLibrary/item") && p.get_slice_count("/")>=3) {
to_erase = p.get_slice("/",3).to_int();
- cd->set_text("Remove Item "+itos(to_erase)+"?");
+ cd->set_text(TTR("Remove Item ")+itos(to_erase)+"?");
cd->popup_centered(Size2(300,60));
}
} break;
@@ -288,7 +288,7 @@ MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) {
List<String> extensions;
ResourceLoader::get_recognized_extensions_for_type("PackedScene",&extensions);
file->clear_filters();
- file->set_title("Import Scene");
+ file->set_title(TTR("Import Scene"));
for(int i=0;i<extensions.size();i++) {
file->add_filter("*."+extensions[i]+" ; "+extensions[i].to_upper());
@@ -303,11 +303,11 @@ MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) {
panel->add_child(options);
options->set_pos(Point2(1,1));
options->set_text("Theme");
- options->get_popup()->add_item("Add Item",MENU_OPTION_ADD_ITEM);
- options->get_popup()->add_item("Remove Selected Item",MENU_OPTION_REMOVE_ITEM);
+ options->get_popup()->add_item(TTR("Add Item"),MENU_OPTION_ADD_ITEM);
+ options->get_popup()->add_item(TTR("Remove Selected Item"),MENU_OPTION_REMOVE_ITEM);
options->get_popup()->add_separator();
- options->get_popup()->add_item("Import from Scene",MENU_OPTION_IMPORT_FROM_SCENE);
- options->get_popup()->add_item("Update from Scene",MENU_OPTION_UPDATE_FROM_SCENE);
+ options->get_popup()->add_item(TTR("Import from Scene"),MENU_OPTION_IMPORT_FROM_SCENE);
+ options->get_popup()->add_item(TTR("Update from Scene"),MENU_OPTION_UPDATE_FROM_SCENE);
options->get_popup()->set_item_disabled(options->get_popup()->get_item_index(MENU_OPTION_UPDATE_FROM_SCENE),true);
options->get_popup()->connect("item_pressed", this,"_menu_cbk");
menu=options;
diff --git a/tools/editor/plugins/item_list_editor_plugin.cpp b/tools/editor/plugins/item_list_editor_plugin.cpp
index 08af1a0643..9f47d26492 100644
--- a/tools/editor/plugins/item_list_editor_plugin.cpp
+++ b/tools/editor/plugins/item_list_editor_plugin.cpp
@@ -129,7 +129,7 @@ int ItemListOptionButtonPlugin::get_flags() const {
void ItemListOptionButtonPlugin::add_item() {
- ob->add_item( "Item "+itos(ob->get_item_count()));
+ ob->add_item( TTR("Item ")+itos(ob->get_item_count()));
_change_notify();
}
@@ -171,7 +171,7 @@ int ItemListPopupMenuPlugin::get_flags() const {
void ItemListPopupMenuPlugin::add_item() {
- pp->add_item( "Item "+itos(pp->get_item_count()));
+ pp->add_item( TTR("Item ")+itos(pp->get_item_count()));
_change_notify();
}
@@ -299,12 +299,12 @@ ItemListEditor::ItemListEditor() {
add_child( memnew( VSeparator ) );
toolbar_button = memnew( ToolButton );
- toolbar_button->set_text("Items");
+ toolbar_button->set_text(TTR("Items"));
add_child(toolbar_button);
toolbar_button->connect("pressed",this,"_edit_items");
dialog = memnew( AcceptDialog );
- dialog->set_title("Item List Editor");
+ dialog->set_title(TTR("Item List Editor"));
add_child( dialog );
VBoxContainer *vbc = memnew( VBoxContainer );
@@ -316,14 +316,14 @@ ItemListEditor::ItemListEditor() {
vbc->add_child(hbc);
add_button = memnew( Button );
- add_button->set_text("Add");
+ add_button->set_text(TTR("Add"));
hbc->add_child(add_button);
add_button->connect("pressed",this,"_add_button");
hbc->add_spacer();
del_button = memnew( Button );
- del_button->set_text("Delete");
+ del_button->set_text(TTR("Delete"));
hbc->add_child(del_button);
del_button->connect("pressed",this,"_delete_button");
diff --git a/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp b/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp
index 757b5327dd..fe031d1657 100644
--- a/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp
@@ -57,7 +57,7 @@ void LightOccluder2DEditor::_menu_option(int p_option) {
void LightOccluder2DEditor::_wip_close(bool p_closed) {
- undo_redo->create_action("Create Poly");
+ undo_redo->create_action(TTR("Create Poly"));
undo_redo->add_undo_method(node->get_occluder_polygon().ptr(),"set_polygon",node->get_occluder_polygon()->get_polygon());
undo_redo->add_do_method(node->get_occluder_polygon().ptr(),"set_polygon",wip);
undo_redo->add_undo_method(node->get_occluder_polygon().ptr(),"set_closed",node->get_occluder_polygon()->is_closed());
@@ -164,7 +164,7 @@ bool LightOccluder2DEditor::forward_input_event(const InputEvent& p_event) {
if (poly.size() < 3) {
- undo_redo->create_action("Edit Poly");
+ undo_redo->create_action(TTR("Edit Poly"));
undo_redo->add_undo_method(node->get_occluder_polygon().ptr(),"set_polygon",poly);
poly.push_back(cpoint);
undo_redo->add_do_method(node->get_occluder_polygon().ptr(),"set_polygon",poly);
@@ -244,7 +244,7 @@ bool LightOccluder2DEditor::forward_input_event(const InputEvent& p_event) {
ERR_FAIL_INDEX_V(edited_point,poly.size(),false);
poly[edited_point]=edited_point_pos;
- undo_redo->create_action("Edit Poly");
+ undo_redo->create_action(TTR("Edit Poly"));
undo_redo->add_do_method(node->get_occluder_polygon().ptr(),"set_polygon",poly);
undo_redo->add_undo_method(node->get_occluder_polygon().ptr(),"set_polygon",pre_move_edit);
undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
@@ -278,7 +278,7 @@ bool LightOccluder2DEditor::forward_input_event(const InputEvent& p_event) {
if (closest_idx>=0) {
- undo_redo->create_action("Edit Poly (Remove Point)");
+ undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
undo_redo->add_undo_method(node->get_occluder_polygon().ptr(),"set_polygon",poly);
poly.remove(closest_idx);
undo_redo->add_do_method(node->get_occluder_polygon().ptr(),"set_polygon",poly);
@@ -393,7 +393,7 @@ void LightOccluder2DEditor::_create_poly() {
if (!node)
return;
- undo_redo->create_action("Create Occluder Polygon");
+ undo_redo->create_action(TTR("Create Occluder Polygon"));
undo_redo->add_do_method(node,"set_occluder_polygon",Ref<OccluderPolygon2D>(memnew( OccluderPolygon2D)));
undo_redo->add_undo_method(node,"set_occluder_polygon",Variant(REF()));
undo_redo->commit_action();
@@ -421,7 +421,7 @@ LightOccluder2DEditor::LightOccluder2DEditor(EditorNode *p_editor) {
add_child(button_create);
button_create->connect("pressed",this,"_menu_option",varray(MODE_CREATE));
button_create->set_toggle_mode(true);
- button_create->set_tooltip("Create a new polygon from scratch");
+ button_create->set_tooltip(TTR("Create a new polygon from scratch"));
button_edit = memnew( ToolButton );
add_child(button_edit);
@@ -431,7 +431,7 @@ LightOccluder2DEditor::LightOccluder2DEditor(EditorNode *p_editor) {
create_poly = memnew( ConfirmationDialog );
add_child(create_poly);
- create_poly->get_ok()->set_text("Create");
+ create_poly->get_ok()->set_text(TTR("Create"));
//add_constant_override("separation",0);
@@ -440,8 +440,8 @@ LightOccluder2DEditor::LightOccluder2DEditor(EditorNode *p_editor) {
options = memnew( MenuButton );
add_child(options);
options->set_area_as_parent_rect();
- options->set_text("Polygon");
- //options->get_popup()->add_item("Parse BBCODE",PARSE_BBCODE);
+ options->set_text(TTR("Polygon"));
+ //options->get_popup()->add_item(TTR("Parse BBCODE"),PARSE_BBCODE);
options->get_popup()->connect("item_pressed", this,"_menu_option");
#endif
diff --git a/tools/editor/plugins/mesh_editor_plugin.cpp b/tools/editor/plugins/mesh_editor_plugin.cpp
index 5314529a23..8671734c25 100644
--- a/tools/editor/plugins/mesh_editor_plugin.cpp
+++ b/tools/editor/plugins/mesh_editor_plugin.cpp
@@ -27,7 +27,7 @@ void MeshInstanceEditor::_menu_option(int p_option) {
Ref<Mesh> mesh = node->get_mesh();
if (mesh.is_null()) {
- err_dialog->set_text("Mesh is empty!");
+ err_dialog->set_text(TTR("Mesh is empty!"));
err_dialog->popup_centered_minsize();
return;
}
@@ -56,9 +56,9 @@ void MeshInstanceEditor::_menu_option(int p_option) {
Node *owner = node==get_tree()->get_edited_scene_root() ? node : node->get_owner();
if (trimesh_shape)
- ur->create_action("Create Static Trimesh Body");
+ ur->create_action(TTR("Create Static Trimesh Body"));
else
- ur->create_action("Create Static Convex Body");
+ ur->create_action(TTR("Create Static Convex Body"));
ur->add_do_method(node,"add_child",body);
ur->add_do_method(body,"set_owner",owner);
@@ -70,9 +70,9 @@ void MeshInstanceEditor::_menu_option(int p_option) {
}
if (trimesh_shape)
- ur->create_action("Create Static Trimesh Body");
+ ur->create_action(TTR("Create Static Trimesh Body"));
else
- ur->create_action("Create Static Convex Body");
+ ur->create_action(TTR("Create Static Convex Body"));
for (List<Node*>::Element *E=selection.front();E;E=E->next()) {
@@ -110,7 +110,7 @@ void MeshInstanceEditor::_menu_option(int p_option) {
case MENU_OPTION_CREATE_CONVEX_COLLISION_SHAPE: {
if (node==get_tree()->get_edited_scene_root()) {
- err_dialog->set_text("This doesn't work on scene root!");
+ err_dialog->set_text(TTR("This doesn't work on scene root!"));
err_dialog->popup_centered_minsize();
return;
}
@@ -129,9 +129,9 @@ void MeshInstanceEditor::_menu_option(int p_option) {
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
if (trimesh_shape)
- ur->create_action("Create Trimesh Shape");
+ ur->create_action(TTR("Create Trimesh Shape"));
else
- ur->create_action("Create Convex Shape");
+ ur->create_action(TTR("Create Convex Shape"));
ur->add_do_method(node->get_parent(),"add_child",cshape);
ur->add_do_method(node->get_parent(),"move_child",cshape,node->get_index()+1);
@@ -156,7 +156,7 @@ void MeshInstanceEditor::_menu_option(int p_option) {
Node *owner = node==get_tree()->get_edited_scene_root() ? node : node->get_owner();
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Create Navigation Mesh");
+ ur->create_action(TTR("Create Navigation Mesh"));
ur->add_do_method(node,"add_child",nmi);
ur->add_do_method(nmi,"set_owner",owner);
@@ -178,7 +178,7 @@ void MeshInstanceEditor::_create_outline_mesh() {
Ref<Mesh> mesh = node->get_mesh();
if (mesh.is_null()) {
- err_dialog->set_text("MeshInstance lacks a Mesh!");
+ err_dialog->set_text(TTR("MeshInstance lacks a Mesh!"));
err_dialog->popup_centered_minsize();
return;
}
@@ -186,7 +186,7 @@ void MeshInstanceEditor::_create_outline_mesh() {
Ref<Mesh> mesho = mesh->create_outline(outline_size->get_val());
if (mesho.is_null()) {
- err_dialog->set_text("Could not create outline!");
+ err_dialog->set_text(TTR("Could not create outline!"));
err_dialog->popup_centered_minsize();
return;
}
@@ -200,7 +200,7 @@ void MeshInstanceEditor::_create_outline_mesh() {
UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Create Outline");
+ ur->create_action(TTR("Create Outline"));
ur->add_do_method(node,"add_child",mi);
ur->add_do_method(mi,"set_owner",owner);
@@ -225,21 +225,21 @@ MeshInstanceEditor::MeshInstanceEditor() {
options->set_text("Mesh");
options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("MeshInstance","EditorIcons"));
- options->get_popup()->add_item("Create Trimesh Static Body",MENU_OPTION_CREATE_STATIC_TRIMESH_BODY);
- options->get_popup()->add_item("Create Convex Static Body",MENU_OPTION_CREATE_STATIC_CONVEX_BODY);
+ options->get_popup()->add_item(TTR("Create Trimesh Static Body"),MENU_OPTION_CREATE_STATIC_TRIMESH_BODY);
+ options->get_popup()->add_item(TTR("Create Convex Static Body"),MENU_OPTION_CREATE_STATIC_CONVEX_BODY);
options->get_popup()->add_separator();
- options->get_popup()->add_item("Create Trimesh Collision Sibling",MENU_OPTION_CREATE_TRIMESH_COLLISION_SHAPE);
- options->get_popup()->add_item("Create Convex Collision Sibling",MENU_OPTION_CREATE_CONVEX_COLLISION_SHAPE);
+ options->get_popup()->add_item(TTR("Create Trimesh Collision Sibling"),MENU_OPTION_CREATE_TRIMESH_COLLISION_SHAPE);
+ options->get_popup()->add_item(TTR("Create Convex Collision Sibling"),MENU_OPTION_CREATE_CONVEX_COLLISION_SHAPE);
options->get_popup()->add_separator();
- options->get_popup()->add_item("Create Navigation Mesh",MENU_OPTION_CREATE_NAVMESH);
+ options->get_popup()->add_item(TTR("Create Navigation Mesh"),MENU_OPTION_CREATE_NAVMESH);
options->get_popup()->add_separator();
- options->get_popup()->add_item("Create Outline Mesh..",MENU_OPTION_CREATE_OUTLINE_MESH);
+ options->get_popup()->add_item(TTR("Create Outline Mesh.."),MENU_OPTION_CREATE_OUTLINE_MESH);
options->get_popup()->connect("item_pressed", this,"_menu_option");
outline_dialog = memnew( ConfirmationDialog );
- outline_dialog->set_title("Create Outline Mesh");
- outline_dialog->get_ok()->set_text("Create");
+ outline_dialog->set_title(TTR("Create Outline Mesh"));
+ outline_dialog->get_ok()->set_text(TTR("Create"));
VBoxContainer *outline_dialog_vbc = memnew( VBoxContainer );
outline_dialog->add_child(outline_dialog_vbc);
@@ -250,7 +250,7 @@ MeshInstanceEditor::MeshInstanceEditor() {
outline_size->set_max(1024);
outline_size->set_step(0.001);
outline_size->set_val(0.05);
- outline_dialog_vbc->add_margin_child("Outline Size:",outline_size);
+ outline_dialog_vbc->add_margin_child(TTR("Outline Size:"),outline_size);
add_child(outline_dialog);
outline_dialog->connect("confirmed",this,"_create_outline_mesh");
diff --git a/tools/editor/plugins/multimesh_editor_plugin.cpp b/tools/editor/plugins/multimesh_editor_plugin.cpp
index 15df9a6262..e22dfb3d13 100644
--- a/tools/editor/plugins/multimesh_editor_plugin.cpp
+++ b/tools/editor/plugins/multimesh_editor_plugin.cpp
@@ -55,13 +55,13 @@ void MultiMeshEditor::_populate() {
multimesh = node->get_multimesh();
if (multimesh.is_null()) {
- err_dialog->set_text("No mesh source specified (and no MultiMesh set in node).");
+ err_dialog->set_text(TTR("No mesh source specified (and no MultiMesh set in node)."));
err_dialog->popup_centered_minsize();
return;
}
if (multimesh->get_mesh().is_null()) {
- err_dialog->set_text("No mesh source specified (and MultiMesh contains no Mesh).");
+ err_dialog->set_text(TTR("No mesh source specified (and MultiMesh contains no Mesh)."));
err_dialog->popup_centered_minsize();
return;
}
@@ -73,7 +73,7 @@ void MultiMeshEditor::_populate() {
if (!ms_node) {
- err_dialog->set_text("Mesh source is invalid (Invalid Path).");
+ err_dialog->set_text(TTR("Mesh source is invalid (Invalid Path)."));
err_dialog->popup_centered_minsize();
return;
}
@@ -82,7 +82,7 @@ void MultiMeshEditor::_populate() {
if (!ms_instance) {
- err_dialog->set_text("Mesh source is invalid (Not a MeshInstance).");
+ err_dialog->set_text(TTR("Mesh source is invalid (Not a MeshInstance)."));
err_dialog->popup_centered_minsize();
return;
}
@@ -91,7 +91,7 @@ void MultiMeshEditor::_populate() {
if (mesh.is_null()) {
- err_dialog->set_text("Mesh source is invalid (Contains no Mesh resource).");
+ err_dialog->set_text(TTR("Mesh source is invalid (Contains no Mesh resource)."));
err_dialog->popup_centered_minsize();
return;
}
@@ -100,7 +100,7 @@ void MultiMeshEditor::_populate() {
if (surface_source->get_text()=="") {
- err_dialog->set_text("No surface source specified.");
+ err_dialog->set_text(TTR("No surface source specified."));
err_dialog->popup_centered_minsize();
return;
}
@@ -109,7 +109,7 @@ void MultiMeshEditor::_populate() {
if (!ss_node) {
- err_dialog->set_text("Surface source is invalid (Invalid Path).");
+ err_dialog->set_text(TTR("Surface source is invalid (Invalid Path)."));
err_dialog->popup_centered_minsize();
return;
}
@@ -118,7 +118,7 @@ void MultiMeshEditor::_populate() {
if (!ss_instance) {
- err_dialog->set_text("Surface source is invalid (Not Geometry).");
+ err_dialog->set_text(TTR("Surface source is invalid (Not Geometry)."));
err_dialog->popup_centered_minsize();
return;
}
@@ -129,7 +129,7 @@ void MultiMeshEditor::_populate() {
if (geometry.size()==0) {
- err_dialog->set_text("Surface source is invalid (No Faces).");
+ err_dialog->set_text(TTR("Surface source is invalid (No Faces)."));
err_dialog->popup_centered_minsize();
return;
}
@@ -153,10 +153,10 @@ void MultiMeshEditor::_populate() {
node->populate_parent(populate_rotate_random->get_val(),populate_tilt_random->get_val(),populate_scale_random->get_val(),populate_scale->get_val());
- ERR_EXPLAIN("Parent is not of type VisualInstance.");
+ ERR_EXPLAIN(TTR("Parent is not of type VisualInstance."));
ERR_FAIL_COND(!get_parent() || !get_parent()->is_type("VisualInstance"));
- ERR_EXPLAIN("Multimesh not present");
+ ERR_EXPLAIN(TTR("Multimesh not present"));
ERR_FAIL_COND(multimesh.is_null());
VisualInstance *vi = get_parent()->cast_to<VisualInstance>();
@@ -165,7 +165,7 @@ void MultiMeshEditor::_populate() {
#endif
DVector<Face3> faces = geometry;
- ERR_EXPLAIN("Parent has no solid faces to populate.");
+ ERR_EXPLAIN(TTR("Parent has no solid faces to populate."));
int facecount=faces.size();
ERR_FAIL_COND(!facecount);
@@ -184,9 +184,9 @@ void MultiMeshEditor::_populate() {
area_accum+=area;
}
- ERR_EXPLAIN("Couldn't map area");
+ ERR_EXPLAIN(TTR("Couldn't map area"));
ERR_FAIL_COND(triangle_area_map.size()==0);
- ERR_EXPLAIN("Couldn't map area");
+ ERR_EXPLAIN(TTR("Couldn't map area"));
ERR_FAIL_COND(area_accum==0);
@@ -308,9 +308,9 @@ void MultiMeshEditor::_browse(bool p_source) {
std->get_scene_tree()->set_marked(node,false);
std->popup_centered_ratio();
if (p_source)
- std->set_title("Select a Source Mesh:");
+ std->set_title(TTR("Select a Source Mesh:"));
else
- std->set_title("Select a Target Surface:");
+ std->set_title(TTR("Select a Target Surface:"));
}
void MultiMeshEditor::_bind_methods() {
@@ -330,11 +330,11 @@ MultiMeshEditor::MultiMeshEditor() {
options->set_text("MultiMesh");
options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("MultiMeshInstance","EditorIcons"));
- options->get_popup()->add_item("Populate Surface");
+ options->get_popup()->add_item(TTR("Populate Surface"));
options->get_popup()->connect("item_pressed", this,"_menu_option");
populate_dialog = memnew( ConfirmationDialog );
- populate_dialog->set_title("Populate MultiMesh");
+ populate_dialog->set_title(TTR("Populate MultiMesh"));
add_child(populate_dialog);
VBoxContainer *vbc = memnew( VBoxContainer );
@@ -351,7 +351,7 @@ MultiMeshEditor::MultiMeshEditor() {
b->set_text("..");
b->connect("pressed",this,"_browse",make_binds(false));
- vbc->add_margin_child("Target Surface:",hbc);
+ vbc->add_margin_child(TTR("Target Surface:"),hbc);
hbc = memnew( HBoxContainer );
mesh_source = memnew( LineEdit );
@@ -360,26 +360,26 @@ MultiMeshEditor::MultiMeshEditor() {
b = memnew( Button );
hbc->add_child(b);
b->set_text("..");
- vbc->add_margin_child("Source Mesh:",hbc);
+ vbc->add_margin_child(TTR("Source Mesh:"),hbc);
b->connect("pressed",this,"_browse",make_binds(true));
populate_axis = memnew( OptionButton );
- populate_axis->add_item("X-Axis");
- populate_axis->add_item("Y-Axis");
- populate_axis->add_item("Z-Axis");
+ populate_axis->add_item(TTR("X-Axis"));
+ populate_axis->add_item(TTR("Y-Axis"));
+ populate_axis->add_item(TTR("Z-Axis"));
populate_axis->select(2);
- vbc->add_margin_child("Mesh Up Axis:",populate_axis);
+ vbc->add_margin_child(TTR("Mesh Up Axis:"),populate_axis);
populate_rotate_random = memnew( HSlider );
populate_rotate_random->set_max(1);
populate_rotate_random->set_step(0.01);
- vbc->add_margin_child("Random Rotation:",populate_rotate_random);
+ vbc->add_margin_child(TTR("Random Rotation:"),populate_rotate_random);
populate_tilt_random = memnew( HSlider );
populate_tilt_random->set_max(1);
populate_tilt_random->set_step(0.01);
- vbc->add_margin_child("Random Tilt:",populate_tilt_random);
+ vbc->add_margin_child(TTR("Random Tilt:"),populate_tilt_random);
populate_scale_random = memnew( SpinBox );
@@ -387,14 +387,14 @@ MultiMeshEditor::MultiMeshEditor() {
populate_scale_random->set_max(1);
populate_scale_random->set_val(0);
- vbc->add_margin_child("Random Scale:",populate_scale_random);
+ vbc->add_margin_child(TTR("Random Scale:"),populate_scale_random);
populate_scale = memnew( SpinBox );
populate_scale->set_min(0.001);
populate_scale->set_max(4096);
populate_scale->set_val(1);
- vbc->add_margin_child("Scale:",populate_scale);
+ vbc->add_margin_child(TTR("Scale:"),populate_scale);
populate_amount = memnew( SpinBox );
@@ -404,9 +404,9 @@ MultiMeshEditor::MultiMeshEditor() {
populate_amount->set_min(1);
populate_amount->set_max(65536);
populate_amount->set_val(128);
- vbc->add_margin_child("Amount:",populate_amount);
+ vbc->add_margin_child(TTR("Amount:"),populate_amount);
- populate_dialog->get_ok()->set_text("Populate");
+ populate_dialog->get_ok()->set_text(TTR("Populate"));
populate_dialog->get_ok()->connect("pressed", this,"_populate");
std = memnew( SceneTreeDialog );
diff --git a/tools/editor/plugins/navigation_polygon_editor_plugin.cpp b/tools/editor/plugins/navigation_polygon_editor_plugin.cpp
index fa1f614413..038c1d48a7 100644
--- a/tools/editor/plugins/navigation_polygon_editor_plugin.cpp
+++ b/tools/editor/plugins/navigation_polygon_editor_plugin.cpp
@@ -39,7 +39,7 @@ void NavigationPolygonEditor::_create_nav() {
if (!node)
return;
- undo_redo->create_action("Create Navigation Polygon");
+ undo_redo->create_action(TTR("Create Navigation Polygon"));
undo_redo->add_do_method(node,"set_navigation_polygon",Ref<NavigationPolygon>(memnew( NavigationPolygon)));
undo_redo->add_undo_method(node,"set_navigation_polygon",Variant(REF()));
undo_redo->commit_action();
@@ -70,7 +70,7 @@ void NavigationPolygonEditor::_wip_close() {
if (wip.size()>=3) {
- undo_redo->create_action("Create Poly");
+ undo_redo->create_action(TTR("Create Poly"));
undo_redo->add_undo_method(node->get_navigation_polygon().ptr(),"remove_outline",node->get_navigation_polygon()->get_outline_count());
undo_redo->add_do_method(node->get_navigation_polygon().ptr(),"add_outline",wip);
undo_redo->add_do_method(node->get_navigation_polygon().ptr(),"make_polygons_from_outlines");
@@ -271,7 +271,7 @@ bool NavigationPolygonEditor::forward_input_event(const InputEvent& p_event) {
DVector<Vector2> poly = node->get_navigation_polygon()->get_outline(edited_outline);
ERR_FAIL_INDEX_V(edited_point,poly.size(),false);
poly.set(edited_point,edited_point_pos);
- undo_redo->create_action("Edit Poly");
+ undo_redo->create_action(TTR("Edit Poly"));
undo_redo->add_do_method(node->get_navigation_polygon().ptr(),"set_outline",edited_outline,poly);
undo_redo->add_undo_method(node->get_navigation_polygon().ptr(),"set_outline",edited_outline,pre_move_edit);
undo_redo->add_do_method(node->get_navigation_polygon().ptr(),"make_polygons_from_outlines");
@@ -320,7 +320,7 @@ bool NavigationPolygonEditor::forward_input_event(const InputEvent& p_event) {
DVector<Vector2> poly = node->get_navigation_polygon()->get_outline(closest_outline);
if (poly.size()>3) {
- undo_redo->create_action("Edit Poly (Remove Point)");
+ undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
undo_redo->add_undo_method(node->get_navigation_polygon().ptr(),"set_outline",closest_outline,poly);
poly.remove(closest_idx);
undo_redo->add_do_method(node->get_navigation_polygon().ptr(),"set_outline",closest_outline,poly);
@@ -331,7 +331,7 @@ bool NavigationPolygonEditor::forward_input_event(const InputEvent& p_event) {
undo_redo->commit_action();
} else {
- undo_redo->create_action("Remove Poly And Point");
+ undo_redo->create_action(TTR("Remove Poly And Point"));
undo_redo->add_undo_method(node->get_navigation_polygon().ptr(),"add_outline_at_index",poly,closest_outline);
poly.remove(closest_idx);
undo_redo->add_do_method(node->get_navigation_polygon().ptr(),"remove_outline",closest_outline);
@@ -469,7 +469,7 @@ NavigationPolygonEditor::NavigationPolygonEditor(EditorNode *p_editor) {
add_child(button_create);
button_create->connect("pressed",this,"_menu_option",varray(MODE_CREATE));
button_create->set_toggle_mode(true);
- button_create->set_tooltip("Create a new polygon from scratch");
+ button_create->set_tooltip(TTR("Create a new polygon from scratch"));
button_edit = memnew( ToolButton );
add_child(button_edit);
@@ -478,7 +478,7 @@ NavigationPolygonEditor::NavigationPolygonEditor(EditorNode *p_editor) {
button_edit->set_tooltip("Edit existing polygon:\nLMB: Move Point.\nCtrl+LMB: Split Segment.\nRMB: Erase Point.");
create_nav = memnew( ConfirmationDialog );
add_child(create_nav);
- create_nav->get_ok()->set_text("Create");
+ create_nav->get_ok()->set_text(TTR("Create"));
//add_constant_override("separation",0);
@@ -487,8 +487,8 @@ NavigationPolygonEditor::NavigationPolygonEditor(EditorNode *p_editor) {
options = memnew( MenuButton );
add_child(options);
options->set_area_as_parent_rect();
- options->set_text("Polygon");
- //options->get_popup()->add_item("Parse BBCODE",PARSE_BBCODE);
+ options->set_text(TTR("Polygon"));
+ //options->get_popup()->add_item(TTR("Parse BBCODE"),PARSE_BBCODE);
options->get_popup()->connect("item_pressed", this,"_menu_option");
#endif
diff --git a/tools/editor/plugins/particles_2d_editor_plugin.cpp b/tools/editor/plugins/particles_2d_editor_plugin.cpp
index 297145f408..8892950feb 100644
--- a/tools/editor/plugins/particles_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/particles_2d_editor_plugin.cpp
@@ -66,7 +66,7 @@ void Particles2DEditorPlugin::_file_selected(const String& p_file) {
Image img;
Error err = ImageLoader::load_image(p_file,&img);
- ERR_EXPLAIN("Error loading image: "+p_file);
+ ERR_EXPLAIN(TTR("Error loading image: ")+p_file);
ERR_FAIL_COND(err!=OK);
img.convert(Image::FORMAT_GRAYSCALE_ALPHA);
@@ -92,7 +92,7 @@ void Particles2DEditorPlugin::_file_selected(const String& p_file) {
valid_positions.resize(vpc);
- ERR_EXPLAIN("No pixels with transparency > 128 in image..");
+ ERR_EXPLAIN(TTR("No pixels with transparency > 128 in image.."));
ERR_FAIL_COND(valid_positions.size()==0);
DVector<Point2> epoints;
@@ -110,7 +110,7 @@ void Particles2DEditorPlugin::_file_selected(const String& p_file) {
w = DVector<Point2>::Write();
- undo_redo->create_action("Set Emission Mask");
+ undo_redo->create_action(TTR("Set Emission Mask"));
undo_redo->add_do_method(particles,"set_emission_points",epoints);
undo_redo->add_do_method(particles,"set_emission_half_extents",extents);
undo_redo->add_undo_method(particles,"set_emission_points",particles->get_emission_points());
@@ -130,7 +130,7 @@ void Particles2DEditorPlugin::_menu_callback(int p_idx) {
} break;
case MENU_CLEAR_EMISSION_MASK: {
- undo_redo->create_action("Clear Emission Mask");
+ undo_redo->create_action(TTR("Clear Emission Mask"));
undo_redo->add_do_method(particles,"set_emission_points",DVector<Vector2>());
undo_redo->add_undo_method(particles,"set_emission_points",particles->get_emission_points());
undo_redo->commit_action();
@@ -171,8 +171,8 @@ Particles2DEditorPlugin::Particles2DEditorPlugin(EditorNode *p_node) {
toolbar->add_child( memnew( VSeparator ) );
menu = memnew( MenuButton );
- menu->get_popup()->add_item("Load Emission Mask",MENU_LOAD_EMISSION_MASK);
- menu->get_popup()->add_item("Clear Emission Mask",MENU_CLEAR_EMISSION_MASK);
+ menu->get_popup()->add_item(TTR("Load Emission Mask"),MENU_LOAD_EMISSION_MASK);
+ menu->get_popup()->add_item(TTR("Clear Emission Mask"),MENU_CLEAR_EMISSION_MASK);
menu->set_text("Particles");
toolbar->add_child(menu);
@@ -190,7 +190,7 @@ Particles2DEditorPlugin::Particles2DEditorPlugin(EditorNode *p_node) {
epoints->set_max(8192);
epoints->set_step(1);
epoints->set_val(512);
- file->get_vbox()->add_margin_child("Generated Point Count:",epoints);
+ file->get_vbox()->add_margin_child(TTR("Generated Point Count:"),epoints);
}
Particles2DEditorPlugin::~Particles2DEditorPlugin()
diff --git a/tools/editor/plugins/particles_editor_plugin.cpp b/tools/editor/plugins/particles_editor_plugin.cpp
index 2df6d3ea90..b7ba987622 100644
--- a/tools/editor/plugins/particles_editor_plugin.cpp
+++ b/tools/editor/plugins/particles_editor_plugin.cpp
@@ -57,7 +57,7 @@ void ParticlesEditor::_node_selected(const NodePath& p_path){
VisualInstance *vi = sel->cast_to<VisualInstance>();
if (!vi) {
- err_dialog->set_text("Node does not contain geometry.");
+ err_dialog->set_text(TTR("Node does not contain geometry."));
err_dialog->popup_centered_minsize();
return;
}
@@ -66,7 +66,7 @@ void ParticlesEditor::_node_selected(const NodePath& p_path){
if (geometry.size()==0) {
- err_dialog->set_text("Node does not contain geometry (faces).");
+ err_dialog->set_text(TTR("Node does not contain geometry (faces)."));
err_dialog->popup_centered_minsize();
return;
@@ -219,7 +219,7 @@ void ParticlesEditor::_generate_emission_points() {
if (!triangle_area_map.size() || area_accum==0) {
- err_dialog->set_text("Faces contain no area!");
+ err_dialog->set_text(TTR("Faces contain no area!"));
err_dialog->popup_centered_minsize();
return;
}
@@ -249,7 +249,7 @@ void ParticlesEditor::_generate_emission_points() {
if (gcount==0) {
- err_dialog->set_text("No Faces!");
+ err_dialog->set_text(TTR("No Faces!"));
err_dialog->popup_centered_minsize();
return;
}
@@ -349,20 +349,20 @@ ParticlesEditor::ParticlesEditor() {
particles_editor_hb->hide();
options->set_text("Particles");
- options->get_popup()->add_item("Generate AABB",MENU_OPTION_GENERATE_AABB);
+ options->get_popup()->add_item(TTR("Generate AABB"),MENU_OPTION_GENERATE_AABB);
options->get_popup()->add_separator();
- options->get_popup()->add_item("Create Emitter From Mesh",MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH);
- options->get_popup()->add_item("Create Emitter From Node",MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE);
- options->get_popup()->add_item("Clear Emitter",MENU_OPTION_CLEAR_EMISSION_VOLUME);
+ options->get_popup()->add_item(TTR("Create Emitter From Mesh"),MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_MESH);
+ options->get_popup()->add_item(TTR("Create Emitter From Node"),MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE);
+ options->get_popup()->add_item(TTR("Clear Emitter"),MENU_OPTION_CLEAR_EMISSION_VOLUME);
options->get_popup()->connect("item_pressed", this,"_menu_option");
emission_dialog = memnew( ConfirmationDialog );
- emission_dialog->set_title("Create Emitter");
+ emission_dialog->set_title(TTR("Create Emitter"));
add_child(emission_dialog);
Label *l = memnew(Label);
l->set_pos(Point2(5,5));
- l->set_text("Emission Positions:");
+ l->set_text(TTR("Emission Positions:"));
emission_dialog->add_child(l);
@@ -374,20 +374,20 @@ ParticlesEditor::ParticlesEditor() {
emission_amount->set_max(65536);
emission_amount->set_val(512);
emission_dialog->add_child(emission_amount);
- emission_dialog->get_ok()->set_text("Create");
+ emission_dialog->get_ok()->set_text(TTR("Create"));
emission_dialog->connect("confirmed",this,"_generate_emission_points");
l = memnew(Label);
l->set_pos(Point2(5,50));
- l->set_text("Emission Fill:");
+ l->set_text(TTR("Emission Fill:"));
emission_dialog->add_child(l);
emission_fill = memnew( OptionButton );
emission_fill->set_anchor(MARGIN_RIGHT,ANCHOR_END);
emission_fill->set_begin( Point2(20,70));
emission_fill->set_end( Point2(5,75));
- emission_fill->add_item("Surface");
- emission_fill->add_item("Volume");
+ emission_fill->add_item(TTR("Surface"));
+ emission_fill->add_item(TTR("Volume"));
emission_dialog->add_child(emission_fill);
err_dialog = memnew( ConfirmationDialog );
diff --git a/tools/editor/plugins/path_2d_editor_plugin.cpp b/tools/editor/plugins/path_2d_editor_plugin.cpp
index 509edbe5f8..079ca3a339 100644
--- a/tools/editor/plugins/path_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/path_2d_editor_plugin.cpp
@@ -113,7 +113,7 @@ bool Path2DEditor::forward_input_event(const InputEvent& p_event) {
return true;
} else if ((mb.button_index==BUTTON_RIGHT && mode==MODE_EDIT) || (mb.button_index==BUTTON_LEFT && mode==MODE_DELETE)) {
- undo_redo->create_action("Remove Point from Curve");
+ undo_redo->create_action(TTR("Remove Point from Curve"));
undo_redo->add_do_method(curve.ptr(),"remove_point",i);
undo_redo->add_undo_method(curve.ptr(),"add_point",curve->get_point_pos(i),curve->get_point_in(i),curve->get_point_out(i),i);
undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
@@ -162,7 +162,7 @@ bool Path2DEditor::forward_input_event(const InputEvent& p_event) {
Ref<Curve2D> curve = node->get_curve();
- undo_redo->create_action("Add Point to Curve");
+ undo_redo->create_action(TTR("Add Point to Curve"));
undo_redo->add_do_method(curve.ptr(),"add_point",cpoint);
undo_redo->add_undo_method(curve.ptr(),"remove_point",curve->get_point_count());
undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
@@ -190,7 +190,7 @@ bool Path2DEditor::forward_input_event(const InputEvent& p_event) {
case ACTION_MOVING_POINT: {
- undo_redo->create_action("Move Point in Curve");
+ undo_redo->create_action(TTR("Move Point in Curve"));
undo_redo->add_do_method(curve.ptr(),"set_point_pos",action_point,cpoint);
undo_redo->add_undo_method(curve.ptr(),"set_point_pos",action_point,moving_from);
undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
@@ -200,7 +200,7 @@ bool Path2DEditor::forward_input_event(const InputEvent& p_event) {
} break;
case ACTION_MOVING_IN: {
- undo_redo->create_action("Move In-Control in Curve");
+ undo_redo->create_action(TTR("Move In-Control in Curve"));
undo_redo->add_do_method(curve.ptr(),"set_point_in",action_point,new_pos);
undo_redo->add_undo_method(curve.ptr(),"set_point_in",action_point,moving_from);
undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
@@ -210,7 +210,7 @@ bool Path2DEditor::forward_input_event(const InputEvent& p_event) {
} break;
case ACTION_MOVING_OUT: {
- undo_redo->create_action("Move Out-Control in Curve");
+ undo_redo->create_action(TTR("Move Out-Control in Curve"));
undo_redo->add_do_method(curve.ptr(),"set_point_out",action_point,new_pos);
undo_redo->add_undo_method(curve.ptr(),"set_point_out",action_point,moving_from);
undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
@@ -280,7 +280,7 @@ bool Path2DEditor::forward_input_event(const InputEvent& p_event) {
if (poly.size() < 3) {
- undo_redo->create_action("Edit Poly");
+ undo_redo->create_action(TTR("Edit Poly"));
undo_redo->add_undo_method(node,"set_polygon",poly);
poly.push_back(cpoint);
undo_redo->add_do_method(node,"set_polygon",poly);
@@ -360,7 +360,7 @@ bool Path2DEditor::forward_input_event(const InputEvent& p_event) {
ERR_FAIL_INDEX_V(edited_point,poly.size(),false);
poly[edited_point]=edited_point_pos;
- undo_redo->create_action("Edit Poly");
+ undo_redo->create_action(TTR("Edit Poly"));
undo_redo->add_do_method(node,"set_polygon",poly);
undo_redo->add_undo_method(node,"set_polygon",pre_move_edit);
undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
@@ -394,7 +394,7 @@ bool Path2DEditor::forward_input_event(const InputEvent& p_event) {
if (closest_idx>=0) {
- undo_redo->create_action("Edit Poly (Remove Point)");
+ undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
undo_redo->add_undo_method(node,"set_polygon",poly);
poly.remove(closest_idx);
undo_redo->add_do_method(node,"set_polygon",poly);
@@ -596,7 +596,7 @@ void Path2DEditor::_mode_selected(int p_mode) {
if (begin.distance_to(end)<CMP_EPSILON)
return;
- undo_redo->create_action("Remove Point from Curve");
+ undo_redo->create_action(TTR("Remove Point from Curve"));
undo_redo->add_do_method(node->get_curve().ptr(),"add_point",begin);
undo_redo->add_undo_method(node->get_curve().ptr(),"remove_point",node->get_curve()->get_point_count());
undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
@@ -622,8 +622,8 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) {
options = memnew( MenuButton );
add_child(options);
options->set_area_as_parent_rect();
- options->set_text("Polygon");
- //options->get_popup()->add_item("Parse BBCODE",PARSE_BBCODE);
+ options->set_text(TTR("Polygon"));
+ //options->get_popup()->add_item(TTR("Parse BBCODE"),PARSE_BBCODE);
options->get_popup()->connect("item_pressed", this,"_menu_option");
#endif
@@ -643,7 +643,7 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) {
curve_edit_curve->set_icon(CanvasItemEditor::get_singleton()->get_icon("CurveCurve","EditorIcons"));
curve_edit_curve->set_toggle_mode(true);
curve_edit_curve->set_focus_mode(Control::FOCUS_NONE);
- curve_edit_curve->set_tooltip("Select Control Points (Shift+Drag)");
+ curve_edit_curve->set_tooltip(TTR("Select Control Points (Shift+Drag)"));
curve_edit_curve->connect("pressed",this,"_mode_selected",varray(MODE_EDIT_CURVE));
base_hb->add_child(curve_edit_curve);
curve_create = memnew( ToolButton );
@@ -657,13 +657,13 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) {
curve_del->set_icon(CanvasItemEditor::get_singleton()->get_icon("CurveDelete","EditorIcons"));
curve_del->set_toggle_mode(true);
curve_del->set_focus_mode(Control::FOCUS_NONE);
- curve_del->set_tooltip("Delete Point.");
+ curve_del->set_tooltip(TTR("Delete Point."));
curve_del->connect("pressed",this,"_mode_selected",varray(MODE_DELETE));
base_hb->add_child(curve_del);
curve_close = memnew( ToolButton );
curve_close->set_icon(CanvasItemEditor::get_singleton()->get_icon("CurveClose","EditorIcons"));
curve_close->set_focus_mode(Control::FOCUS_NONE);
- curve_close->set_tooltip("Close Curve");
+ curve_close->set_tooltip(TTR("Close Curve"));
curve_close->connect("pressed",this,"_mode_selected",varray(ACTION_CLOSE));
base_hb->add_child(curve_close);
base_hb->hide();
diff --git a/tools/editor/plugins/path_editor_plugin.cpp b/tools/editor/plugins/path_editor_plugin.cpp
index 3c4428bdb0..6820eed297 100644
--- a/tools/editor/plugins/path_editor_plugin.cpp
+++ b/tools/editor/plugins/path_editor_plugin.cpp
@@ -39,14 +39,14 @@ String PathSpatialGizmo::get_handle_name(int p_idx) const {
if (p_idx<c->get_point_count()) {
- return "Curve Point #"+itos(p_idx);
+ return TTR("Curve Point #")+itos(p_idx);
}
p_idx=p_idx-c->get_point_count()+1;
int idx=p_idx/2;
int t=p_idx%2;
- String n = "Curve Point #"+itos(idx);
+ String n = TTR("Curve Point #")+itos(idx);
if (t==0)
n+=" In";
else
@@ -148,7 +148,7 @@ void PathSpatialGizmo::commit_handle(int p_idx,const Variant& p_restore,bool p_c
c->set_point_pos(p_idx,p_restore);
return;
}
- ur->create_action("Set Curve Point Pos");
+ ur->create_action(TTR("Set Curve Point Pos"));
ur->add_do_method(c.ptr(),"set_point_pos",p_idx,c->get_point_pos(p_idx));
ur->add_undo_method(c.ptr(),"set_point_pos",p_idx,p_restore);
ur->commit_action();
@@ -179,7 +179,7 @@ void PathSpatialGizmo::commit_handle(int p_idx,const Variant& p_restore,bool p_c
c->set_point_in(p_idx,p_restore);
return;
}
- ur->create_action("Set Curve In Pos");
+ ur->create_action(TTR("Set Curve In Pos"));
ur->add_do_method(c.ptr(),"set_point_in",idx,c->get_point_in(idx));
ur->add_undo_method(c.ptr(),"set_point_in",idx,p_restore);
ur->commit_action();
@@ -191,7 +191,7 @@ void PathSpatialGizmo::commit_handle(int p_idx,const Variant& p_restore,bool p_c
c->set_point_out(idx,p_restore);
return;
}
- ur->create_action("Set Curve Out Pos");
+ ur->create_action(TTR("Set Curve Out Pos"));
ur->add_do_method(c.ptr(),"set_point_out",idx,c->get_point_out(idx));
ur->add_undo_method(c.ptr(),"set_point_out",idx,p_restore);
ur->commit_action();
@@ -366,7 +366,7 @@ bool PathEditorPlugin::forward_spatial_input_event(Camera* p_camera,const InputE
if (closest_seg!=-1) {
//subdivide
- ur->create_action("Split Path");
+ ur->create_action(TTR("Split Path"));
ur->add_do_method(c.ptr(),"add_point",closest_seg_point,Vector3(),Vector3(),closest_seg+1);
ur->add_undo_method(c.ptr(),"remove_point",closest_seg+1);
ur->commit_action();;
@@ -386,7 +386,7 @@ bool PathEditorPlugin::forward_spatial_input_event(Camera* p_camera,const InputE
Vector3 inters;
if (p.intersects_ray(ray_from,ray_dir,&inters)) {
- ur->create_action("Add Point to Curve");
+ ur->create_action(TTR("Add Point to Curve"));
ur->add_do_method(c.ptr(),"add_point",it.xform(inters),Vector3(),Vector3(),-1);
ur->add_undo_method(c.ptr(),"remove_point",c->get_point_count());
ur->commit_action();;
@@ -411,7 +411,7 @@ bool PathEditorPlugin::forward_spatial_input_event(Camera* p_camera,const InputE
if (erase_idx!=-1) {
UndoRedo *ur = editor->get_undo_redo();
- ur->create_action("Remove Path Point");
+ ur->create_action(TTR("Remove Path Point"));
ur->add_do_method(c.ptr(),"remove_point",erase_idx);
ur->add_undo_method(c.ptr(),"add_point",c->get_point_pos(erase_idx),c->get_point_in(erase_idx),c->get_point_out(erase_idx),erase_idx);
ur->commit_action();
@@ -560,13 +560,13 @@ PathEditorPlugin::PathEditorPlugin(EditorNode *p_node) {
curve_del->set_toggle_mode(true);
curve_del->hide();
curve_del->set_focus_mode(Control::FOCUS_NONE);
- curve_del->set_tooltip("Delete Point.");
+ curve_del->set_tooltip(TTR("Delete Point."));
SpatialEditor::get_singleton()->add_control_to_menu_panel(curve_del);
curve_close = memnew( ToolButton );
curve_close->set_icon(SpatialEditor::get_singleton()->get_icon("CurveClose","EditorIcons"));
curve_close->hide();
curve_close->set_focus_mode(Control::FOCUS_NONE);
- curve_close->set_tooltip("Close Curve");
+ curve_close->set_tooltip(TTR("Close Curve"));
SpatialEditor::get_singleton()->add_control_to_menu_panel(curve_close);
diff --git a/tools/editor/plugins/polygon_2d_editor_plugin.cpp b/tools/editor/plugins/polygon_2d_editor_plugin.cpp
index 849fe82645..f07c43b8e4 100644
--- a/tools/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -105,7 +105,7 @@ void Polygon2DEditor::_menu_option(int p_option) {
DVector<Vector2> points = node->get_polygon();
DVector<Vector2> uvs = node->get_uv();
if (uvs.size()!=points.size()) {
- undo_redo->create_action("Create UV Map");
+ undo_redo->create_action(TTR("Create UV Map"));
undo_redo->add_do_method(node,"set_uv",points);
undo_redo->add_undo_method(node,"set_uv",uvs);
undo_redo->add_do_method(uv_edit_draw,"update");
@@ -123,7 +123,7 @@ void Polygon2DEditor::_menu_option(int p_option) {
if (points.size()==0)
break;
DVector<Vector2> uvs = node->get_uv();
- undo_redo->create_action("Create UV Map");
+ undo_redo->create_action(TTR("Create UV Map"));
undo_redo->add_do_method(node,"set_uv",points);
undo_redo->add_undo_method(node,"set_uv",uvs);
undo_redo->add_do_method(uv_edit_draw,"update");
@@ -139,7 +139,7 @@ void Polygon2DEditor::_menu_option(int p_option) {
if (uvs.size()==0)
break;
- undo_redo->create_action("Create UV Map");
+ undo_redo->create_action(TTR("Create UV Map"));
undo_redo->add_do_method(node,"set_polygon",uvs);
undo_redo->add_undo_method(node,"set_polygon",points);
undo_redo->add_do_method(uv_edit_draw,"update");
@@ -152,7 +152,7 @@ void Polygon2DEditor::_menu_option(int p_option) {
DVector<Vector2> uvs = node->get_uv();
if (uvs.size()==0)
break;
- undo_redo->create_action("Create UV Map");
+ undo_redo->create_action(TTR("Create UV Map"));
undo_redo->add_do_method(node,"set_uv",DVector<Vector2>());
undo_redo->add_undo_method(node,"set_uv",uvs);
undo_redo->add_do_method(uv_edit_draw,"update");
@@ -202,7 +202,7 @@ void Polygon2DEditor::_set_snap_step_y(float p_val)
void Polygon2DEditor::_wip_close() {
- undo_redo->create_action("Create Poly");
+ undo_redo->create_action(TTR("Create Poly"));
undo_redo->add_undo_method(node,"set_polygon",node->get_polygon());
undo_redo->add_do_method(node,"set_polygon",wip);
undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
@@ -294,7 +294,7 @@ bool Polygon2DEditor::forward_input_event(const InputEvent& p_event) {
if (poly.size() < 3) {
- undo_redo->create_action("Edit Poly");
+ undo_redo->create_action(TTR("Edit Poly"));
undo_redo->add_undo_method(node,"set_polygon",poly);
poly.push_back(cpoint);
undo_redo->add_do_method(node,"set_polygon",poly);
@@ -374,7 +374,7 @@ bool Polygon2DEditor::forward_input_event(const InputEvent& p_event) {
ERR_FAIL_INDEX_V(edited_point,poly.size(),false);
poly[edited_point]=edited_point_pos-node->get_offset();
- undo_redo->create_action("Edit Poly");
+ undo_redo->create_action(TTR("Edit Poly"));
undo_redo->add_do_method(node,"set_polygon",poly);
undo_redo->add_undo_method(node,"set_polygon",pre_move_edit);
undo_redo->add_do_method(canvas_item_editor->get_viewport_control(),"update");
@@ -408,7 +408,7 @@ bool Polygon2DEditor::forward_input_event(const InputEvent& p_event) {
if (closest_idx>=0) {
- undo_redo->create_action("Edit Poly (Remove Point)");
+ undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
undo_redo->add_undo_method(node,"set_polygon",poly);
poly.remove(closest_idx);
undo_redo->add_do_method(node,"set_polygon",poly);
@@ -548,7 +548,7 @@ void Polygon2DEditor::_uv_input(const InputEvent& p_input) {
}
} else if (uv_drag) {
- undo_redo->create_action("Transform UV Map");
+ undo_redo->create_action(TTR("Transform UV Map"));
undo_redo->add_do_method(node,"set_uv",node->get_uv());
undo_redo->add_undo_method(node,"set_uv",uv_prev);
undo_redo->add_do_method(uv_edit_draw,"update");
@@ -840,8 +840,8 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
options = memnew( MenuButton );
add_child(options);
options->set_area_as_parent_rect();
- options->set_text("Polygon");
- //options->get_popup()->add_item("Parse BBCODE",PARSE_BBCODE);
+ options->set_text(TTR("Polygon"));
+ //options->get_popup()->add_item(TTR("Parse BBCODE"),PARSE_BBCODE);
options->get_popup()->connect("item_pressed", this,"_menu_option");
#endif
@@ -851,7 +851,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
uv_mode=UV_MODE_EDIT_POINT;
uv_edit = memnew( AcceptDialog );
add_child(uv_edit);
- uv_edit->set_title("Polygon 2D UV Editor");
+ uv_edit->set_title(TTR("Polygon 2D UV Editor"));
uv_edit->set_self_opacity(0.9);
VBoxContainer *uv_main_vb = memnew( VBoxContainer );
@@ -869,9 +869,9 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
}
uv_button[0]->set_tooltip("Move Point\nCtrl: Rotate\nShift: Move All\n:Shift+Ctrl: Scale");
- uv_button[1]->set_tooltip("Move Polygon");
- uv_button[2]->set_tooltip("Rotate Polygon");
- uv_button[3]->set_tooltip("Scale Polygon");
+ uv_button[1]->set_tooltip(TTR("Move Polygon"));
+ uv_button[2]->set_tooltip(TTR("Rotate Polygon"));
+ uv_button[3]->set_tooltip(TTR("Scale Polygon"));
uv_button[0]->set_pressed(true);
HBoxContainer *uv_main_hb = memnew( HBoxContainer );
@@ -882,35 +882,35 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
uv_edit_draw->set_h_size_flags(SIZE_EXPAND_FILL);
uv_menu = memnew( MenuButton );
uv_mode_hb->add_child(uv_menu);
- uv_menu->set_text("Edit");
- uv_menu->get_popup()->add_item("Polygon->UV",UVEDIT_POLYGON_TO_UV);
- uv_menu->get_popup()->add_item("UV->Polygon",UVEDIT_UV_TO_POLYGON);
+ uv_menu->set_text(TTR("Edit"));
+ uv_menu->get_popup()->add_item(TTR("Polygon->UV"),UVEDIT_POLYGON_TO_UV);
+ uv_menu->get_popup()->add_item(TTR("UV->Polygon"),UVEDIT_UV_TO_POLYGON);
uv_menu->get_popup()->add_separator();
- uv_menu->get_popup()->add_item("Clear UV",UVEDIT_UV_CLEAR);
+ uv_menu->get_popup()->add_item(TTR("Clear UV"),UVEDIT_UV_CLEAR);
uv_menu->get_popup()->connect("item_pressed",this,"_menu_option");
uv_mode_hb->add_child( memnew( VSeparator ));
b_snap_enable = memnew( ToolButton );
uv_mode_hb->add_child(b_snap_enable);
- b_snap_enable->set_text("Snap");
+ b_snap_enable->set_text(TTR("Snap"));
b_snap_enable->set_focus_mode(FOCUS_NONE);
b_snap_enable->set_toggle_mode(true);
b_snap_enable->set_pressed(use_snap);
- b_snap_enable->set_tooltip("Enable Snap");
+ b_snap_enable->set_tooltip(TTR("Enable Snap"));
b_snap_enable->connect("toggled",this,"_set_use_snap");
b_snap_grid = memnew( ToolButton );
uv_mode_hb->add_child(b_snap_grid);
- b_snap_grid->set_text("Grid");
+ b_snap_grid->set_text(TTR("Grid"));
b_snap_grid->set_focus_mode(FOCUS_NONE);
b_snap_grid->set_toggle_mode(true);
b_snap_grid->set_pressed(snap_show_grid);
- b_snap_grid->set_tooltip("Show Grid");
+ b_snap_grid->set_tooltip(TTR("Show Grid"));
b_snap_grid->connect("toggled",this,"_set_show_grid");
uv_mode_hb->add_child( memnew( VSeparator ));
- uv_mode_hb->add_child( memnew( Label("Grid Offset:") ) );
+ uv_mode_hb->add_child( memnew( Label(TTR("Grid Offset:")) ) );
SpinBox *sb_off_x = memnew( SpinBox );
sb_off_x->set_min(-256);
@@ -931,7 +931,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
uv_mode_hb->add_child(sb_off_y);
uv_mode_hb->add_child( memnew( VSeparator ));
- uv_mode_hb->add_child( memnew( Label("Grid Step:") ) );
+ uv_mode_hb->add_child( memnew( Label(TTR("Grid Step:")) ) );
SpinBox *sb_step_x = memnew( SpinBox );
sb_step_x->set_min(-256);
diff --git a/tools/editor/plugins/resource_preloader_editor_plugin.cpp b/tools/editor/plugins/resource_preloader_editor_plugin.cpp
index 0459ed85bd..01bb82834d 100644
--- a/tools/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/tools/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -70,10 +70,10 @@ void ResourcePreloaderEditor::_files_load_request(const Vector<String>& p_paths)
resource = ResourceLoader::load(path);
if (resource.is_null()) {
- dialog->set_text("ERROR: Couldn't load resource!");
- dialog->set_title("Error!");
- //dialog->get_cancel()->set_text("Close");
- dialog->get_ok()->set_text("Close");
+ dialog->set_text(TTR("ERROR: Couldn't load resource!"));
+ dialog->set_title(TTR("Error!"));
+ //dialog->get_cancel()->set_text(TTR("Close"));
+ dialog->get_ok()->set_text(TTR("Close"));
dialog->popup_centered_minsize();
return; ///beh should show an error i guess
}
@@ -87,7 +87,7 @@ void ResourcePreloaderEditor::_files_load_request(const Vector<String>& p_paths)
name=basename+" "+itos(counter);
}
- undo_redo->create_action("Add Resource");
+ undo_redo->create_action(TTR("Add Resource"));
undo_redo->add_do_method(preloader,"add_resource",name,resource);
undo_redo->add_undo_method(preloader,"remove_resource",name);
undo_redo->add_do_method(this,"_update_library");
@@ -134,7 +134,7 @@ void ResourcePreloaderEditor::_item_edited() {
}
RES samp = preloader->get_resource(old_name);
- undo_redo->create_action("Rename Resource");
+ undo_redo->create_action(TTR("Rename Resource"));
undo_redo->add_do_method(preloader,"remove_resource",old_name);
undo_redo->add_do_method(preloader,"add_resource",new_name,samp);
undo_redo->add_undo_method(preloader,"remove_resource",new_name);
@@ -154,7 +154,7 @@ void ResourcePreloaderEditor::_delete_confirm_pressed() {
return;
String to_remove = tree->get_selected()->get_text(0);
- undo_redo->create_action("Delete Resource");
+ undo_redo->create_action(TTR("Delete Resource"));
undo_redo->add_do_method(preloader,"remove_resource",to_remove);
undo_redo->add_undo_method(preloader,"add_resource",to_remove,preloader->get_resource(to_remove));
undo_redo->add_do_method(this,"_update_library");
@@ -167,10 +167,10 @@ void ResourcePreloaderEditor::_paste_pressed() {
RES r=EditorSettings::get_singleton()->get_resource_clipboard();
if (!r.is_valid()) {
- dialog->set_text("Resource clipboard is empty!");
- dialog->set_title("Error!");
- //dialog->get_cancel()->set_text("Close");
- dialog->get_ok()->set_text("Close");
+ dialog->set_text(TTR("Resource clipboard is empty!"));
+ dialog->set_title(TTR("Error!"));
+ //dialog->get_cancel()->set_text(TTR("Close"));
+ dialog->get_ok()->set_text(TTR("Close"));
dialog->popup_centered_minsize();
return; ///beh should show an error i guess
}
@@ -188,7 +188,7 @@ void ResourcePreloaderEditor::_paste_pressed() {
name=basename+" "+itos(counter);
}
- undo_redo->create_action("Paste Resource");
+ undo_redo->create_action(TTR("Paste Resource"));
undo_redo->add_do_method(preloader,"add_resource",name,r);
undo_redo->add_undo_method(preloader,"remove_resource",name);
undo_redo->add_do_method(this,"_update_library");
@@ -206,11 +206,11 @@ void ResourcePreloaderEditor::_delete_pressed() {
_delete_confirm_pressed(); //it has undo.. why bother with a dialog..
/*
- dialog->set_title("Confirm...");
- dialog->set_text("Remove Resource '"+tree->get_selected()->get_text(0)+"' ?");
- //dialog->get_cancel()->set_text("Cancel");
+ dialog->set_title(TTR("Confirm..."));
+ dialog->set_text(TTR("Remove Resource '")+tree->get_selected()->get_text(0)+"' ?");
+ //dialog->get_cancel()->set_text(TTR("Cancel"));
//dialog->get_ok()->show();
- dialog->get_ok()->set_text("Remove");
+ dialog->get_ok()->set_text(TTR("Remove"));
dialog->popup_centered(Size2(300,60));*/
}
@@ -302,7 +302,7 @@ ResourcePreloaderEditor::ResourcePreloaderEditor() {
vbc->add_child(hbc);
load = memnew( Button );
- load->set_tooltip("Load Resource");
+ load->set_tooltip(TTR("Load Resource"));
hbc->add_child(load);
@@ -311,7 +311,7 @@ ResourcePreloaderEditor::ResourcePreloaderEditor() {
hbc->add_child(_delete);
paste = memnew( Button );
- paste->set_text("Paste");
+ paste->set_text(TTR("Paste"));
hbc->add_child(paste);
file = memnew( EditorFileDialog );
diff --git a/tools/editor/plugins/rich_text_editor_plugin.cpp b/tools/editor/plugins/rich_text_editor_plugin.cpp
index 08374d6624..99d75dff1d 100644
--- a/tools/editor/plugins/rich_text_editor_plugin.cpp
+++ b/tools/editor/plugins/rich_text_editor_plugin.cpp
@@ -106,9 +106,9 @@ RichTextEditor::RichTextEditor() {
CanvasItemEditor::get_singleton()->add_control_to_menu_panel(options);
options->set_area_as_parent_rect();
- options->set_text("RichText");
- options->get_popup()->add_item("Parse BBCODE",PARSE_BBCODE);
- options->get_popup()->add_item("Clear",CLEAR);
+ options->set_text(TTR("RichText"));
+ options->get_popup()->add_item(TTR("Parse BBCODE"),PARSE_BBCODE);
+ options->get_popup()->add_item(TTR("Clear"),CLEAR);
options->get_popup()->connect("item_pressed", this,"_menu_option");
file_dialog = memnew( EditorFileDialog );
diff --git a/tools/editor/plugins/rich_text_editor_plugin.h b/tools/editor/plugins/rich_text_editor_plugin.h
index ae1d04be01..0196a30332 100644
--- a/tools/editor/plugins/rich_text_editor_plugin.h
+++ b/tools/editor/plugins/rich_text_editor_plugin.h
@@ -77,7 +77,7 @@ class RichTextEditorPlugin : public EditorPlugin {
public:
- virtual String get_name() const { return "RichText"; }
+ virtual String get_name() const { return TTR("RichText"); }
bool has_main_screen() const { return false; }
virtual void edit(Object *p_node);
virtual bool handles(Object *p_node) const;
diff --git a/tools/editor/plugins/sample_editor_plugin.cpp b/tools/editor/plugins/sample_editor_plugin.cpp
index ffa39bd010..8c5036b424 100644
--- a/tools/editor/plugins/sample_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_editor_plugin.cpp
@@ -328,7 +328,7 @@ void SampleEditor::_update_sample() {
return; //bye or unsupported
generate_preview_texture(sample,peakdisplay);
- info_label->set_text("Length: "+itos(sample->get_length())+" frames ("+String::num(sample->get_length()/(float)sample->get_mix_rate(),2)+" s), "+(sample->get_format()==Sample::FORMAT_PCM16?"16 Bits, ":"8 bits, ")+(sample->is_stereo()?"Stereo.":"Mono."));
+ info_label->set_text(TTR("Length: ")+itos(sample->get_length())+" frames ("+String::num(sample->get_length()/(float)sample->get_mix_rate(),2)+" s), "+(sample->get_format()==Sample::FORMAT_PCM16?"16 Bits, ":"8 bits, ")+(sample->is_stereo()?"Stereo.":"Mono."));
library->add_sample("default",sample);
}
diff --git a/tools/editor/plugins/sample_library_editor_plugin.cpp b/tools/editor/plugins/sample_library_editor_plugin.cpp
index f15a2834ca..0ab45b45c4 100644
--- a/tools/editor/plugins/sample_library_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_library_editor_plugin.cpp
@@ -53,7 +53,7 @@ void SampleLibraryEditor::_notification(int p_what) {
if (p_what==NOTIFICATION_ENTER_TREE) {
load->set_icon( get_icon("Folder","EditorIcons") );
- load->set_tooltip("Open Sample File(s)");
+ load->set_tooltip(TTR("Open Sample File(s)"));
}
if (p_what==NOTIFICATION_READY) {
@@ -74,10 +74,10 @@ void SampleLibraryEditor::_file_load_request(const DVector<String>& p_path) {
String path = p_path[i];
Ref<Sample> sample = ResourceLoader::load(path,"Sample");
if (sample.is_null()) {
- dialog->set_text("ERROR: Couldn't load sample!");
- dialog->set_title("Error!");
- //dialog->get_cancel()->set_text("Close");
- dialog->get_ok()->set_text("Close");
+ dialog->set_text(TTR("ERROR: Couldn't load sample!"));
+ dialog->set_title(TTR("Error!"));
+ //dialog->get_cancel()->set_text(TTR("Close"));
+ dialog->get_ok()->set_text(TTR("Close"));
dialog->popup_centered_minsize();
return; ///beh should show an error i guess
}
@@ -89,7 +89,7 @@ void SampleLibraryEditor::_file_load_request(const DVector<String>& p_path) {
name=basename+"_"+itos(counter);
}
- undo_redo->create_action("Add Sample");
+ undo_redo->create_action(TTR("Add Sample"));
undo_redo->add_do_method(sample_library.operator->(),"add_sample",name,sample);
undo_redo->add_undo_method(sample_library.operator->(),"remove_sample",name);
undo_redo->add_do_method(this,"_update_library");
@@ -114,7 +114,7 @@ void SampleLibraryEditor::_button_pressed(Object *p_item,int p_column, int p_id)
String btn_type;
if(!is_playing) {
is_playing = true;
- btn_type = "Stop";
+ btn_type = TTR("Stop");
player->play(name,true);
last_sample_playing = p_item;
set_process(true);
@@ -123,11 +123,11 @@ void SampleLibraryEditor::_button_pressed(Object *p_item,int p_column, int p_id)
if(last_sample_playing != p_item){
TreeItem *tl=last_sample_playing->cast_to<TreeItem>();
tl->set_button(p_column,0,get_icon("Play","EditorIcons"));
- btn_type = "Stop";
+ btn_type = TTR("Stop");
player->play(name,true);
last_sample_playing = p_item;
} else {
- btn_type = "Play";
+ btn_type = TTR("Play");
is_playing = false;
}
}
@@ -169,7 +169,7 @@ void SampleLibraryEditor::_item_edited() {
}
Ref<Sample> samp = sample_library->get_sample(old_name);
- undo_redo->create_action("Rename Sample");
+ undo_redo->create_action(TTR("Rename Sample"));
undo_redo->add_do_method(sample_library.operator->(),"remove_sample",old_name);
undo_redo->add_do_method(sample_library.operator->(),"add_sample",new_name,samp);
undo_redo->add_undo_method(sample_library.operator->(),"remove_sample",new_name);
@@ -199,7 +199,7 @@ void SampleLibraryEditor::_delete_pressed() {
return;
String to_remove = tree->get_selected()->get_text(0);
- undo_redo->create_action("Delete Sample");
+ undo_redo->create_action(TTR("Delete Sample"));
undo_redo->add_do_method(sample_library.operator->(),"remove_sample",to_remove);
undo_redo->add_undo_method(sample_library.operator->(),"add_sample",to_remove,sample_library->get_sample(to_remove));
undo_redo->add_do_method(this,"_update_library");
@@ -248,7 +248,7 @@ void SampleLibraryEditor::_update_library() {
ti->set_cell_mode(2,TreeItem::CELL_MODE_STRING);
ti->set_editable(2,false);
ti->set_selectable(2,false);
- ti->set_text(2,String()+/*itos(smp->get_length())+" frames ("+String::num(smp->get_length()/(float)smp->get_mix_rate(),2)+" smp), "+*/(smp->get_format()==Sample::FORMAT_PCM16?"16 Bits, ":(smp->get_format()==Sample::FORMAT_PCM8?"8 bits, ":"IMA-ADPCM,"))+(smp->is_stereo()?"Stereo":"Mono"));
+ ti->set_text(2,String()+/*itos(smp->get_length())+" frames ("+String::num(smp->get_length()/(float)smp->get_mix_rate(),2)+" smp), "+*/(smp->get_format()==Sample::FORMAT_PCM16?"16 Bits, ":(smp->get_format()==Sample::FORMAT_PCM8?"8 bits, ":TTR("IMA-ADPCM,")))+(smp->is_stereo()?"Stereo":"Mono"));
// Volume dB
ti->set_cell_mode(3,TreeItem::CELL_MODE_RANGE);
@@ -331,9 +331,9 @@ SampleLibraryEditor::SampleLibraryEditor() {
tree->set_anchor_and_margin(MARGIN_TOP,ANCHOR_BEGIN,30);
tree->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_END,5);
tree->set_column_titles_visible(true);
- tree->set_column_title(0,"Name");
- tree->set_column_title(1,"Preview");
- tree->set_column_title(2,"Format");
+ tree->set_column_title(0,TTR("Name"));
+ tree->set_column_title(1,TTR("Preview"));
+ tree->set_column_title(2,TTR("Format"));
tree->set_column_title(3,"dB");
tree->set_column_title(4,"Pitch");
tree->set_column_title(5,"");
diff --git a/tools/editor/plugins/sample_player_editor_plugin.cpp b/tools/editor/plugins/sample_player_editor_plugin.cpp
index 3085ad87d8..fd6e800b42 100644
--- a/tools/editor/plugins/sample_player_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_player_editor_plugin.cpp
@@ -76,7 +76,7 @@ void SamplePlayerEditor::_stop() {
return;
node->call("stop_all");
- print_line("STOP ALL!!");
+ print_line(TTR("STOP ALL!!"));
stop->set_pressed(true);
play->set_pressed(false);
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index 6515b9b69e..eaf08ca1c0 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -223,12 +223,12 @@ ScriptEditorQuickOpen::ScriptEditorQuickOpen() {
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("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);
@@ -2214,7 +2214,6 @@ void ScriptEditor::get_window_layout(Ref<ConfigFile> p_layout) {
p_layout->set_value("ScriptEditor","open_scripts",scripts);
p_layout->set_value("ScriptEditor","open_help",helps);
p_layout->set_value("ScriptEditor","split_offset",script_split->get_split_offset());
-
}
@@ -2400,82 +2399,82 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
file_menu = memnew( MenuButton );
menu_hb->add_child(file_menu);
- file_menu->set_text("File");
- file_menu->get_popup()->add_item("New",FILE_NEW);
- file_menu->get_popup()->add_item("Open",FILE_OPEN);
+ file_menu->set_text(TTR("File"));
+ file_menu->get_popup()->add_item(TTR("New"),FILE_NEW);
+ file_menu->get_popup()->add_item(TTR("Open"),FILE_OPEN);
file_menu->get_popup()->add_separator();
- file_menu->get_popup()->add_item("Save",FILE_SAVE,KEY_MASK_ALT|KEY_MASK_CMD|KEY_S);
- file_menu->get_popup()->add_item("Save As..",FILE_SAVE_AS);
- file_menu->get_popup()->add_item("Save All",FILE_SAVE_ALL,KEY_MASK_CMD|KEY_MASK_SHIFT|KEY_S);
+ file_menu->get_popup()->add_item(TTR("Save"),FILE_SAVE,KEY_MASK_ALT|KEY_MASK_CMD|KEY_S);
+ file_menu->get_popup()->add_item(TTR("Save As.."),FILE_SAVE_AS);
+ file_menu->get_popup()->add_item(TTR("Save All"),FILE_SAVE_ALL,KEY_MASK_CMD|KEY_MASK_SHIFT|KEY_S);
file_menu->get_popup()->add_separator();
- file_menu->get_popup()->add_item("History Prev",WINDOW_PREV,KEY_MASK_CTRL|KEY_MASK_ALT|KEY_LEFT);
- file_menu->get_popup()->add_item("History Next",WINDOW_NEXT,KEY_MASK_CTRL|KEY_MASK_ALT|KEY_RIGHT);
+ file_menu->get_popup()->add_item(TTR("History Prev"),WINDOW_PREV,KEY_MASK_CTRL|KEY_MASK_ALT|KEY_LEFT);
+ file_menu->get_popup()->add_item(TTR("History Next"),WINDOW_NEXT,KEY_MASK_CTRL|KEY_MASK_ALT|KEY_RIGHT);
file_menu->get_popup()->add_separator();
- file_menu->get_popup()->add_item("Close",FILE_CLOSE,KEY_MASK_CMD|KEY_W);
+ file_menu->get_popup()->add_item(TTR("Close"),FILE_CLOSE,KEY_MASK_CMD|KEY_W);
file_menu->get_popup()->connect("item_pressed", this,"_menu_option");
edit_menu = memnew( MenuButton );
menu_hb->add_child(edit_menu);
- edit_menu->set_text("Edit");
- edit_menu->get_popup()->add_item("Undo",EDIT_UNDO,KEY_MASK_CMD|KEY_Z);
- edit_menu->get_popup()->add_item("Redo",EDIT_REDO,KEY_MASK_CMD|KEY_Y);
+ edit_menu->set_text(TTR("Edit"));
+ edit_menu->get_popup()->add_item(TTR("Undo"),EDIT_UNDO,KEY_MASK_CMD|KEY_Z);
+ edit_menu->get_popup()->add_item(TTR("Redo"),EDIT_REDO,KEY_MASK_CMD|KEY_Y);
edit_menu->get_popup()->add_separator();
- edit_menu->get_popup()->add_item("Cut",EDIT_CUT,KEY_MASK_CMD|KEY_X);
- edit_menu->get_popup()->add_item("Copy",EDIT_COPY,KEY_MASK_CMD|KEY_C);
- edit_menu->get_popup()->add_item("Paste",EDIT_PASTE,KEY_MASK_CMD|KEY_V);
+ edit_menu->get_popup()->add_item(TTR("Cut"),EDIT_CUT,KEY_MASK_CMD|KEY_X);
+ edit_menu->get_popup()->add_item(TTR("Copy"),EDIT_COPY,KEY_MASK_CMD|KEY_C);
+ edit_menu->get_popup()->add_item(TTR("Paste"),EDIT_PASTE,KEY_MASK_CMD|KEY_V);
edit_menu->get_popup()->add_separator();
- edit_menu->get_popup()->add_item("Select All",EDIT_SELECT_ALL,KEY_MASK_CMD|KEY_A);
+ edit_menu->get_popup()->add_item(TTR("Select All"),EDIT_SELECT_ALL,KEY_MASK_CMD|KEY_A);
edit_menu->get_popup()->add_separator();
- edit_menu->get_popup()->add_item("Move Up",EDIT_MOVE_LINE_UP,KEY_MASK_ALT|KEY_UP);
- edit_menu->get_popup()->add_item("Move Down",EDIT_MOVE_LINE_DOWN,KEY_MASK_ALT|KEY_DOWN);
- edit_menu->get_popup()->add_item("Indent Left",EDIT_INDENT_LEFT,KEY_MASK_ALT|KEY_LEFT);
- edit_menu->get_popup()->add_item("Indent Right",EDIT_INDENT_RIGHT,KEY_MASK_ALT|KEY_RIGHT);
- edit_menu->get_popup()->add_item("Toggle Comment",EDIT_TOGGLE_COMMENT,KEY_MASK_CMD|KEY_K);
- edit_menu->get_popup()->add_item("Clone Down",EDIT_CLONE_DOWN,KEY_MASK_CMD|KEY_B);
+ edit_menu->get_popup()->add_item(TTR("Move Up"),EDIT_MOVE_LINE_UP,KEY_MASK_ALT|KEY_UP);
+ edit_menu->get_popup()->add_item(TTR("Move Down"),EDIT_MOVE_LINE_DOWN,KEY_MASK_ALT|KEY_DOWN);
+ edit_menu->get_popup()->add_item(TTR("Indent Left"),EDIT_INDENT_LEFT,KEY_MASK_ALT|KEY_LEFT);
+ edit_menu->get_popup()->add_item(TTR("Indent Right"),EDIT_INDENT_RIGHT,KEY_MASK_ALT|KEY_RIGHT);
+ edit_menu->get_popup()->add_item(TTR("Toggle Comment"),EDIT_TOGGLE_COMMENT,KEY_MASK_CMD|KEY_K);
+ edit_menu->get_popup()->add_item(TTR("Clone Down"),EDIT_CLONE_DOWN,KEY_MASK_CMD|KEY_B);
edit_menu->get_popup()->add_separator();
#ifdef OSX_ENABLED
- edit_menu->get_popup()->add_item("Complete Symbol",EDIT_COMPLETE,KEY_MASK_CTRL|KEY_SPACE);
+ edit_menu->get_popup()->add_item(TTR("Complete Symbol"),EDIT_COMPLETE,KEY_MASK_CTRL|KEY_SPACE);
#else
- edit_menu->get_popup()->add_item("Complete Symbol",EDIT_COMPLETE,KEY_MASK_CMD|KEY_SPACE);
+ edit_menu->get_popup()->add_item(TTR("Complete Symbol"),EDIT_COMPLETE,KEY_MASK_CMD|KEY_SPACE);
#endif
edit_menu->get_popup()->add_item("Trim Trailing Whitespace", EDIT_TRIM_TRAILING_WHITESAPCE, KEY_MASK_CTRL|KEY_MASK_ALT|KEY_T);
- edit_menu->get_popup()->add_item("Auto Indent",EDIT_AUTO_INDENT,KEY_MASK_CMD|KEY_I);
+ edit_menu->get_popup()->add_item(TTR("Auto Indent"),EDIT_AUTO_INDENT,KEY_MASK_CMD|KEY_I);
edit_menu->get_popup()->connect("item_pressed", this,"_menu_option");
search_menu = memnew( MenuButton );
menu_hb->add_child(search_menu);
- search_menu->set_text("Search");
- search_menu->get_popup()->add_item("Find..",SEARCH_FIND,KEY_MASK_CMD|KEY_F);
- search_menu->get_popup()->add_item("Find Next",SEARCH_FIND_NEXT,KEY_F3);
- search_menu->get_popup()->add_item("Replace..",SEARCH_REPLACE,KEY_MASK_CMD|KEY_R);
+ search_menu->set_text(TTR("Search"));
+ search_menu->get_popup()->add_item(TTR("Find.."),SEARCH_FIND,KEY_MASK_CMD|KEY_F);
+ search_menu->get_popup()->add_item(TTR("Find Next"),SEARCH_FIND_NEXT,KEY_F3);
+ search_menu->get_popup()->add_item(TTR("Replace.."),SEARCH_REPLACE,KEY_MASK_CMD|KEY_R);
search_menu->get_popup()->add_separator();
- search_menu->get_popup()->add_item("Goto Function..",SEARCH_LOCATE_FUNCTION,KEY_MASK_SHIFT|KEY_MASK_CMD|KEY_F);
- search_menu->get_popup()->add_item("Goto Line..",SEARCH_GOTO_LINE,KEY_MASK_CMD|KEY_L);
+ search_menu->get_popup()->add_item(TTR("Goto Function.."),SEARCH_LOCATE_FUNCTION,KEY_MASK_SHIFT|KEY_MASK_CMD|KEY_F);
+ search_menu->get_popup()->add_item(TTR("Goto Line.."),SEARCH_GOTO_LINE,KEY_MASK_CMD|KEY_L);
search_menu->get_popup()->connect("item_pressed", this,"_menu_option");
script_search_menu = memnew( MenuButton );
menu_hb->add_child(script_search_menu);
- script_search_menu->set_text("Search");
- script_search_menu->get_popup()->add_item("Find..",SEARCH_FIND,KEY_MASK_CMD|KEY_F);
- script_search_menu->get_popup()->add_item("Find Next",SEARCH_FIND_NEXT,KEY_F3);
+ script_search_menu->set_text(TTR("Search"));
+ script_search_menu->get_popup()->add_item(TTR("Find.."),SEARCH_FIND,KEY_MASK_CMD|KEY_F);
+ script_search_menu->get_popup()->add_item(TTR("Find Next"),SEARCH_FIND_NEXT,KEY_F3);
script_search_menu->get_popup()->connect("item_pressed", this,"_menu_option");
script_search_menu->hide();
debug_menu = memnew( MenuButton );
menu_hb->add_child(debug_menu);
- debug_menu->set_text("Debug");
- debug_menu->get_popup()->add_item("Toggle Breakpoint",DEBUG_TOGGLE_BREAKPOINT,KEY_F9);
+ debug_menu->set_text(TTR("Debug"));
+ debug_menu->get_popup()->add_item(TTR("Toggle Breakpoint"),DEBUG_TOGGLE_BREAKPOINT,KEY_F9);
debug_menu->get_popup()->add_separator();
- debug_menu->get_popup()->add_item("Step Over",DEBUG_NEXT,KEY_F10);
- debug_menu->get_popup()->add_item("Step Into",DEBUG_STEP,KEY_F11);
+ debug_menu->get_popup()->add_item(TTR("Step Over"),DEBUG_NEXT,KEY_F10);
+ debug_menu->get_popup()->add_item(TTR("Step Into"),DEBUG_STEP,KEY_F11);
debug_menu->get_popup()->add_separator();
- debug_menu->get_popup()->add_item("Break",DEBUG_BREAK);
- debug_menu->get_popup()->add_item("Continue",DEBUG_CONTINUE);
+ debug_menu->get_popup()->add_item(TTR("Break"),DEBUG_BREAK);
+ debug_menu->get_popup()->add_item(TTR("Continue"),DEBUG_CONTINUE);
debug_menu->get_popup()->add_separator();
- //debug_menu->get_popup()->add_check_item("Show Debugger",DEBUG_SHOW);
- debug_menu->get_popup()->add_check_item("Keep Debugger Open",DEBUG_SHOW_KEEP_OPEN);
+ //debug_menu->get_popup()->add_check_item(TTR("Show Debugger"),DEBUG_SHOW);
+ debug_menu->get_popup()->add_check_item(TTR("Keep Debugger Open"),DEBUG_SHOW_KEEP_OPEN);
debug_menu->get_popup()->connect("item_pressed", this,"_menu_option");
debug_menu->get_popup()->set_item_disabled( debug_menu->get_popup()->get_item_index(DEBUG_NEXT), true);
@@ -2487,11 +2486,11 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
#if 0
window_menu = memnew( MenuButton );
menu_hb->add_child(window_menu);
- window_menu->set_text("Window");
- window_menu->get_popup()->add_item("Close",WINDOW_CLOSE,KEY_MASK_CMD|KEY_W);
+ window_menu->set_text(TTR("Window"));
+ window_menu->get_popup()->add_item(TTR("Close"),WINDOW_CLOSE,KEY_MASK_CMD|KEY_W);
window_menu->get_popup()->add_separator();
- window_menu->get_popup()->add_item("Move Left",WINDOW_MOVE_LEFT,KEY_MASK_CMD|KEY_LEFT);
- window_menu->get_popup()->add_item("Move Right",WINDOW_MOVE_RIGHT,KEY_MASK_CMD|KEY_RIGHT);
+ window_menu->get_popup()->add_item(TTR("Move Left"),WINDOW_MOVE_LEFT,KEY_MASK_CMD|KEY_LEFT);
+ window_menu->get_popup()->add_item(TTR("Move Right"),WINDOW_MOVE_RIGHT,KEY_MASK_CMD|KEY_RIGHT);
window_menu->get_popup()->add_separator();
window_menu->get_popup()->connect("item_pressed", this,"_menu_option");
@@ -2499,8 +2498,8 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
help_menu = memnew( MenuButton );
menu_hb->add_child(help_menu);
- help_menu->set_text("Help");
- help_menu->get_popup()->add_item("Contextual", HELP_CONTEXTUAL, KEY_MASK_SHIFT|KEY_F1);
+ help_menu->set_text(TTR("Help"));
+ help_menu->get_popup()->add_item(TTR("Contextual"), HELP_CONTEXTUAL, KEY_MASK_SHIFT|KEY_F1);
help_menu->get_popup()->connect("item_pressed", this,"_menu_option");
menu_hb->add_spacer();
@@ -2517,22 +2516,22 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
menu_hb->add_spacer();
site_search = memnew( ToolButton );
- site_search->set_text("Tutorials");
+ site_search->set_text(TTR("Tutorials"));
site_search->connect("pressed",this,"_menu_option",varray(SEARCH_WEBSITE));
menu_hb->add_child(site_search);
- site_search->set_tooltip("Open http://www.godotengine.org at tutorials section.");
+ site_search->set_tooltip(TTR("Open http://www.godotengine.org at tutorials section."));
class_search = memnew( ToolButton );
- class_search->set_text("Classes");
+ class_search->set_text(TTR("Classes"));
class_search->connect("pressed",this,"_menu_option",varray(SEARCH_CLASSES));
menu_hb->add_child(class_search);
- class_search->set_tooltip("Search the class hierarchy.");
+ class_search->set_tooltip(TTR("Search the class hierarchy."));
help_search = memnew( ToolButton );
- help_search->set_text("Search Help");
+ help_search->set_text(TTR("Search Help"));
help_search->connect("pressed",this,"_menu_option",varray(SEARCH_HELP));
menu_hb->add_child(help_search);
- help_search->set_tooltip("Search the reference documentation.");
+ help_search->set_tooltip(TTR("Search the reference documentation."));
menu_hb->add_child( memnew( VSeparator) );
@@ -2540,13 +2539,13 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
script_back->connect("pressed",this,"_history_back");
menu_hb->add_child(script_back);
script_back->set_disabled(true);
- script_back->set_tooltip("Go to previous edited document.");
+ script_back->set_tooltip(TTR("Go to previous edited document."));
script_forward = memnew( ToolButton );
script_forward->connect("pressed",this,"_history_forward");
menu_hb->add_child(script_forward);
script_forward->set_disabled(true);
- script_forward->set_tooltip("Go to next edited document.");
+ script_forward->set_tooltip(TTR("Go to next edited document."));
@@ -2560,7 +2559,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
erase_tab_confirm->connect("confirmed", this,"_close_current_tab");
script_create_dialog = memnew(ScriptCreateDialog);
- script_create_dialog->set_title("Create Script");
+ script_create_dialog->set_title(TTR("Create Script"));
add_child(script_create_dialog);
script_create_dialog->connect("script_created", this, "_script_created");
@@ -2586,9 +2585,9 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
disk_changed_list->set_v_size_flags(SIZE_EXPAND_FILL);
disk_changed->connect("confirmed",this,"_reload_scripts");
- disk_changed->get_ok()->set_text("Reload");
+ disk_changed->get_ok()->set_text(TTR("Reload"));
- disk_changed->add_button("Resave",!OS::get_singleton()->get_swap_ok_cancel(),"resave");
+ disk_changed->add_button(TTR("Resave"),!OS::get_singleton()->get_swap_ok_cancel(),"resave");
disk_changed->connect("custom_action",this,"_resave_scripts");
@@ -2604,7 +2603,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
quick_open->connect("goto_line",this,"_goto_script_line2");
- Button *db = EditorNode::get_singleton()->add_bottom_panel_item("Debugger",debugger);
+ Button *db = EditorNode::get_singleton()->add_bottom_panel_item(TTR("Debugger"),debugger);
debugger->set_tool_button(db);
diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp
index d1e892a513..3399114402 100644
--- a/tools/editor/plugins/shader_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_editor_plugin.cpp
@@ -481,28 +481,28 @@ ShaderEditor::ShaderEditor() {
edit_menu = memnew( MenuButton );
add_child(edit_menu);
edit_menu->set_pos(Point2(5,-1));
- edit_menu->set_text("Edit");
- edit_menu->get_popup()->add_item("Undo",EDIT_UNDO,KEY_MASK_CMD|KEY_Z);
- edit_menu->get_popup()->add_item("Redo",EDIT_REDO,KEY_MASK_CMD|KEY_MASK_SHIFT|KEY_Z);
+ edit_menu->set_text(TTR("Edit"));
+ edit_menu->get_popup()->add_item(TTR("Undo"),EDIT_UNDO,KEY_MASK_CMD|KEY_Z);
+ edit_menu->get_popup()->add_item(TTR("Redo"),EDIT_REDO,KEY_MASK_CMD|KEY_MASK_SHIFT|KEY_Z);
edit_menu->get_popup()->add_separator();
- edit_menu->get_popup()->add_item("Cut",EDIT_CUT,KEY_MASK_CMD|KEY_X);
- edit_menu->get_popup()->add_item("Copy",EDIT_COPY,KEY_MASK_CMD|KEY_C);
- edit_menu->get_popup()->add_item("Paste",EDIT_PASTE,KEY_MASK_CMD|KEY_V);
+ edit_menu->get_popup()->add_item(TTR("Cut"),EDIT_CUT,KEY_MASK_CMD|KEY_X);
+ edit_menu->get_popup()->add_item(TTR("Copy"),EDIT_COPY,KEY_MASK_CMD|KEY_C);
+ edit_menu->get_popup()->add_item(TTR("Paste"),EDIT_PASTE,KEY_MASK_CMD|KEY_V);
edit_menu->get_popup()->add_separator();
- edit_menu->get_popup()->add_item("Select All",EDIT_SELECT_ALL,KEY_MASK_CMD|KEY_A);
+ edit_menu->get_popup()->add_item(TTR("Select All"),EDIT_SELECT_ALL,KEY_MASK_CMD|KEY_A);
edit_menu->get_popup()->connect("item_pressed", this,"_menu_option");
search_menu = memnew( MenuButton );
add_child(search_menu);
search_menu->set_pos(Point2(38,-1));
- search_menu->set_text("Search");
- search_menu->get_popup()->add_item("Find..",SEARCH_FIND,KEY_MASK_CMD|KEY_F);
- search_menu->get_popup()->add_item("Find Next",SEARCH_FIND_NEXT,KEY_F3);
- search_menu->get_popup()->add_item("Replace..",SEARCH_REPLACE,KEY_MASK_CMD|KEY_R);
+ search_menu->set_text(TTR("Search"));
+ search_menu->get_popup()->add_item(TTR("Find.."),SEARCH_FIND,KEY_MASK_CMD|KEY_F);
+ search_menu->get_popup()->add_item(TTR("Find Next"),SEARCH_FIND_NEXT,KEY_F3);
+ search_menu->get_popup()->add_item(TTR("Replace.."),SEARCH_REPLACE,KEY_MASK_CMD|KEY_R);
search_menu->get_popup()->add_separator();
-// search_menu->get_popup()->add_item("Locate Symbol..",SEARCH_LOCATE_SYMBOL,KEY_MASK_CMD|KEY_K);
- search_menu->get_popup()->add_item("Goto Line..",SEARCH_GOTO_LINE,KEY_MASK_CMD|KEY_G);
+// search_menu->get_popup()->add_item(TTR("Locate Symbol.."),SEARCH_LOCATE_SYMBOL,KEY_MASK_CMD|KEY_K);
+ search_menu->get_popup()->add_item(TTR("Goto Line.."),SEARCH_GOTO_LINE,KEY_MASK_CMD|KEY_G);
search_menu->get_popup()->connect("item_pressed", this,"_menu_option");
@@ -521,15 +521,15 @@ ShaderEditor::ShaderEditor() {
vertex_editor = memnew( ShaderTextEditor );
tab_container->add_child(vertex_editor);
- vertex_editor->set_name("Vertex");
+ vertex_editor->set_name(TTR("Vertex"));
fragment_editor = memnew( ShaderTextEditor );
tab_container->add_child(fragment_editor);
- fragment_editor->set_name("Fragment");
+ fragment_editor->set_name(TTR("Fragment"));
light_editor = memnew( ShaderTextEditor );
tab_container->add_child(light_editor);
- light_editor->set_name("Lighting");
+ light_editor->set_name(TTR("Lighting"));
tab_container->set_current_tab(1);
diff --git a/tools/editor/plugins/shader_graph_editor_plugin.cpp b/tools/editor/plugins/shader_graph_editor_plugin.cpp
index 36a8c79b84..f618f41cf8 100644
--- a/tools/editor/plugins/shader_graph_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_graph_editor_plugin.cpp
@@ -674,7 +674,7 @@ GraphCurveMapEdit::GraphCurveMapEdit(){
void ShaderGraphView::_scalar_const_changed(double p_value,int p_id) {
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Change Scalar Constant",true);
+ ur->create_action(TTR("Change Scalar Constant"),true);
ur->add_do_method(graph.ptr(),"scalar_const_node_set_value",type,p_id,p_value);
ur->add_undo_method(graph.ptr(),"scalar_const_node_set_value",type,p_id,graph->scalar_const_node_get_value(type,p_id));
ur->add_do_method(this,"_update_graph");
@@ -692,7 +692,7 @@ void ShaderGraphView::_vec_const_changed(double p_value, int p_id,Array p_arr){
}
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Change Vec Constant",true);
+ ur->create_action(TTR("Change Vec Constant"),true);
ur->add_do_method(graph.ptr(),"vec_const_node_set_value",type,p_id,val);
ur->add_undo_method(graph.ptr(),"vec_const_node_set_value",type,p_id,graph->vec_const_node_get_value(type,p_id));
ur->add_do_method(this,"_update_graph");
@@ -705,7 +705,7 @@ void ShaderGraphView::_vec_const_changed(double p_value, int p_id,Array p_arr){
void ShaderGraphView::_rgb_const_changed(const Color& p_color, int p_id){
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Change RGB Constant",true);
+ ur->create_action(TTR("Change RGB Constant"),true);
ur->add_do_method(graph.ptr(),"rgb_const_node_set_value",type,p_id,p_color);
ur->add_undo_method(graph.ptr(),"rgb_const_node_set_value",type,p_id,graph->rgb_const_node_get_value(type,p_id));
ur->add_do_method(this,"_update_graph");
@@ -718,7 +718,7 @@ void ShaderGraphView::_rgb_const_changed(const Color& p_color, int p_id){
void ShaderGraphView::_scalar_op_changed(int p_op, int p_id){
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Change Scalar Operator");
+ ur->create_action(TTR("Change Scalar Operator"));
ur->add_do_method(graph.ptr(),"scalar_op_node_set_op",type,p_id,p_op);
ur->add_undo_method(graph.ptr(),"scalar_op_node_set_op",type,p_id,graph->scalar_op_node_get_op(type,p_id));
ur->add_do_method(this,"_update_graph");
@@ -731,7 +731,7 @@ void ShaderGraphView::_scalar_op_changed(int p_op, int p_id){
void ShaderGraphView::_vec_op_changed(int p_op, int p_id){
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Change Vec Operator");
+ ur->create_action(TTR("Change Vec Operator"));
ur->add_do_method(graph.ptr(),"vec_op_node_set_op",type,p_id,p_op);
ur->add_undo_method(graph.ptr(),"vec_op_node_set_op",type,p_id,graph->vec_op_node_get_op(type,p_id));
ur->add_do_method(this,"_update_graph");
@@ -743,7 +743,7 @@ void ShaderGraphView::_vec_op_changed(int p_op, int p_id){
void ShaderGraphView::_vec_scalar_op_changed(int p_op, int p_id){
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Change VecxScalar Operator");
+ ur->create_action(TTR("Change VecxScalar Operator"));
ur->add_do_method(graph.ptr(),"vec_scalar_op_node_set_op",type,p_id,p_op);
ur->add_undo_method(graph.ptr(),"vec_scalar_op_node_set_op",type,p_id,graph->vec_scalar_op_node_get_op(type,p_id));
ur->add_do_method(this,"_update_graph");
@@ -756,7 +756,7 @@ void ShaderGraphView::_vec_scalar_op_changed(int p_op, int p_id){
void ShaderGraphView::_rgb_op_changed(int p_op, int p_id){
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Change RGB Operator");
+ ur->create_action(TTR("Change RGB Operator"));
ur->add_do_method(graph.ptr(),"rgb_op_node_set_op",type,p_id,p_op);
ur->add_undo_method(graph.ptr(),"rgb_op_node_set_op",type,p_id,graph->rgb_op_node_get_op(type,p_id));
ur->add_do_method(this,"_update_graph");
@@ -768,7 +768,7 @@ void ShaderGraphView::_rgb_op_changed(int p_op, int p_id){
void ShaderGraphView::_xform_inv_rev_changed(bool p_enabled, int p_id){
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Toggle Rot Only");
+ ur->create_action(TTR("Toggle Rot Only"));
ur->add_do_method(graph.ptr(),"xform_vec_mult_node_set_no_translation",type,p_id,p_enabled);
ur->add_undo_method(graph.ptr(),"xform_vec_mult_node_set_no_translation",type,p_id,graph->xform_vec_mult_node_get_no_translation(type,p_id));
ur->add_do_method(this,"_update_graph");
@@ -781,7 +781,7 @@ void ShaderGraphView::_scalar_func_changed(int p_func, int p_id){
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Change Scalar Function");
+ ur->create_action(TTR("Change Scalar Function"));
ur->add_do_method(graph.ptr(),"scalar_func_node_set_function",type,p_id,p_func);
ur->add_undo_method(graph.ptr(),"scalar_func_node_set_function",type,p_id,graph->scalar_func_node_get_function(type,p_id));
ur->add_do_method(this,"_update_graph");
@@ -793,7 +793,7 @@ void ShaderGraphView::_scalar_func_changed(int p_func, int p_id){
void ShaderGraphView::_vec_func_changed(int p_func, int p_id){
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Change Vec Function");
+ ur->create_action(TTR("Change Vec Function"));
ur->add_do_method(graph.ptr(),"vec_func_node_set_function",type,p_id,p_func);
ur->add_undo_method(graph.ptr(),"vec_func_node_set_function",type,p_id,graph->vec_func_node_get_function(type,p_id));
ur->add_do_method(this,"_update_graph");
@@ -806,7 +806,7 @@ void ShaderGraphView::_vec_func_changed(int p_func, int p_id){
void ShaderGraphView::_scalar_input_changed(double p_value,int p_id){
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Change Scalar Uniform",true);
+ ur->create_action(TTR("Change Scalar Uniform"),true);
ur->add_do_method(graph.ptr(),"scalar_input_node_set_value",type,p_id,p_value);
ur->add_undo_method(graph.ptr(),"scalar_input_node_set_value",type,p_id,graph->scalar_input_node_get_value(type,p_id));
ur->add_do_method(this,"_update_graph");
@@ -824,7 +824,7 @@ void ShaderGraphView::_vec_input_changed(double p_value, int p_id,Array p_arr){
}
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Change Vec Uniform",true);
+ ur->create_action(TTR("Change Vec Uniform"),true);
ur->add_do_method(graph.ptr(),"vec_input_node_set_value",type,p_id,val);
ur->add_undo_method(graph.ptr(),"vec_input_node_set_value",type,p_id,graph->vec_input_node_get_value(type,p_id));
ur->add_do_method(this,"_update_graph");
@@ -862,7 +862,7 @@ void ShaderGraphView::_rgb_input_changed(const Color& p_color, int p_id){
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Change RGB Uniform",true);
+ ur->create_action(TTR("Change RGB Uniform"),true);
ur->add_do_method(graph.ptr(),"rgb_input_node_set_value",type,p_id,p_color);
ur->add_undo_method(graph.ptr(),"rgb_input_node_set_value",type,p_id,graph->rgb_input_node_get_value(type,p_id));
ur->add_do_method(this,"_update_graph");
@@ -902,7 +902,7 @@ void ShaderGraphView::_variant_edited() {
break;
}
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Change default value");
+ ur->create_action(TTR("Change default value"));
ur->add_do_method(graph.ptr(),"default_set_value",type,edited_id,edited_def, v);
ur->add_undo_method(graph.ptr(),"default_set_value",type,edited_id,edited_def, v2);
ur->add_do_method(this,"_update_graph");
@@ -914,7 +914,7 @@ void ShaderGraphView::_variant_edited() {
if (graph->node_get_type(type,edited_id)==ShaderGraph::NODE_XFORM_CONST) {
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Change XForm Uniform");
+ ur->create_action(TTR("Change XForm Uniform"));
ur->add_do_method(graph.ptr(),"xform_const_node_set_value",type,edited_id,ped_popup->get_variant());
ur->add_undo_method(graph.ptr(),"xform_const_node_set_value",type,edited_id,graph->xform_const_node_get_value(type,edited_id));
ur->add_do_method(this,"_update_graph");
@@ -926,7 +926,7 @@ void ShaderGraphView::_variant_edited() {
if (graph->node_get_type(type,edited_id)==ShaderGraph::NODE_XFORM_INPUT) {
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Change XForm Uniform");
+ ur->create_action(TTR("Change XForm Uniform"));
ur->add_do_method(graph.ptr(),"xform_input_node_set_value",type,edited_id,ped_popup->get_variant());
ur->add_undo_method(graph.ptr(),"xform_input_node_set_value",type,edited_id,graph->xform_input_node_get_value(type,edited_id));
ur->add_do_method(this,"_update_graph");
@@ -937,7 +937,7 @@ void ShaderGraphView::_variant_edited() {
if (graph->node_get_type(type,edited_id)==ShaderGraph::NODE_TEXTURE_INPUT) {
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Change Texture Uniform");
+ ur->create_action(TTR("Change Texture Uniform"));
ur->add_do_method(graph.ptr(),"texture_input_node_set_value",type,edited_id,ped_popup->get_variant());
ur->add_undo_method(graph.ptr(),"texture_input_node_set_value",type,edited_id,graph->texture_input_node_get_value(type,edited_id));
ur->add_do_method(this,"_update_graph");
@@ -948,7 +948,7 @@ void ShaderGraphView::_variant_edited() {
if (graph->node_get_type(type,edited_id)==ShaderGraph::NODE_CUBEMAP_INPUT) {
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Change Cubemap Uniform");
+ ur->create_action(TTR("Change Cubemap Uniform"));
ur->add_do_method(graph.ptr(),"cubemap_input_node_set_value",type,edited_id,ped_popup->get_variant());
ur->add_undo_method(graph.ptr(),"cubemap_input_node_set_value",type,edited_id,graph->cubemap_input_node_get_value(type,edited_id));
ur->add_do_method(this,"_update_graph");
@@ -962,7 +962,7 @@ void ShaderGraphView::_comment_edited(int p_id,Node* p_button) {
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
TextEdit *te=p_button->cast_to<TextEdit>();
- ur->create_action("Change Comment",true);
+ ur->create_action(TTR("Change Comment"),true);
ur->add_do_method(graph.ptr(),"comment_node_set_text",type,p_id,te->get_text());
ur->add_undo_method(graph.ptr(),"comment_node_set_text",type,p_id,graph->comment_node_get_text(type,p_id));
ur->add_do_method(this,"_update_graph");
@@ -1002,9 +1002,9 @@ void ShaderGraphView::_color_ramp_changed(int p_id,Node* p_ramp) {
DVector<Color> old_colors=graph->color_ramp_node_get_colors(type,p_id);
if (old_offsets.size()!=new_offsets.size())
- ur->create_action("Add/Remove to Color Ramp");
+ ur->create_action(TTR("Add/Remove to Color Ramp"));
else
- ur->create_action("Modify Color Ramp",true);
+ ur->create_action(TTR("Modify Color Ramp"),true);
ur->add_do_method(graph.ptr(),"color_ramp_node_set_ramp",type,p_id,new_colors,new_offsets);
ur->add_undo_method(graph.ptr(),"color_ramp_node_set_ramp",type,p_id,old_colors,old_offsets);
@@ -1038,9 +1038,9 @@ void ShaderGraphView::_curve_changed(int p_id,Node* p_curve) {
DVector<Vector2> old_points=graph->curve_map_node_get_points(type,p_id);
if (old_points.size()!=new_points.size())
- ur->create_action("Add/Remove to Curve Map");
+ ur->create_action(TTR("Add/Remove to Curve Map"));
else
- ur->create_action("Modify Curve Map",true);
+ ur->create_action(TTR("Modify Curve Map"),true);
ur->add_do_method(graph.ptr(),"curve_map_node_set_points",type,p_id,new_points);
ur->add_undo_method(graph.ptr(),"curve_map_node_set_points",type,p_id,old_points);
@@ -1058,7 +1058,7 @@ void ShaderGraphView::_input_name_changed(const String& p_name, int p_id, Node *
ERR_FAIL_COND(!le);
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Change Input Name");
+ ur->create_action(TTR("Change Input Name"));
ur->add_do_method(graph.ptr(),"input_node_set_name",type,p_id,p_name);
ur->add_undo_method(graph.ptr(),"input_node_set_name",type,p_id,graph->input_node_get_name(type,p_id));
ur->add_do_method(this,"_update_graph");
@@ -1110,7 +1110,7 @@ void ShaderGraphView::_connection_request(const String& p_from, int p_from_slot,
ERR_FAIL_COND(from_idx==-1);
ERR_FAIL_COND(to_idx==-1);
- ur->create_action("Connect Graph Nodes");
+ ur->create_action(TTR("Connect Graph Nodes"));
List<ShaderGraph::Connection> conns;
@@ -1152,7 +1152,7 @@ void ShaderGraphView::_disconnection_request(const String& p_from, int p_from_sl
if (!graph->is_node_connected(type,from_idx,p_from_slot,to_idx,p_to_slot))
return; //nothing to disconnect
- ur->create_action("Disconnect Graph Nodes");
+ ur->create_action(TTR("Disconnect Graph Nodes"));
List<ShaderGraph::Connection> conns;
@@ -1170,7 +1170,7 @@ void ShaderGraphView::_disconnection_request(const String& p_from, int p_from_sl
void ShaderGraphView::_node_removed(int p_id) {
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Remove Shader Graph Node");
+ ur->create_action(TTR("Remove Shader Graph Node"));
ur->add_do_method(graph.ptr(),"node_remove",type,p_id);
ur->add_undo_method(graph.ptr(),"node_add",type,graph->node_get_type(type,p_id),p_id);
@@ -1193,7 +1193,7 @@ void ShaderGraphView::_node_removed(int p_id) {
void ShaderGraphView::_begin_node_move()
{
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Move Shader Graph Node");
+ ur->create_action(TTR("Move Shader Graph Node"));
}
void ShaderGraphView::_node_moved(const Vector2& p_from, const Vector2& p_to,int p_id) {
@@ -1235,7 +1235,7 @@ void ShaderGraphView::_duplicate_nodes_request()
return;
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Duplicate Graph Node(s)");
+ ur->create_action(TTR("Duplicate Graph Node(s)"));
ur->add_do_method(this,"_duplicate_nodes",s_id);
List<int> n_ids = graph->generate_ids(type, s_id.size());
for (List<int>::Element *E=n_ids.front();E;E=E->next())
@@ -1272,7 +1272,7 @@ void ShaderGraphView::_delete_nodes_request()
return;
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Delete Shader Graph Node(s)");
+ ur->create_action(TTR("Delete Shader Graph Node(s)"));
for (List<int>::Element *N=s_id.front();N;N=N->next()) {
ur->add_do_method(graph.ptr(),"node_remove",type,N->get());
@@ -1427,7 +1427,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // all inputs (case Shader type dependent)
case ShaderGraph::NODE_SCALAR_CONST: {
- gn->set_title("Scalar");
+ gn->set_title(TTR("Scalar"));
SpinBox *sb = memnew( SpinBox );
sb->set_min(-100000);
sb->set_max(100000);
@@ -1440,7 +1440,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; //scalar constant
case ShaderGraph::NODE_VEC_CONST: {
- gn->set_title("Vector");
+ gn->set_title(TTR("Vector"));
Array v3p(true);
for(int i=0;i<3;i++) {
HBoxContainer *hbc = memnew( HBoxContainer );
@@ -1469,11 +1469,11 @@ void ShaderGraphView::_create_node(int p_id) {
cpb->connect("color_changed",this,"_rgb_const_changed",varray(p_id));
gn->add_child(cpb);
Label *l = memnew( Label );
- l->set_text("RGB");
+ l->set_text(TTR("RGB"));
l->set_align(Label::ALIGN_RIGHT);
gn->add_child(l);
l = memnew( Label );
- l->set_text("Alpha");
+ l->set_text(TTR("Alpha"));
l->set_align(Label::ALIGN_RIGHT);
gn->add_child(l);
@@ -1482,7 +1482,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; //rgb constant (shows a color picker instead)
case ShaderGraph::NODE_XFORM_CONST: {
- gn->set_title("XForm");
+ gn->set_title(TTR("XForm"));
ToolButton *edit = memnew( ToolButton );
edit->set_text("edit..");
edit->connect("pressed",this,"_xform_const_changed",varray(p_id,edit));
@@ -1492,7 +1492,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // 4x4 matrix constant
case ShaderGraph::NODE_TIME: {
- gn->set_title("Time");
+ gn->set_title(TTR("Time"));
Label *l = memnew( Label );
l->set_text("(s)");
l->set_align(Label::ALIGN_RIGHT);
@@ -1502,34 +1502,34 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // time in seconds
case ShaderGraph::NODE_SCREEN_TEX: {
- gn->set_title("ScreenTex");
+ gn->set_title(TTR("ScreenTex"));
HBoxContainer *hbc = memnew( HBoxContainer );
hbc->add_constant_override("separation",0);
if (!graph->is_slot_connected(type,p_id,0)) {
Vector3 v = graph->default_get_value(type, p_id, 0);
- hbc->add_child(make_editor("UV: " + v,gn,p_id,0,Variant::VECTOR3));
+ hbc->add_child(make_editor(TTR("UV: ") + v,gn,p_id,0,Variant::VECTOR3));
} else {
- hbc->add_child(make_label("UV",Variant::VECTOR3));
+ hbc->add_child(make_label(TTR("UV"),Variant::VECTOR3));
}
hbc->add_spacer();
- hbc->add_child( memnew(Label("RGB")));
+ hbc->add_child( memnew(Label(TTR("RGB"))));
gn->add_child(hbc);
gn->set_slot(0,true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC],true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC]);
} break; // screen texture sampler (takes UV) (only usable in fragment case Shader)
case ShaderGraph::NODE_SCALAR_OP: {
- gn->set_title("ScalarOp");
+ gn->set_title(TTR("ScalarOp"));
static const char* op_name[ShaderGraph::SCALAR_MAX_OP]={
- "Add",
- "Sub",
- "Mul",
- "Div",
- "Mod",
- "Pow",
- "Max",
- "Min",
- "Atan2"
+ ("Add"),
+ ("Sub"),
+ ("Mul"),
+ ("Div"),
+ ("Mod"),
+ ("Pow"),
+ ("Max"),
+ ("Min"),
+ ("Atan2")
};
OptionButton *ob = memnew( OptionButton );
@@ -1567,17 +1567,17 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // scalar vs scalar op (mul: { } break; add: { } break; div: { } break; etc)
case ShaderGraph::NODE_VEC_OP: {
- gn->set_title("VecOp");
+ gn->set_title(TTR("VecOp"));
static const char* op_name[ShaderGraph::VEC_MAX_OP]={
- "Add",
- "Sub",
- "Mul",
- "Div",
- "Mod",
- "Pow",
- "Max",
- "Min",
- "Cross"
+ ("Add"),
+ ("Sub"),
+ ("Mul"),
+ ("Div"),
+ ("Mod"),
+ ("Pow"),
+ ("Max"),
+ ("Min"),
+ ("Cross")
};
OptionButton *ob = memnew( OptionButton );
@@ -1615,11 +1615,11 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // vec3 vs vec3 op (mul: { } break;ad: { } break;div: { } break;crossprod: { } break;etc)
case ShaderGraph::NODE_VEC_SCALAR_OP: {
- gn->set_title("VecScalarOp");
+ gn->set_title(TTR("VecScalarOp"));
static const char* op_name[ShaderGraph::VEC_SCALAR_MAX_OP]={
- "Mul",
- "Div",
- "Pow",
+ ("Mul"),
+ ("Div"),
+ ("Pow"),
};
OptionButton *ob = memnew( OptionButton );
@@ -1657,17 +1657,17 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // vec3 vs scalar op (mul: { } break; add: { } break; div: { } break; etc)
case ShaderGraph::NODE_RGB_OP: {
- gn->set_title("RGB Op");
+ gn->set_title(TTR("RGB Op"));
static const char* op_name[ShaderGraph::RGB_MAX_OP]={
- "Screen",
- "Difference",
- "Darken",
- "Lighten",
- "Overlay",
- "Dodge",
- "Burn",
- "SoftLight",
- "HardLight"
+ ("Screen"),
+ ("Difference"),
+ ("Darken"),
+ ("Lighten"),
+ ("Overlay"),
+ ("Dodge"),
+ ("Burn"),
+ ("SoftLight"),
+ ("HardLight")
};
OptionButton *ob = memnew( OptionButton );
@@ -1702,7 +1702,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // vec3 vs vec3 rgb op (with scalar amount): { } break; like brighten: { } break; darken: { } break; burn: { } break; dodge: { } break; multiply: { } break; etc.
case ShaderGraph::NODE_XFORM_MULT: {
- gn->set_title("XFMult");
+ gn->set_title(TTR("XFMult"));
HBoxContainer *hbc = memnew( HBoxContainer );
if (graph->is_slot_connected(type, p_id, 0)) {
hbc->add_child(make_label("a",Variant::TRANSFORM));
@@ -1725,9 +1725,9 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // mat4 x mat4
case ShaderGraph::NODE_XFORM_VEC_MULT: {
- gn->set_title("XFVecMult");
+ gn->set_title(TTR("XFVecMult"));
- CheckBox *button = memnew (CheckBox("RotOnly"));
+ CheckBox *button = memnew (CheckBox(TTR("RotOnly")));
button->set_pressed(graph->xform_vec_mult_node_get_no_translation(type,p_id));
button->connect("toggled",this,"_xform_inv_rev_changed",varray(p_id));
@@ -1758,10 +1758,10 @@ void ShaderGraphView::_create_node(int p_id) {
} break;
case ShaderGraph::NODE_XFORM_VEC_INV_MULT: {
- gn->set_title("XFVecInvMult");
+ gn->set_title(TTR("XFVecInvMult"));
- CheckBox *button = memnew( CheckBox("RotOnly"));
+ CheckBox *button = memnew( CheckBox(TTR("RotOnly")));
button->set_pressed(graph->xform_vec_mult_node_get_no_translation(type,p_id));
button->connect("toggled",this,"_xform_inv_rev_changed",varray(p_id));
@@ -1793,28 +1793,28 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // mat4 x vec3 inverse mult (with no-translation option)
case ShaderGraph::NODE_SCALAR_FUNC: {
- gn->set_title("ScalarFunc");
+ gn->set_title(TTR("ScalarFunc"));
static const char* func_name[ShaderGraph::SCALAR_MAX_FUNC]={
- "Sin",
- "Cos",
- "Tan",
- "ASin",
- "ACos",
- "ATan",
- "SinH",
- "CosH",
- "TanH",
- "Log",
- "Exp",
- "Sqrt",
- "Abs",
- "Sign",
- "Floor",
- "Round",
- "Ceil",
- "Frac",
- "Satr",
- "Neg"
+ ("Sin"),
+ ("Cos"),
+ ("Tan"),
+ ("ASin"),
+ ("ACos"),
+ ("ATan"),
+ ("SinH"),
+ ("CosH"),
+ ("TanH"),
+ ("Log"),
+ ("Exp"),
+ ("Sqrt"),
+ ("Abs"),
+ ("Sign"),
+ ("Floor"),
+ ("Round"),
+ ("Ceil"),
+ ("Frac"),
+ ("Satr"),
+ ("Neg")
};
OptionButton *ob = memnew( OptionButton );
@@ -1846,14 +1846,14 @@ void ShaderGraphView::_create_node(int p_id) {
- gn->set_title("VecFunc");
+ gn->set_title(TTR("VecFunc"));
static const char* func_name[ShaderGraph::VEC_MAX_FUNC]={
- "Normalize",
- "Saturate",
- "Negate",
- "Reciprocal",
- "RGB to HSV",
- "HSV to RGB",
+ ("Normalize"),
+ ("Saturate"),
+ ("Negate"),
+ ("Reciprocal"),
+ ("RGB to HSV"),
+ ("HSV to RGB"),
};
OptionButton *ob = memnew( OptionButton );
@@ -1882,7 +1882,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // vector function (normalize: { } break; negate: { } break; reciprocal: { } break; rgb2hsv: { } break; hsv2rgb: { } break; etc: { } break; etc)
case ShaderGraph::NODE_VEC_LEN: {
- gn->set_title("VecLength");
+ gn->set_title(TTR("VecLength"));
HBoxContainer *hbc = memnew( HBoxContainer );
if (graph->is_slot_connected(type, p_id, 0)) {
hbc->add_child(make_label("in", Variant::VECTOR3));
@@ -1899,7 +1899,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // vec3 length
case ShaderGraph::NODE_DOT_PROD: {
- gn->set_title("DotProduct");
+ gn->set_title(TTR("DotProduct"));
HBoxContainer *hbc = memnew( HBoxContainer );
hbc->add_constant_override("separation",0);
if (graph->is_slot_connected(type, p_id, 0)) {
@@ -1924,7 +1924,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // vec3 . vec3 (dot product -> scalar output)
case ShaderGraph::NODE_VEC_TO_SCALAR: {
- gn->set_title("Vec2Scalar");
+ gn->set_title(TTR("Vec2Scalar"));
HBoxContainer *hbc = memnew( HBoxContainer );
hbc->add_constant_override("separation",0);
if (graph->is_slot_connected(type, p_id, 0)) {
@@ -1955,7 +1955,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // 1 vec3 input: { } break; 3 scalar outputs
case ShaderGraph::NODE_SCALAR_TO_VEC: {
- gn->set_title("Scalar2Vec");
+ gn->set_title(TTR("Scalar2Vec"));
HBoxContainer *hbc = memnew( HBoxContainer );
if (graph->is_slot_connected(type, p_id, 0)) {
hbc->add_child(make_label("x", Variant::REAL));
@@ -1986,7 +1986,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // 3 scalar input: { } break; 1 vec3 output
case ShaderGraph::NODE_VEC_TO_XFORM: {
- gn->set_title("Vec2XForm");
+ gn->set_title(TTR("Vec2XForm"));
HBoxContainer *hbc = memnew( HBoxContainer );
hbc->add_constant_override("separation",0);
if (graph->is_slot_connected(type, p_id, 0)) {
@@ -2025,7 +2025,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // 3 vec input: { } break; 1 xform output
case ShaderGraph::NODE_XFORM_TO_VEC: {
- gn->set_title("XForm2Vec");
+ gn->set_title(TTR("XForm2Vec"));
HBoxContainer *hbc = memnew( HBoxContainer );
hbc->add_constant_override("separation",0);
@@ -2057,7 +2057,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // 3 vec input: { } break; 1 xform output
case ShaderGraph::NODE_SCALAR_INTERP: {
- gn->set_title("ScalarInterp");
+ gn->set_title(TTR("ScalarInterp"));
HBoxContainer *hbc = memnew( HBoxContainer );
hbc->add_constant_override("separation",0);
if (graph->is_slot_connected(type, p_id, 0)) {
@@ -2090,7 +2090,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // scalar interpolation (with optional curve)
case ShaderGraph::NODE_VEC_INTERP: {
- gn->set_title("VecInterp");
+ gn->set_title(TTR("VecInterp"));
HBoxContainer *hbc = memnew( HBoxContainer );
if (graph->is_slot_connected(type, p_id, 0)) {
hbc->add_child(make_label("a", Variant::VECTOR3));
@@ -2174,7 +2174,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // scalar interpolation (with optional curve)
case ShaderGraph::NODE_CURVE_MAP: {
- gn->set_title("CurveMap");
+ gn->set_title(TTR("CurveMap"));
GraphCurveMapEdit * map = memnew( GraphCurveMapEdit );
DVector<Vector2> points = graph->curve_map_node_get_points(type,p_id);
@@ -2221,7 +2221,7 @@ void ShaderGraphView::_create_node(int p_id) {
case ShaderGraph::NODE_SCALAR_INPUT: {
- gn->set_title("ScalarUniform");
+ gn->set_title(TTR("ScalarUniform"));
LineEdit *le = memnew( LineEdit );
gn->add_child(le);
le->set_text(graph->input_node_get_name(type,p_id));
@@ -2238,7 +2238,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // scalar uniform (assignable in material)
case ShaderGraph::NODE_VEC_INPUT: {
- gn->set_title("VectorUniform");
+ gn->set_title(TTR("VectorUniform"));
LineEdit *le = memnew( LineEdit );
gn->add_child(le);
le->set_text(graph->input_node_get_name(type,p_id));
@@ -2265,7 +2265,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // vec3 uniform (assignable in material)
case ShaderGraph::NODE_RGB_INPUT: {
- gn->set_title("ColorUniform");
+ gn->set_title(TTR("ColorUniform"));
LineEdit *le = memnew( LineEdit );
gn->add_child(le);
le->set_text(graph->input_node_get_name(type,p_id));
@@ -2275,11 +2275,11 @@ void ShaderGraphView::_create_node(int p_id) {
cpb->connect("color_changed",this,"_rgb_input_changed",varray(p_id));
gn->add_child(cpb);
Label *l = memnew( Label );
- l->set_text("RGB");
+ l->set_text(TTR("RGB"));
l->set_align(Label::ALIGN_RIGHT);
gn->add_child(l);
l = memnew( Label );
- l->set_text("Alpha");
+ l->set_text(TTR("Alpha"));
l->set_align(Label::ALIGN_RIGHT);
gn->add_child(l);
@@ -2289,7 +2289,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // color uniform (assignable in material)
case ShaderGraph::NODE_XFORM_INPUT: {
- gn->set_title("XFUniform");
+ gn->set_title(TTR("XFUniform"));
LineEdit *le = memnew( LineEdit );
gn->add_child(le);
le->set_text(graph->input_node_get_name(type,p_id));
@@ -2303,7 +2303,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // mat4 uniform (assignable in material)
case ShaderGraph::NODE_TEXTURE_INPUT: {
- gn->set_title("TexUniform");
+ gn->set_title(TTR("TexUniform"));
LineEdit *le = memnew( LineEdit );
gn->add_child(le);
le->set_text(graph->input_node_get_name(type,p_id));
@@ -2321,18 +2321,18 @@ void ShaderGraphView::_create_node(int p_id) {
HBoxContainer *hbc = memnew( HBoxContainer );
hbc->add_constant_override("separation",0);
if (graph->is_slot_connected(type, p_id, 0)) {
- hbc->add_child(make_label("UV", Variant::VECTOR3));
+ hbc->add_child(make_label(TTR("UV"), Variant::VECTOR3));
} else {
Vector3 v = graph->default_get_value(type,p_id,0);
- hbc->add_child(make_editor(String("UV: ")+v,gn,p_id,0,Variant::VECTOR3));
+ hbc->add_child(make_editor(String(TTR("UV: "))+v,gn,p_id,0,Variant::VECTOR3));
}
hbc->add_spacer();
- Label *l=memnew(Label("RGB"));
+ Label *l=memnew(Label(TTR("RGB")));
l->set_align(Label::ALIGN_RIGHT);
hbc->add_child(l);
gn->add_child(hbc);
l = memnew( Label );
- l->set_text("Alpha");
+ l->set_text(TTR("Alpha"));
l->set_align(Label::ALIGN_RIGHT);
gn->add_child(l);
@@ -2342,7 +2342,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // texture input (assignable in material)
case ShaderGraph::NODE_CUBEMAP_INPUT: {
- gn->set_title("TexUniform");
+ gn->set_title(TTR("TexUniform"));
LineEdit *le = memnew( LineEdit );
gn->add_child(le);
le->set_text(graph->input_node_get_name(type,p_id));
@@ -2357,18 +2357,18 @@ void ShaderGraphView::_create_node(int p_id) {
HBoxContainer *hbc = memnew( HBoxContainer );
hbc->add_constant_override("separation",0);
if (graph->is_slot_connected(type, p_id, 0)) {
- hbc->add_child(make_label("UV", Variant::VECTOR3));
+ hbc->add_child(make_label(TTR("UV"), Variant::VECTOR3));
} else {
Vector3 v = graph->default_get_value(type,p_id,0);
- hbc->add_child(make_editor(String("UV: ")+v,gn,p_id,0,Variant::VECTOR3));
+ hbc->add_child(make_editor(String(TTR("UV: "))+v,gn,p_id,0,Variant::VECTOR3));
}
hbc->add_spacer();
- Label *l=memnew(Label("RGB"));
+ Label *l=memnew(Label(TTR("RGB")));
l->set_align(Label::ALIGN_RIGHT);
hbc->add_child(l);
gn->add_child(hbc);
l = memnew( Label );
- l->set_text("Alpha");
+ l->set_text(TTR("Alpha"));
l->set_align(Label::ALIGN_RIGHT);
gn->add_child(l);
@@ -2378,22 +2378,22 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // cubemap input (assignable in material)
case ShaderGraph::NODE_DEFAULT_TEXTURE: {
- gn->set_title("CanvasItemTex");
+ gn->set_title(TTR("CanvasItemTex"));
HBoxContainer *hbc = memnew( HBoxContainer );
hbc->add_constant_override("separation",0);
if (graph->is_slot_connected(type, p_id, 0)) {
- hbc->add_child(make_label("UV", Variant::VECTOR3));
+ hbc->add_child(make_label(TTR("UV"), Variant::VECTOR3));
} else {
Vector3 v = graph->default_get_value(type,p_id,0);
- hbc->add_child(make_editor(String("UV: ")+v,gn,p_id,0,Variant::VECTOR3));
+ hbc->add_child(make_editor(String(TTR("UV: "))+v,gn,p_id,0,Variant::VECTOR3));
}
hbc->add_spacer();
- Label *l=memnew(Label("RGB"));
+ Label *l=memnew(Label(TTR("RGB")));
l->set_align(Label::ALIGN_RIGHT);
hbc->add_child(l);
gn->add_child(hbc);
l = memnew( Label );
- l->set_text("Alpha");
+ l->set_text(TTR("Alpha"));
l->set_align(Label::ALIGN_RIGHT);
gn->add_child(l);
@@ -2404,7 +2404,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // screen texture sampler (takes UV) (only usable in fragment case Shader)
case ShaderGraph::NODE_OUTPUT: {
- gn->set_title("Output");
+ gn->set_title(TTR("Output"));
gn->set_show_close_button(false);
List<ShaderGraph::SlotInfo> si;
@@ -2412,22 +2412,22 @@ void ShaderGraphView::_create_node(int p_id) {
Array colors;
colors.push_back("Color");
- colors.push_back("LightColor");
+ colors.push_back(TTR("LightColor"));
colors.push_back("Light");
- colors.push_back("Diffuse");
- colors.push_back("Specular");
- colors.push_back("Emmision");
+ colors.push_back(TTR("Diffuse"));
+ colors.push_back(TTR("Specular"));
+ colors.push_back(TTR("Emmision"));
Array reals;
- reals.push_back("Alpha");
- reals.push_back("DiffuseAlpha");
- reals.push_back("NormalMapDepth");
- reals.push_back("SpecExp");
- reals.push_back("Glow");
- reals.push_back("ShadeParam");
- reals.push_back("SpecularExp");
- reals.push_back("LightAlpha");
- reals.push_back("PointSize");
- reals.push_back("Discard");
+ reals.push_back(TTR("Alpha"));
+ reals.push_back(TTR("DiffuseAlpha"));
+ reals.push_back(TTR("NormalMapDepth"));
+ reals.push_back(TTR("SpecExp"));
+ reals.push_back(TTR("Glow"));
+ reals.push_back(TTR("ShadeParam"));
+ reals.push_back(TTR("SpecularExp"));
+ reals.push_back(TTR("LightAlpha"));
+ reals.push_back(TTR("PointSize"));
+ reals.push_back(TTR("Discard"));
int idx=0;
for (List<ShaderGraph::SlotInfo>::Element *E=si.front();E;E=E->next()) {
@@ -2448,7 +2448,7 @@ void ShaderGraphView::_create_node(int p_id) {
} break; // output (case Shader type dependent)
case ShaderGraph::NODE_COMMENT: {
- gn->set_title("Comment");
+ gn->set_title(TTR("Comment"));
TextEdit *te = memnew(TextEdit);
te->set_custom_minimum_size(Size2(100,100));
gn->add_child(te);
@@ -2512,8 +2512,8 @@ void ShaderGraphView::_sg_updated() {
return;
switch(graph->get_graph_error(type)) {
case ShaderGraph::GRAPH_OK: status->set_text(""); break;
- case ShaderGraph::GRAPH_ERROR_CYCLIC: status->set_text("Error: Cyclic Connection Link"); break;
- case ShaderGraph::GRAPH_ERROR_MISSING_CONNECTIONS: status->set_text("Error: Missing Input Connections"); break;
+ case ShaderGraph::GRAPH_ERROR_CYCLIC: status->set_text(TTR("Error: Cyclic Connection Link")); break;
+ case ShaderGraph::GRAPH_ERROR_MISSING_CONNECTIONS: status->set_text(TTR("Error: Missing Input Connections")); break;
}
}
@@ -2573,7 +2573,7 @@ void ShaderGraphView::add_node(int p_type, const Vector2 &location) {
break;
}
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- ur->create_action("Add Shader Graph Node");
+ ur->create_action(TTR("Add Shader Graph Node"));
ur->add_do_method(graph.ptr(),"node_add",type,p_type,newid);
ur->add_do_method(graph.ptr(),"node_set_pos",type,newid,init_ofs);
ur->add_undo_method(graph.ptr(),"node_remove",type,newid);
@@ -2707,41 +2707,41 @@ void ShaderGraphEditor::_bind_methods() {
const char* ShaderGraphEditor::node_names[ShaderGraph::NODE_TYPE_MAX]={
- "GraphInput:Input", // all inputs (shader type dependent)
- "GraphScalar:Scalar Constant", //scalar constant
- "GraphVector:Vector Constant", //vec3 constant
- "GraphRgb:RGB Constant", //rgb constant (shows a color picker instead)
- "GraphXform:XForm Constant", // 4x4 matrix constant
- "GraphTime:Time:", // time in seconds
- "GraphTexscreen:Screen Sample", // screen texture sampler (takes uv) (only usable in fragment shader)
- "GraphScalarOp:Scalar Operator", // scalar vs scalar op (mul", add", div", etc)
- "GraphVecOp:Vector Operator", // vec3 vs vec3 op (mul",ad",div",crossprod",etc)
- "GraphVecScalarOp:Scalar+Vector Operator", // vec3 vs scalar op (mul", add", div", etc)
- "GraphRgbOp:RGB Operator:", // vec3 vs vec3 rgb op (with scalar amount)", like brighten", darken", burn", dodge", multiply", etc.
- "GraphXformMult:XForm Multiply", // mat4 x mat4
- "GraphXformVecMult:XForm+Vector Multiply", // mat4 x vec3 mult (with no-translation option)
- "GraphXformVecImult:Form+Vector InvMultiply:", // mat4 x vec3 inverse mult (with no-translation option)
- "GraphXformScalarFunc:Scalar Function", // scalar function (sin", cos", etc)
- "GraphXformVecFunc:Vector Function", // vector function (normalize", negate", reciprocal", rgb2hsv", hsv2rgb", etc", etc)
- "GraphVecLength:Vector Length", // vec3 length
- "GraphVecDp:Dot Product:", // vec3 . vec3 (dot product -> scalar output)
- "GraphVecToScalars:Vector -> Scalars", // 1 vec3 input", 3 scalar outputs
- "GraphScalarsToVec:Scalars -> Vector", // 3 scalar input", 1 vec3 output
- "GraphXformToVecs:XForm -> Vectors", // 3 vec input", 1 xform output
- "GraphVecsToXform:Vectors -> XForm:", // 3 vec input", 1 xform output
- "GraphScalarInterp:Scalar Interpolate", // scalar interpolation (with optional curve)
- "GraphVecInterp:Vector Interpolate:", // vec3 interpolation (with optional curve)
- "GraphColorRamp:Color Ramp", // vec3 interpolation (with optional curve)
- "GraphCurveMap:Curve Remap:", // vec3 interpolation (with optional curve)
- "GraphScalarUniform:Scalar Uniform", // scalar uniform (assignable in material)
- "GraphVectorUniform:Vector Uniform", // vec3 uniform (assignable in material)
- "GraphRgbUniform:RGB Uniform", // color uniform (assignable in material)
- "GraphXformUniform:XForm Uniform", // mat4 uniform (assignable in material)
- "GraphTextureUniform:Texture Uniform", // texture input (assignable in material)
- "GraphCubeUniform:CubeMap Uniform:", // cubemap input (assignable in material)
- "GraphDefaultTexture:CanvasItem Texture:", // cubemap input (assignable in material)
- "Output", // output (shader type dependent)
- "GraphComment:Comment", // comment
+ ("GraphInput:Input"), // all inputs (shader type dependent)
+ ("GraphScalar:Scalar Constant"), //scalar constant
+ ("GraphVector:Vector Constant"), //vec3 constant
+ ("GraphRgb:RGB Constant"), //rgb constant (shows a color picker instead)
+ ("GraphXform:XForm Constant"), // 4x4 matrix constant
+ ("GraphTime:Time:"), // time in seconds
+ ("GraphTexscreen:Screen Sample"), // screen texture sampler (takes uv) (only usable in fragment shader)
+ ("GraphScalarOp:Scalar Operator"), // scalar vs scalar op (mul", add", div", etc)
+ ("GraphVecOp:Vector Operator"), // vec3 vs vec3 op (mul",ad",div",crossprod",etc)
+ ("GraphVecScalarOp:Scalar+Vector Operator"), // vec3 vs scalar op (mul", add", div", etc)
+ ("GraphRgbOp:RGB Operator:"), // vec3 vs vec3 rgb op (with scalar amount)", like brighten", darken", burn", dodge", multiply", etc.
+ ("GraphXformMult:XForm Multiply"), // mat4 x mat4
+ ("GraphXformVecMult:XForm+Vector Multiply"), // mat4 x vec3 mult (with no-translation option)
+ ("GraphXformVecImult:Form+Vector InvMultiply:"), // mat4 x vec3 inverse mult (with no-translation option)
+ ("GraphXformScalarFunc:Scalar Function"), // scalar function (sin", cos", etc)
+ ("GraphXformVecFunc:Vector Function"), // vector function (normalize", negate", reciprocal", rgb2hsv", hsv2rgb", etc", etc)
+ ("GraphVecLength:Vector Length"), // vec3 length
+ ("GraphVecDp:Dot Product:"), // vec3 . vec3 (dot product -> scalar output)
+ ("GraphVecToScalars:Vector -> Scalars"), // 1 vec3 input", 3 scalar outputs
+ ("GraphScalarsToVec:Scalars -> Vector"), // 3 scalar input", 1 vec3 output
+ ("GraphXformToVecs:XForm -> Vectors"), // 3 vec input", 1 xform output
+ ("GraphVecsToXform:Vectors -> XForm:"), // 3 vec input", 1 xform output
+ ("GraphScalarInterp:Scalar Interpolate"), // scalar interpolation (with optional curve)
+ ("GraphVecInterp:Vector Interpolate:"), // vec3 interpolation (with optional curve)
+ ("GraphColorRamp:Color Ramp"), // vec3 interpolation (with optional curve)
+ ("GraphCurveMap:Curve Remap:"), // vec3 interpolation (with optional curve)
+ ("GraphScalarUniform:Scalar Uniform"), // scalar uniform (assignable in material)
+ ("GraphVectorUniform:Vector Uniform"), // vec3 uniform (assignable in material)
+ ("GraphRgbUniform:RGB Uniform"), // color uniform (assignable in material)
+ ("GraphXformUniform:XForm Uniform"), // mat4 uniform (assignable in material)
+ ("GraphTextureUniform:Texture Uniform"), // texture input (assignable in material)
+ ("GraphCubeUniform:CubeMap Uniform:"), // cubemap input (assignable in material)
+ ("GraphDefaultTexture:CanvasItem Texture:"), // cubemap input (assignable in material)
+ ("Output"), // output (shader type dependent)
+ ("GraphComment:Comment"), // comment
};
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp
index c4d3f7282e..331cf6309c 100644
--- a/tools/editor/plugins/spatial_editor_plugin.cpp
+++ b/tools/editor/plugins/spatial_editor_plugin.cpp
@@ -561,7 +561,7 @@ void SpatialEditorViewport::_select_region() {
void SpatialEditorViewport::_update_name() {
- String ortho = orthogonal?"Orthogonal":"Perspective";
+ String ortho = orthogonal?TTR("Orthogonal"):"Perspective";
if (name!="")
view_menu->set_text("[ "+name+" "+ortho+" ]");
@@ -984,7 +984,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
}
surface->update();
//VisualServer::get_singleton()->poly_clear(indicators);
- set_message("Transform Aborted.",3);
+ set_message(TTR("Transform Aborted."),3);
}
} break;
case BUTTON_MIDDLE: {
@@ -996,26 +996,26 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
case TRANSFORM_VIEW: {
_edit.plane=TRANSFORM_X_AXIS;
- set_message("View Plane Transform.",2);
+ set_message(TTR("View Plane Transform."),2);
name="";
_update_name();
} break;
case TRANSFORM_X_AXIS: {
_edit.plane=TRANSFORM_Y_AXIS;
- set_message("X-Axis Transform.",2);
+ set_message(TTR("X-Axis Transform."),2);
} break;
case TRANSFORM_Y_AXIS: {
_edit.plane=TRANSFORM_Z_AXIS;
- set_message("Y-Axis Transform.",2);
+ set_message(TTR("Y-Axis Transform."),2);
} break;
case TRANSFORM_Z_AXIS: {
_edit.plane=TRANSFORM_VIEW;
- set_message("Z-Axis Transform.",2);
+ set_message(TTR("Z-Axis Transform."),2);
} break;
}
@@ -1156,7 +1156,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
_edit.gizmo_handle=gizmo_handle;
//_edit.gizmo_initial_pos=seg->get_handle_pos(gizmo_handle);
_edit.gizmo_initial_value=seg->get_handle_value(gizmo_handle);
- //print_line("GIZMO: "+itos(gizmo_handle)+" FROMPOS: "+_edit.orig_gizmo_pos);
+ //print_line(TTR("GIZMO: ")+itos(gizmo_handle)+" FROMPOS: "+_edit.orig_gizmo_pos);
break;
}
@@ -1353,7 +1353,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
scale = Math::stepify(scale,spatial_editor->get_scale_snap());
}
- set_message("Scaling to "+String::num(scale,1)+"%.");
+ set_message(TTR("Scaling to ")+String::num(scale,1)+"%.");
scale/=100.0;
Transform r;
@@ -1431,7 +1431,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
motion.snap(snap);
}
- //set_message("Translating: "+motion);
+ //set_message(TTR("Translating: ")+motion);
List<Node*> &selection = editor_selection->get_selected_node_list();
@@ -1493,13 +1493,13 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
if (snap) {
angle=Math::rad2deg(angle)+snap*0.5; //else it wont reach +180
angle-=Math::fmod(angle,snap);
- set_message("Rotating "+rtos(angle)+" degrees.");
+ set_message(TTR("Rotating ")+rtos(angle)+" degrees.");
angle=Math::deg2rad(angle);
} else
- set_message("Rotating "+rtos(Math::rad2deg(angle))+" degrees.");
+ set_message(TTR("Rotating ")+rtos(Math::rad2deg(angle))+" degrees.");
} else {
- set_message("Rotating "+rtos(Math::rad2deg(angle))+" degrees.");
+ set_message(TTR("Rotating ")+rtos(Math::rad2deg(angle))+" degrees.");
}
@@ -1681,14 +1681,14 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
cursor.y_rot=0;
if (k.mod.shift) {
cursor.x_rot=-Math_PI/2.0;
- set_message("Bottom View.",2);
- name="Bottom";
+ set_message(TTR("Bottom View."),2);
+ name=TTR("Bottom");
_update_name();
} else {
cursor.x_rot=Math_PI/2.0;
- set_message("Top View.",2);
- name="Top";
+ set_message(TTR("Top View."),2);
+ name=TTR("Top");
_update_name();
}
} break;
@@ -1700,14 +1700,14 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
cursor.x_rot=0;
if (k.mod.shift) {
cursor.y_rot=Math_PI;
- set_message("Rear View.",2);
- name="Rear";
+ set_message(TTR("Rear View."),2);
+ name=TTR("Rear");
_update_name();
} else {
cursor.y_rot=0;
- set_message("Front View.",2);
- name="Front";
+ set_message(TTR("Front View."),2);
+ name=TTR("Front");
_update_name();
}
@@ -1720,13 +1720,13 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
cursor.x_rot=0;
if (k.mod.shift) {
cursor.y_rot=Math_PI/2.0;
- set_message("Left View.",2);
- name="Left";
+ set_message(TTR("Left View."),2);
+ name=TTR("Left");
_update_name();
} else {
cursor.y_rot=-Math_PI/2.0;
- set_message("Right View.",2);
- name="Right";
+ set_message(TTR("Right View."),2);
+ name=TTR("Right");
_update_name();
}
@@ -1749,7 +1749,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
break;
if (!AnimationPlayerEditor::singleton->get_key_editor()->has_keying()) {
- set_message("Keying is disabled (no key inserted).");
+ set_message(TTR("Keying is disabled (no key inserted)."));
break;
}
@@ -1765,7 +1765,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
}
- set_message("Animation Key Inserted.");
+ set_message(TTR("Animation Key Inserted."));
@@ -1967,7 +1967,7 @@ void SpatialEditorViewport::_draw() {
if (surface->has_focus()) {
Size2 size = surface->get_size();
Rect2 r =Rect2(Point2(),size);
- get_stylebox("EditorFocus","EditorStyles")->draw(surface->get_canvas_item(),r);
+ get_stylebox(TTR("EditorFocus"),"EditorStyles")->draw(surface->get_canvas_item(),r);
}
@@ -2041,14 +2041,14 @@ void SpatialEditorViewport::_menu_option(int p_option) {
cursor.x_rot=Math_PI/2.0;
cursor.y_rot=0;
- name="Top";
+ name=TTR("Top");
_update_name();
} break;
case VIEW_BOTTOM: {
cursor.x_rot=-Math_PI/2.0;
cursor.y_rot=0;
- name="Bottom";
+ name=TTR("Bottom");
_update_name();
} break;
@@ -2056,7 +2056,7 @@ void SpatialEditorViewport::_menu_option(int p_option) {
cursor.y_rot=Math_PI/2.0;
cursor.x_rot=0;
- name="Left";
+ name=TTR("Left");
_update_name();
} break;
@@ -2064,7 +2064,7 @@ void SpatialEditorViewport::_menu_option(int p_option) {
cursor.y_rot=-Math_PI/2.0;
cursor.x_rot=0;
- name="Right";
+ name=TTR("Right");
_update_name();
} break;
@@ -2072,7 +2072,7 @@ void SpatialEditorViewport::_menu_option(int p_option) {
cursor.y_rot=0;
cursor.x_rot=0;
- name="Front";
+ name=TTR("Front");
_update_name();
} break;
@@ -2080,7 +2080,7 @@ void SpatialEditorViewport::_menu_option(int p_option) {
cursor.y_rot=Math_PI;
cursor.x_rot=0;
- name="Rear";
+ name=TTR("Rear");
_update_name();
} break;
@@ -2123,7 +2123,7 @@ void SpatialEditorViewport::_menu_option(int p_option) {
List<Node*> &selection = editor_selection->get_selected_node_list();
- undo_redo->create_action("Align with view");
+ undo_redo->create_action(TTR("Align with view"));
for(List<Node*>::Element *E=selection.front();E;E=E->next()) {
Spatial *sp = E->get()->cast_to<Spatial>();
@@ -2420,7 +2420,7 @@ void SpatialEditorViewport::reset() {
message_time=0;
message="";
last_message="";
- name="Top";
+ name=TTR("Top");
cursor.x_rot=0;
cursor.y_rot=0;
@@ -2471,28 +2471,28 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
view_menu->set_pos( Point2(4,4));
view_menu->set_self_opacity(0.5);
- view_menu->get_popup()->add_item("Top (Num7)",VIEW_TOP);
- view_menu->get_popup()->add_item("Bottom (Shift+Num7)",VIEW_BOTTOM);
- view_menu->get_popup()->add_item("Left (Num3)",VIEW_LEFT);
- view_menu->get_popup()->add_item("Right (Shift+Num3)",VIEW_RIGHT);
- view_menu->get_popup()->add_item("Front (Num1)",VIEW_FRONT);
- view_menu->get_popup()->add_item("Rear (Shift+Num1)",VIEW_REAR);
+ view_menu->get_popup()->add_item(TTR("Top (Num7)"),VIEW_TOP);
+ view_menu->get_popup()->add_item(TTR("Bottom (Shift+Num7)"),VIEW_BOTTOM);
+ view_menu->get_popup()->add_item(TTR("Left (Num3)"),VIEW_LEFT);
+ view_menu->get_popup()->add_item(TTR("Right (Shift+Num3)"),VIEW_RIGHT);
+ view_menu->get_popup()->add_item(TTR("Front (Num1)"),VIEW_FRONT);
+ view_menu->get_popup()->add_item(TTR("Rear (Shift+Num1)"),VIEW_REAR);
view_menu->get_popup()->add_separator();
- view_menu->get_popup()->add_check_item("Perspective (Num5)",VIEW_PERSPECTIVE);
- view_menu->get_popup()->add_check_item("Orthogonal (Num5)",VIEW_ORTHOGONAL);
+ view_menu->get_popup()->add_check_item(TTR("Perspective (Num5)"),VIEW_PERSPECTIVE);
+ view_menu->get_popup()->add_check_item(TTR("Orthogonal (Num5)"),VIEW_ORTHOGONAL);
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_PERSPECTIVE),true);
view_menu->get_popup()->add_separator();
view_menu->get_popup()->add_check_item("Environment",VIEW_ENVIRONMENT);
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(VIEW_ENVIRONMENT),true);
view_menu->get_popup()->add_separator();
- view_menu->get_popup()->add_check_item("Audio Listener",VIEW_AUDIO_LISTENER);
+ view_menu->get_popup()->add_check_item(TTR("Audio Listener"),VIEW_AUDIO_LISTENER);
view_menu->get_popup()->add_separator();
- view_menu->get_popup()->add_check_item("Gizmos",VIEW_GIZMOS);
+ view_menu->get_popup()->add_check_item(TTR("Gizmos"),VIEW_GIZMOS);
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(VIEW_GIZMOS),true);
view_menu->get_popup()->add_separator();
- view_menu->get_popup()->add_item("Selection (F)",VIEW_CENTER_TO_SELECTION);
- view_menu->get_popup()->add_item("Align with view (Ctrl+Shift+F)",VIEW_ALIGN_SELECTION_WITH_VIEW);
+ view_menu->get_popup()->add_item(TTR("Selection (F)"),VIEW_CENTER_TO_SELECTION);
+ view_menu->get_popup()->add_item(TTR("Align with view (Ctrl+Shift+F)"),VIEW_ALIGN_SELECTION_WITH_VIEW);
view_menu->get_popup()->connect("item_pressed",this,"_menu_option");
preview_camera = memnew( Button );
@@ -2519,7 +2519,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
}
- name="Top";
+ name=TTR("Top");
_update_name();
EditorSettings::get_singleton()->connect("settings_changed",this,"update_transform_gizmo_view");
@@ -2896,7 +2896,7 @@ void SpatialEditor::_xform_dialog_action() {
}
- undo_redo->create_action("XForm Dialog");
+ undo_redo->create_action(TTR("XForm Dialog"));
List<Node*> &selection = editor_selection->get_selected_node_list();
@@ -2941,7 +2941,7 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
tool_button[i]->set_pressed(i==p_option);
tool_mode=(ToolMode)p_option;
- static const char *_mode[]={"Selection Mode.","Translation Mode.","Rotation Mode.","Scale Mode.","List Selection Mode."};
+ // static const char *_mode[]={"Selection Mode.","Translation Mode.","Rotation Mode.","Scale Mode.","List Selection Mode."};
// set_message(_mode[p_option],3);
update_transform_gizmo();
@@ -3545,16 +3545,16 @@ void SpatialEditor::_instance_scene() {
ERR_FAIL_COND(!en);
String path = en->get_scenes_dock()->get_selected_path();
if (path=="") {
- set_message("No scene selected to instance!");
+ set_message(TTR("No scene selected to instance!"));
return;
}
- undo_redo->create_action("Instance at Cursor");
+ undo_redo->create_action(TTR("Instance at Cursor"));
Node* scene = en->request_instance_scene(path);
if (!scene) {
- set_message("Could not instance scene!");
+ set_message(TTR("Could not instance scene!"));
undo_redo->commit_action(); //bleh
return;
}
@@ -3912,7 +3912,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_button[TOOL_MODE_MOVE]->set_flat(true);
button_binds[0]=MENU_TOOL_MOVE;
tool_button[TOOL_MODE_MOVE]->connect("pressed", this,"_menu_item_pressed",button_binds);
- tool_button[TOOL_MODE_MOVE]->set_tooltip("Move Mode (W)");
+ tool_button[TOOL_MODE_MOVE]->set_tooltip(TTR("Move Mode (W)"));
tool_button[TOOL_MODE_ROTATE] = memnew( ToolButton );
hbc_menu->add_child( tool_button[TOOL_MODE_ROTATE] );
@@ -3920,7 +3920,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_button[TOOL_MODE_ROTATE]->set_flat(true);
button_binds[0]=MENU_TOOL_ROTATE;
tool_button[TOOL_MODE_ROTATE]->connect("pressed", this,"_menu_item_pressed",button_binds);
- tool_button[TOOL_MODE_ROTATE]->set_tooltip("Rotate Mode (E)");
+ tool_button[TOOL_MODE_ROTATE]->set_tooltip(TTR("Rotate Mode (E)"));
tool_button[TOOL_MODE_SCALE] = memnew( ToolButton );
hbc_menu->add_child( tool_button[TOOL_MODE_SCALE] );
@@ -3928,7 +3928,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
tool_button[TOOL_MODE_SCALE]->set_flat(true);
button_binds[0]=MENU_TOOL_SCALE;
tool_button[TOOL_MODE_SCALE]->connect("pressed", this,"_menu_item_pressed",button_binds);
- tool_button[TOOL_MODE_SCALE]->set_tooltip("Scale Mode (R)");
+ tool_button[TOOL_MODE_SCALE]->set_tooltip(TTR("Scale Mode (R)"));
instance_button = memnew( Button );
hbc_menu->add_child( instance_button );
@@ -3958,25 +3958,25 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
hbc_menu->add_child( transform_menu );
p = transform_menu->get_popup();
- p->add_check_item("Use Snap",MENU_TRANSFORM_USE_SNAP);
- p->add_item("Configure Snap..",MENU_TRANSFORM_CONFIGURE_SNAP);
+ p->add_check_item(TTR("Use Snap"),MENU_TRANSFORM_USE_SNAP);
+ p->add_item(TTR("Configure Snap.."),MENU_TRANSFORM_CONFIGURE_SNAP);
p->add_separator();
- p->add_check_item("Local Coords",MENU_TRANSFORM_LOCAL_COORDS);
+ p->add_check_item(TTR("Local Coords"),MENU_TRANSFORM_LOCAL_COORDS);
//p->set_item_checked(p->get_item_count()-1,true);
p->add_separator();
- p->add_item("Transform Dialog..",MENU_TRANSFORM_DIALOG);
+ p->add_item(TTR("Transform Dialog.."),MENU_TRANSFORM_DIALOG);
p->connect("item_pressed", this,"_menu_item_pressed");
view_menu = memnew( MenuButton );
- view_menu->set_text("View");
+ view_menu->set_text(TTR("View"));
view_menu->set_pos( Point2( 212,0) );
hbc_menu->add_child( view_menu );
p = view_menu->get_popup();
- p->add_check_item("Use Default Light",MENU_VIEW_USE_DEFAULT_LIGHT);
- p->add_check_item("Use Default sRGB",MENU_VIEW_USE_DEFAULT_SRGB);
+ p->add_check_item(TTR("Use Default Light"),MENU_VIEW_USE_DEFAULT_LIGHT);
+ p->add_check_item(TTR("Use Default sRGB"),MENU_VIEW_USE_DEFAULT_SRGB);
p->add_separator();
p->add_check_item("1 Viewport",MENU_VIEW_USE_1_VIEWPORT,KEY_MASK_CMD+KEY_1);
@@ -3987,15 +3987,15 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
p->add_check_item("4 Viewports",MENU_VIEW_USE_4_VIEWPORTS,KEY_MASK_CMD+KEY_4);
p->add_separator();
- p->add_check_item("Display Normal",MENU_VIEW_DISPLAY_NORMAL);
- p->add_check_item("Display Wireframe",MENU_VIEW_DISPLAY_WIREFRAME);
- p->add_check_item("Display Overdraw",MENU_VIEW_DISPLAY_OVERDRAW);
- p->add_check_item("Display Shadeless",MENU_VIEW_DISPLAY_SHADELESS);
+ p->add_check_item(TTR("Display Normal"),MENU_VIEW_DISPLAY_NORMAL);
+ p->add_check_item(TTR("Display Wireframe"),MENU_VIEW_DISPLAY_WIREFRAME);
+ p->add_check_item(TTR("Display Overdraw"),MENU_VIEW_DISPLAY_OVERDRAW);
+ p->add_check_item(TTR("Display Shadeless"),MENU_VIEW_DISPLAY_SHADELESS);
p->add_separator();
- p->add_check_item("View Origin",MENU_VIEW_ORIGIN);
- p->add_check_item("View Grid",MENU_VIEW_GRID);
+ p->add_check_item(TTR("View Origin"),MENU_VIEW_ORIGIN);
+ p->add_check_item(TTR("View Grid"),MENU_VIEW_GRID);
p->add_separator();
- p->add_item("Settings",MENU_VIEW_CAMERA_SETTINGS);
+ p->add_item(TTR("Settings"),MENU_VIEW_CAMERA_SETTINGS);
p->set_item_checked( p->get_item_index(MENU_VIEW_USE_DEFAULT_LIGHT), true );
@@ -4033,7 +4033,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
/* SNAP DIALOG */
snap_dialog = memnew( ConfirmationDialog );
- snap_dialog->set_title("Snap Settings");
+ snap_dialog->set_title(TTR("Snap Settings"));
add_child(snap_dialog);
VBoxContainer *snap_dialog_vbc = memnew( VBoxContainer );
@@ -4042,20 +4042,20 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
snap_translate = memnew( LineEdit );
snap_translate->set_text("1");
- snap_dialog_vbc->add_margin_child("Translate Snap:",snap_translate);
+ snap_dialog_vbc->add_margin_child(TTR("Translate Snap:"),snap_translate);
snap_rotate = memnew( LineEdit );
snap_rotate->set_text("5");
- snap_dialog_vbc->add_margin_child("Rotate Snap (deg.):",snap_rotate);
+ snap_dialog_vbc->add_margin_child(TTR("Rotate Snap (deg.):"),snap_rotate);
snap_scale = memnew( LineEdit );
snap_scale->set_text("5");
- snap_dialog_vbc->add_margin_child("Scale Snap (%):",snap_scale);
+ snap_dialog_vbc->add_margin_child(TTR("Scale Snap (%):"),snap_scale);
/* SETTINGS DIALOG */
settings_dialog = memnew( ConfirmationDialog );
- settings_dialog->set_title("Viewport Settings");
+ settings_dialog->set_title(TTR("Viewport Settings"));
add_child(settings_dialog);
settings_vbc = memnew( VBoxContainer );
settings_vbc->set_custom_minimum_size(Size2(200,0));
@@ -4067,7 +4067,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
settings_light_base = memnew( Control );
settings_light_base->set_custom_minimum_size(Size2(128,128));
settings_light_base->connect("input_event",this,"_default_light_angle_input");
- settings_vbc->add_margin_child("Default Light Normal:",settings_light_base);
+ settings_vbc->add_margin_child(TTR("Default Light Normal:"),settings_light_base);
settings_light_vp = memnew( Viewport );
settings_light_vp->set_disable_input(true);
settings_light_vp->set_use_own_world(true);
@@ -4092,7 +4092,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
settings_ambient_color = memnew( ColorPickerButton );
- settings_vbc->add_margin_child("Ambient Light Color:",settings_ambient_color);
+ settings_vbc->add_margin_child(TTR("Ambient Light Color:"),settings_ambient_color);
settings_ambient_color->connect("color_changed",this,"_update_ambient_light_color");
viewport_environment->set_enable_fx(Environment::FX_AMBIENT_LIGHT,true);
@@ -4105,30 +4105,30 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
settings_fov->set_min(1);
settings_fov->set_step(0.01);
settings_fov->set_val(EDITOR_DEF("3d_editor/default_fov",60.0));
- settings_vbc->add_margin_child("Perspective FOV (deg.):",settings_fov);
+ settings_vbc->add_margin_child(TTR("Perspective FOV (deg.):"),settings_fov);
settings_znear = memnew( SpinBox );
settings_znear->set_max(10000);
settings_znear->set_min(0.1);
settings_znear->set_step(0.01);
settings_znear->set_val(EDITOR_DEF("3d_editor/default_z_near",0.1));
- settings_vbc->add_margin_child("View Z-Near:",settings_znear);
+ settings_vbc->add_margin_child(TTR("View Z-Near:"),settings_znear);
settings_zfar = memnew( SpinBox );
settings_zfar->set_max(10000);
settings_zfar->set_min(0.1);
settings_zfar->set_step(0.01);
settings_zfar->set_val(EDITOR_DEF("3d_editor/default_z_far",1500));
- settings_vbc->add_margin_child("View Z-Far:",settings_zfar);
+ settings_vbc->add_margin_child(TTR("View Z-Far:"),settings_zfar);
//settings_dialog->get_cancel()->hide();
/* XFORM DIALOG */
xform_dialog = memnew( ConfirmationDialog );
- xform_dialog->set_title("Transform Change");
+ xform_dialog->set_title(TTR("Transform Change"));
add_child(xform_dialog);
Label *l = memnew(Label);
- l->set_text("Translate:");
+ l->set_text(TTR("Translate:"));
l->set_pos(Point2(5,5));
xform_dialog->add_child(l);
@@ -4141,7 +4141,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
}
l = memnew(Label);
- l->set_text("Rotate (deg.):");
+ l->set_text(TTR("Rotate (deg.):"));
l->set_pos(Point2(5,45));
xform_dialog->add_child(l);
@@ -4153,7 +4153,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
}
l = memnew(Label);
- l->set_text("Scale (ratio):");
+ l->set_text(TTR("Scale (ratio):"));
l->set_pos(Point2(5,85));
xform_dialog->add_child(l);
@@ -4165,7 +4165,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
}
l = memnew(Label);
- l->set_text("Transform Type");
+ l->set_text(TTR("Transform Type"));
l->set_pos(Point2(5,125));
xform_dialog->add_child(l);
@@ -4173,8 +4173,8 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
xform_type->set_anchor( MARGIN_RIGHT, ANCHOR_END );
xform_type->set_begin( Point2(15,142) );
xform_type->set_end( Point2(15,75) );
- xform_type->add_item("Pre");
- xform_type->add_item("Post");
+ xform_type->add_item(TTR("Pre"));
+ xform_type->add_item(TTR("Post"));
xform_dialog->add_child(xform_type);
xform_dialog->connect("confirmed", this,"_xform_dialog_action");
diff --git a/tools/editor/plugins/sprite_frames_editor_plugin.cpp b/tools/editor/plugins/sprite_frames_editor_plugin.cpp
index af73828b61..796fc23d9a 100644
--- a/tools/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/tools/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -72,10 +72,10 @@ void SpriteFramesEditor::_file_load_request(const DVector<String>& p_path) {
resource = ResourceLoader::load(p_path[i]);
if (resource.is_null()) {
- dialog->set_text("ERROR: Couldn't load frame resource!");
- dialog->set_title("Error!");
- //dialog->get_cancel()->set_text("Close");
- dialog->get_ok()->set_text("Close");
+ dialog->set_text(TTR("ERROR: Couldn't load frame resource!"));
+ dialog->set_title(TTR("Error!"));
+ //dialog->get_cancel()->set_text(TTR("Close"));
+ dialog->get_ok()->set_text(TTR("Close"));
dialog->popup_centered_minsize();
return; ///beh should show an error i guess
}
@@ -89,7 +89,7 @@ void SpriteFramesEditor::_file_load_request(const DVector<String>& p_path) {
return;
}
- undo_redo->create_action("Add Frame");
+ undo_redo->create_action(TTR("Add Frame"));
int fc=frames->get_frame_count();
for(List< Ref<Texture> >::Element *E=resources.front();E;E=E->next() ) {
@@ -144,7 +144,7 @@ void SpriteFramesEditor::_item_edited() {
}
RES samp = frames->get_resource(old_name);
- undo_redo->create_action("Rename Resource");
+ undo_redo->create_action(TTR("Rename Resource"));
undo_redo->add_do_method(frames,"remove_resource",old_name);
undo_redo->add_do_method(frames,"add_resource",new_name,samp);
undo_redo->add_undo_method(frames,"remove_resource",new_name);
@@ -170,7 +170,7 @@ void SpriteFramesEditor::_delete_confirm_pressed() {
int to_remove = tree->get_selected()->get_metadata(0);
sel=to_remove;
Ref<Texture> r = frames->get_frame(to_remove);
- undo_redo->create_action("Delete Resource");
+ undo_redo->create_action(TTR("Delete Resource"));
undo_redo->add_do_method(frames,"remove_frame",to_remove);
undo_redo->add_undo_method(frames,"add_frame",r,to_remove);
undo_redo->add_do_method(this,"_update_library");
@@ -184,16 +184,16 @@ void SpriteFramesEditor::_paste_pressed() {
Ref<Texture> r=EditorSettings::get_singleton()->get_resource_clipboard();
if (!r.is_valid()) {
- dialog->set_text("Resource clipboard is empty or not a texture!");
- dialog->set_title("Error!");
- //dialog->get_cancel()->set_text("Close");
- dialog->get_ok()->set_text("Close");
+ dialog->set_text(TTR("Resource clipboard is empty or not a texture!"));
+ dialog->set_title(TTR("Error!"));
+ //dialog->get_cancel()->set_text(TTR("Close"));
+ dialog->get_ok()->set_text(TTR("Close"));
dialog->popup_centered_minsize();
return; ///beh should show an error i guess
}
- undo_redo->create_action("Paste Frame");
+ undo_redo->create_action(TTR("Paste Frame"));
undo_redo->add_do_method(frames,"add_frame",r);
undo_redo->add_undo_method(frames,"remove_frame",frames->get_frame_count());
undo_redo->add_do_method(this,"_update_library");
@@ -220,7 +220,7 @@ void SpriteFramesEditor::_empty_pressed() {
Ref<Texture> r;
- undo_redo->create_action("Add Empty");
+ undo_redo->create_action(TTR("Add Empty"));
undo_redo->add_do_method(frames,"add_frame",r,from);
undo_redo->add_undo_method(frames,"remove_frame",from);
undo_redo->add_do_method(this,"_update_library");
@@ -247,7 +247,7 @@ void SpriteFramesEditor::_empty2_pressed() {
Ref<Texture> r;
- undo_redo->create_action("Add Empty");
+ undo_redo->create_action(TTR("Add Empty"));
undo_redo->add_do_method(frames,"add_frame",r,from+1);
undo_redo->add_undo_method(frames,"remove_frame",from+1);
undo_redo->add_do_method(this,"_update_library");
@@ -268,7 +268,7 @@ void SpriteFramesEditor::_up_pressed() {
sel-=1;
Ref<Texture> r = frames->get_frame(to_move);
- undo_redo->create_action("Delete Resource");
+ undo_redo->create_action(TTR("Delete Resource"));
undo_redo->add_do_method(frames,"set_frame",to_move,frames->get_frame(to_move-1));
undo_redo->add_do_method(frames,"set_frame",to_move-1,frames->get_frame(to_move));
undo_redo->add_undo_method(frames,"set_frame",to_move,frames->get_frame(to_move));
@@ -291,7 +291,7 @@ void SpriteFramesEditor::_down_pressed() {
sel+=1;
Ref<Texture> r = frames->get_frame(to_move);
- undo_redo->create_action("Delete Resource");
+ undo_redo->create_action(TTR("Delete Resource"));
undo_redo->add_do_method(frames,"set_frame",to_move,frames->get_frame(to_move+1));
undo_redo->add_do_method(frames,"set_frame",to_move+1,frames->get_frame(to_move));
undo_redo->add_undo_method(frames,"set_frame",to_move,frames->get_frame(to_move));
@@ -313,11 +313,11 @@ void SpriteFramesEditor::_delete_pressed() {
_delete_confirm_pressed(); //it has undo.. why bother with a dialog..
/*
- dialog->set_title("Confirm...");
- dialog->set_text("Remove Resource '"+tree->get_selected()->get_text(0)+"' ?");
- //dialog->get_cancel()->set_text("Cancel");
+ dialog->set_title(TTR("Confirm..."));
+ dialog->set_text(TTR("Remove Resource '")+tree->get_selected()->get_text(0)+"' ?");
+ //dialog->get_cancel()->set_text(TTR("Cancel"));
//dialog->get_ok()->show();
- dialog->get_ok()->set_text("Remove");
+ dialog->get_ok()->set_text(TTR("Remove"));
dialog->popup_centered(Size2(300,60));*/
}
@@ -342,10 +342,10 @@ void SpriteFramesEditor::_update_library() {
if (frames->get_frame(i).is_null()) {
- ti->set_text(0,"Frame "+itos(i)+" (empty)");
+ ti->set_text(0,TTR("Frame ")+itos(i)+" (empty)");
} else {
- ti->set_text(0,"Frame "+itos(i)+" ("+frames->get_frame(i)->get_name()+")");
+ ti->set_text(0,TTR("Frame ")+itos(i)+" ("+frames->get_frame(i)->get_name()+")");
ti->set_icon(0,frames->get_frame(i));
}
if (frames->get_frame(i).is_valid())
@@ -405,30 +405,30 @@ SpriteFramesEditor::SpriteFramesEditor() {
vbc->add_child(hbc);
load = memnew( Button );
- load->set_tooltip("Load Resource");
+ load->set_tooltip(TTR("Load Resource"));
hbc->add_child(load);
paste = memnew( Button );
- paste->set_text("Paste");
+ paste->set_text(TTR("Paste"));
hbc->add_child(paste);
empty = memnew( Button );
- empty->set_text("Insert Empty (Before)");
+ empty->set_text(TTR("Insert Empty (Before)"));
hbc->add_child(empty);
empty2 = memnew( Button );
- empty2->set_text("Insert Empty (After)");
+ empty2->set_text(TTR("Insert Empty (After)"));
hbc->add_child(empty2);
move_up = memnew( Button );
- move_up->set_text("Up");
+ move_up->set_text(TTR("Up"));
hbc->add_child(move_up);
move_down = memnew( Button );
- move_down->set_text("Down");
+ move_down->set_text(TTR("Down"));
hbc->add_child(move_down);
_delete = memnew( Button );
diff --git a/tools/editor/plugins/sprite_region_editor_plugin.cpp b/tools/editor/plugins/sprite_region_editor_plugin.cpp
index 8dfa8a60a6..5e7816ffb5 100644
--- a/tools/editor/plugins/sprite_region_editor_plugin.cpp
+++ b/tools/editor/plugins/sprite_region_editor_plugin.cpp
@@ -173,7 +173,7 @@ void SpriteRegionEditor::_region_input(const InputEvent& p_input)
} else if (drag) {
- undo_redo->create_action("Set region_rect");
+ undo_redo->create_action(TTR("Set region_rect"));
undo_redo->add_do_method(node,"set_region_rect",node->get_region_rect());
undo_redo->add_undo_method(node,"set_region_rect",rect_prev);
undo_redo->add_do_method(edit_draw,"update");
@@ -420,7 +420,7 @@ SpriteRegionEditor::SpriteRegionEditor(EditorNode* p_editor)
dlg_editor = memnew( AcceptDialog );
add_child(dlg_editor);
- dlg_editor->set_title("Sprite Region Editor");
+ dlg_editor->set_title(TTR("Sprite Region Editor"));
dlg_editor->set_self_opacity(0.9);
VBoxContainer *main_vb = memnew( VBoxContainer );
@@ -431,24 +431,24 @@ SpriteRegionEditor::SpriteRegionEditor(EditorNode* p_editor)
b_snap_enable = memnew( ToolButton );
hb_tools->add_child(b_snap_enable);
- b_snap_enable->set_text("Snap");
+ b_snap_enable->set_text(TTR("Snap"));
b_snap_enable->set_focus_mode(FOCUS_NONE);
b_snap_enable->set_toggle_mode(true);
b_snap_enable->set_pressed(use_snap);
- b_snap_enable->set_tooltip("Enable Snap");
+ b_snap_enable->set_tooltip(TTR("Enable Snap"));
b_snap_enable->connect("toggled",this,"_set_use_snap");
b_snap_grid = memnew( ToolButton );
hb_tools->add_child(b_snap_grid);
- b_snap_grid->set_text("Grid");
+ b_snap_grid->set_text(TTR("Grid"));
b_snap_grid->set_focus_mode(FOCUS_NONE);
b_snap_grid->set_toggle_mode(true);
b_snap_grid->set_pressed(snap_show_grid);
- b_snap_grid->set_tooltip("Show Grid");
+ b_snap_grid->set_tooltip(TTR("Show Grid"));
b_snap_grid->connect("toggled",this,"_set_show_grid");
hb_tools->add_child( memnew( VSeparator ));
- hb_tools->add_child( memnew( Label("Grid Offset:") ) );
+ hb_tools->add_child( memnew( Label(TTR("Grid Offset:")) ) );
sb_off_x = memnew( SpinBox );
sb_off_x->set_min(-256);
@@ -469,7 +469,7 @@ SpriteRegionEditor::SpriteRegionEditor(EditorNode* p_editor)
hb_tools->add_child(sb_off_y);
hb_tools->add_child( memnew( VSeparator ));
- hb_tools->add_child( memnew( Label("Grid Step:") ) );
+ hb_tools->add_child( memnew( Label(TTR("Grid Step:")) ) );
sb_step_x = memnew( SpinBox );
sb_step_x->set_min(-256);
diff --git a/tools/editor/plugins/sprite_region_editor_plugin.h b/tools/editor/plugins/sprite_region_editor_plugin.h
index 47cb210863..6fe235c2ea 100644
--- a/tools/editor/plugins/sprite_region_editor_plugin.h
+++ b/tools/editor/plugins/sprite_region_editor_plugin.h
@@ -119,7 +119,7 @@ class SpriteRegionEditorPlugin : public EditorPlugin
EditorNode *editor;
public:
- virtual String get_name() const { return "SpriteRegion"; }
+ virtual String get_name() const { return TTR("SpriteRegion"); }
bool has_main_screen() const { return false; }
virtual void edit(Object *p_node);
virtual bool handles(Object *p_node) const;
diff --git a/tools/editor/plugins/stream_editor_plugin.h b/tools/editor/plugins/stream_editor_plugin.h
index 5730612d61..90046a5fdf 100644
--- a/tools/editor/plugins/stream_editor_plugin.h
+++ b/tools/editor/plugins/stream_editor_plugin.h
@@ -69,7 +69,7 @@ class StreamEditorPlugin : public EditorPlugin {
public:
- virtual String get_name() const { return "Stream"; }
+ virtual String get_name() const { return TTR("Stream"); }
bool has_main_screen() const { return false; }
virtual void edit(Object *p_node);
virtual bool handles(Object *p_node) const;
diff --git a/tools/editor/plugins/style_box_editor_plugin.cpp b/tools/editor/plugins/style_box_editor_plugin.cpp
index f08d2a7376..d5c885bd55 100644
--- a/tools/editor/plugins/style_box_editor_plugin.cpp
+++ b/tools/editor/plugins/style_box_editor_plugin.cpp
@@ -61,7 +61,7 @@ StyleBoxEditor::StyleBoxEditor() {
panel->set_area_as_parent_rect();
Label *l = memnew( Label );
- l->set_text("StyleBox Preview:");
+ l->set_text(TTR("StyleBox Preview:"));
l->set_pos(Point2(5,5));
panel->add_child(l);
diff --git a/tools/editor/plugins/theme_editor_plugin.cpp b/tools/editor/plugins/theme_editor_plugin.cpp
index e792a2a9e2..3c394ab6ac 100644
--- a/tools/editor/plugins/theme_editor_plugin.cpp
+++ b/tools/editor/plugins/theme_editor_plugin.cpp
@@ -199,7 +199,7 @@ void ThemeEditor::_save_template_cbk(String fname) {
if (!file) {
- ERR_EXPLAIN("Can't save theme to file: "+filename);
+ ERR_EXPLAIN(TTR("Can't save theme to file: ")+filename);
return;
}
file->store_line("; ******************* ");
@@ -473,16 +473,16 @@ void ThemeEditor::_theme_menu_cbk(int p_option) {
if (p_option==POPUP_ADD) {//add
- add_del_dialog->set_title("Add Item");
- add_del_dialog->get_ok()->set_text("Add");
+ add_del_dialog->set_title(TTR("Add Item"));
+ add_del_dialog->get_ok()->set_text(TTR("Add"));
add_del_dialog->popup_centered(Size2(490,85));
base_theme=Theme::get_default();
} else if (p_option==POPUP_CLASS_ADD) {//add
- add_del_dialog->set_title("Add All Items");
- add_del_dialog->get_ok()->set_text("Add All");
+ add_del_dialog->set_title(TTR("Add All Items"));
+ add_del_dialog->get_ok()->set_text(TTR("Add All"));
add_del_dialog->popup_centered(Size2(240,85));
base_theme=Theme::get_default();
@@ -495,8 +495,8 @@ void ThemeEditor::_theme_menu_cbk(int p_option) {
} else if (p_option==POPUP_REMOVE) {
- add_del_dialog->set_title("Remove Item");
- add_del_dialog->get_ok()->set_text("Remove");
+ add_del_dialog->set_title(TTR("Remove Item"));
+ add_del_dialog->get_ok()->set_text(TTR("Remove"));
add_del_dialog->popup_centered(Size2(490,85));
base_theme=theme;
@@ -596,12 +596,12 @@ ThemeEditor::ThemeEditor() {
theme_menu = memnew( MenuButton );
theme_menu->set_text("Theme");
- theme_menu->get_popup()->add_item("Add Item",POPUP_ADD);
- theme_menu->get_popup()->add_item("Add Class Items",POPUP_CLASS_ADD);
- theme_menu->get_popup()->add_item("Remove Item",POPUP_REMOVE);
+ theme_menu->get_popup()->add_item(TTR("Add Item"),POPUP_ADD);
+ theme_menu->get_popup()->add_item(TTR("Add Class Items"),POPUP_CLASS_ADD);
+ theme_menu->get_popup()->add_item(TTR("Remove Item"),POPUP_REMOVE);
theme_menu->get_popup()->add_item("Remove Class Items",POPUP_CLASS_REMOVE);
theme_menu->get_popup()->add_separator();
- theme_menu->get_popup()->add_item("Create Template",POPUP_CREATE_TEMPLATE);
+ theme_menu->get_popup()->add_item(TTR("Create Template"),POPUP_CREATE_TEMPLATE);
hb_menu->add_child(theme_menu);
theme_menu->get_popup()->connect("item_pressed", this,"_theme_menu_cbk");
@@ -640,30 +640,30 @@ ThemeEditor::ThemeEditor() {
VBoxContainer *gbvb = memnew( VBoxContainer );
gbvb->set_v_size_flags(SIZE_EXPAND_FILL);
CheckBox *rbx1 = memnew( CheckBox );
- rbx1->set_text("CheckBox Radio1");
+ rbx1->set_text(TTR("CheckBox Radio1"));
rbx1->set_pressed(true);
gbvb->add_child(rbx1);
CheckBox *rbx2 = memnew( CheckBox );
- rbx2->set_text("CheckBox Radio2");
+ rbx2->set_text(TTR("CheckBox Radio2"));
gbvb->add_child(rbx2);
bg->add_child(gbvb);
first_vb->add_child(bg);
MenuButton* test_menu_button = memnew( MenuButton );
test_menu_button->set_text("MenuButton");
- test_menu_button->get_popup()->add_item("Item");
+ test_menu_button->get_popup()->add_item(TTR("Item"));
test_menu_button->get_popup()->add_separator();
- test_menu_button->get_popup()->add_check_item("Check Item");
- test_menu_button->get_popup()->add_check_item("Checked Item");
+ test_menu_button->get_popup()->add_check_item(TTR("Check Item"));
+ test_menu_button->get_popup()->add_check_item(TTR("Checked Item"));
test_menu_button->get_popup()->set_item_checked(2,true);
first_vb->add_child(test_menu_button);
OptionButton *test_option_button = memnew( OptionButton );
test_option_button->add_item("OptionButton");
test_option_button->add_separator();
- test_option_button->add_item("Has");
- test_option_button->add_item("Many");
- test_option_button->add_item("Options");
+ test_option_button->add_item(TTR("Has"));
+ test_option_button->add_item(TTR("Many"));
+ test_option_button->add_item(TTR("Options"));
first_vb->add_child(test_option_button);
ColorPickerButton *cpb = memnew( ColorPickerButton );
@@ -714,7 +714,7 @@ ThemeEditor::ThemeEditor() {
item = test_tree->create_item( test_tree->get_root() );
item->set_cell_mode(0, TreeItem::CELL_MODE_RANGE);
item->set_editable(0,true);
- item->set_text(0,"Have,Many,Several,Options!");
+ item->set_text(0,TTR("Have,Many,Several,Options!"));
item->set_range(0,2);
VBoxContainer *third_vb = memnew( VBoxContainer );
@@ -734,13 +734,13 @@ ThemeEditor::ThemeEditor() {
third_vb->add_child(tc);
tc->set_custom_minimum_size(Size2(0,160));
Control *tcc = memnew( Control );
- tcc->set_name("Tab 1");
+ tcc->set_name(TTR("Tab 1"));
tc->add_child(tcc);
tcc = memnew( Control );
- tcc->set_name("Tab 2");
+ tcc->set_name(TTR("Tab 2"));
tc->add_child(tcc);
tcc = memnew( Control );
- tcc->set_name("Tab 3");
+ tcc->set_name(TTR("Tab 3"));
tc->add_child(tcc);
main_hb->add_constant_override("separation",20);
@@ -757,7 +757,7 @@ ThemeEditor::ThemeEditor() {
line_edit = memnew( LineEdit );
line_edit->set_pos( Point2( 25, 275 ) );
line_edit->set_size( Point2( 150, 5 ) );
- line_edit->set_text("Line Edit");
+ line_edit->set_text(TTR("Line Edit"));
panel->add_child(line_edit);
test_v_scroll = memnew( VScrollBar );
@@ -786,12 +786,12 @@ ThemeEditor::ThemeEditor() {
item = test_tree->create_item( test_tree->get_root() );
item->set_cell_mode(0, TreeItem::CELL_MODE_RANGE);
item->set_editable(0,true);
- item->set_text(0,"Have,Many,Several,Options!");
+ item->set_text(0,TTR("Have,Many,Several,Options!"));
item->set_range(0,2);
Button *fd_button= memnew( Button );
fd_button->set_pos(Point2(300,275));
- fd_button->set_text("Open File Dialog");
+ fd_button->set_text(TTR("Open File Dialog"));
panel->add_child(fd_button);
test_file_dialog = memnew( EditorFileDialog );
@@ -807,7 +807,7 @@ ThemeEditor::ThemeEditor() {
Label *l = memnew( Label );
l->set_pos( Point2(5,5) );
- l->set_text("Type:");
+ l->set_text(TTR("Type:"));
add_del_dialog->add_child(l);
dtype_select_label=l;
@@ -826,7 +826,7 @@ ThemeEditor::ThemeEditor() {
l = memnew( Label );
l->set_pos( Point2(200,5) );
- l->set_text("Name:");
+ l->set_text(TTR("Name:"));
add_del_dialog->add_child(l);
name_select_label=l;
@@ -846,15 +846,15 @@ ThemeEditor::ThemeEditor() {
type_select_label= memnew( Label );
type_select_label->set_pos( Point2(400,5) );
- type_select_label->set_text("Data Type:");
+ type_select_label->set_text(TTR("Data Type:"));
add_del_dialog->add_child(type_select_label);
type_select = memnew( OptionButton );
- type_select->add_item("Icon");
- type_select->add_item("Style");
+ type_select->add_item(TTR("Icon"));
+ type_select->add_item(TTR("Style"));
type_select->add_item("Font");
type_select->add_item("Color");
- type_select->add_item("Constant");
+ type_select->add_item(TTR("Constant"));
type_select->set_pos( Point2( 400,25 ) );
type_select->set_size( Point2( 80,5 ) );
diff --git a/tools/editor/plugins/tile_map_editor_plugin.cpp b/tools/editor/plugins/tile_map_editor_plugin.cpp
index 30ec6c086c..843fc35d8b 100644
--- a/tools/editor/plugins/tile_map_editor_plugin.cpp
+++ b/tools/editor/plugins/tile_map_editor_plugin.cpp
@@ -581,7 +581,7 @@ bool TileMapEditor::forward_input_event(const InputEvent& p_event) {
if (id!=TileMap::INVALID_CELL && paint_undo.size()) {
- undo_redo->create_action("Paint TileMap");
+ undo_redo->create_action(TTR("Paint TileMap"));
for (Map<Point2i,CellOp>::Element *E=paint_undo.front();E;E=E->next()) {
Point2 p=E->key();
@@ -630,7 +630,7 @@ bool TileMapEditor::forward_input_event(const InputEvent& p_event) {
Point2 ofs = over_tile-rectangle.pos;
- undo_redo->create_action("Duplicate");
+ undo_redo->create_action(TTR("Duplicate"));
for (List<TileData>::Element *E=copydata.front();E;E=E->next()) {
_set_cell(E->get().pos+ofs,E->get().cell,E->get().flip_h,E->get().flip_v,E->get().transpose,true);
@@ -725,7 +725,7 @@ bool TileMapEditor::forward_input_event(const InputEvent& p_event) {
if (tool==TOOL_ERASING || tool==TOOL_RECTANGLE_ERASE || tool==TOOL_LINE_ERASE) {
if (paint_undo.size()) {
- undo_redo->create_action("Erase TileMap");
+ undo_redo->create_action(TTR("Erase TileMap"));
for (Map<Point2i,CellOp>::Element *E=paint_undo.front();E;E=E->next()) {
Point2 p=E->key();
@@ -1323,7 +1323,7 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
p->add_item("Pick Tile", OPTION_PICK_TILE, KEY_CONTROL);
p->add_separator();
p->add_item("Select", OPTION_SELECT, KEY_MASK_CMD+KEY_B);
- p->add_item("Duplicate Selection", OPTION_DUPLICATE, KEY_MASK_CMD+KEY_D);
+ p->add_item(TTR("Duplicate Selection"), OPTION_DUPLICATE, KEY_MASK_CMD+KEY_D);
p->add_item("Erase Selection", OPTION_ERASE_SELECTION, KEY_DELETE);
p->connect("item_pressed", this, "_menu_option");
@@ -1334,19 +1334,19 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
transp = memnew( ToolButton );
transp->set_toggle_mode(true);
- transp->set_tooltip("Transpose");
+ transp->set_tooltip(TTR("Transpose"));
transp->set_focus_mode(FOCUS_NONE);
transp->connect("pressed", this, "_update_transform_buttons", make_binds(transp));
toolbar->add_child(transp);
mirror_x = memnew( ToolButton );
mirror_x->set_toggle_mode(true);
- mirror_x->set_tooltip("Mirror X (A)");
+ mirror_x->set_tooltip(TTR("Mirror X (A)"));
mirror_x->set_focus_mode(FOCUS_NONE);
mirror_x->connect("pressed", this, "_update_transform_buttons", make_binds(mirror_x));
toolbar->add_child(mirror_x);
mirror_y = memnew( ToolButton );
mirror_y->set_toggle_mode(true);
- mirror_y->set_tooltip("Mirror Y (S)");
+ mirror_y->set_tooltip(TTR("Mirror Y (S)"));
mirror_y->set_focus_mode(FOCUS_NONE);
mirror_y->connect("pressed", this, "_update_transform_buttons", make_binds(mirror_y));
toolbar->add_child(mirror_y);
@@ -1355,25 +1355,25 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
rotate_0 = memnew( ToolButton );
rotate_0->set_toggle_mode(true);
- rotate_0->set_tooltip("Rotate 0 degrees");
+ rotate_0->set_tooltip(TTR("Rotate 0 degrees"));
rotate_0->set_focus_mode(FOCUS_NONE);
rotate_0->connect("pressed", this, "_update_transform_buttons", make_binds(rotate_0));
toolbar->add_child(rotate_0);
rotate_90 = memnew( ToolButton );
rotate_90->set_toggle_mode(true);
- rotate_90->set_tooltip("Rotate 90 degrees");
+ rotate_90->set_tooltip(TTR("Rotate 90 degrees"));
rotate_90->set_focus_mode(FOCUS_NONE);
rotate_90->connect("pressed", this, "_update_transform_buttons", make_binds(rotate_90));
toolbar->add_child(rotate_90);
rotate_180 = memnew( ToolButton );
rotate_180->set_toggle_mode(true);
- rotate_180->set_tooltip("Rotate 180 degrees");
+ rotate_180->set_tooltip(TTR("Rotate 180 degrees"));
rotate_180->set_focus_mode(FOCUS_NONE);
rotate_180->connect("pressed", this, "_update_transform_buttons", make_binds(rotate_180));
toolbar->add_child(rotate_180);
rotate_270 = memnew( ToolButton );
rotate_270->set_toggle_mode(true);
- rotate_270->set_tooltip("Rotate 270 degrees");
+ rotate_270->set_tooltip(TTR("Rotate 270 degrees"));
rotate_270->set_focus_mode(FOCUS_NONE);
rotate_270->connect("pressed", this, "_update_transform_buttons", make_binds(rotate_270));
toolbar->add_child(rotate_270);
diff --git a/tools/editor/plugins/tile_set_editor_plugin.cpp b/tools/editor/plugins/tile_set_editor_plugin.cpp
index 06046b226a..b77d3fb5b3 100644
--- a/tools/editor/plugins/tile_set_editor_plugin.cpp
+++ b/tools/editor/plugins/tile_set_editor_plugin.cpp
@@ -175,7 +175,7 @@ void TileSetEditor::_name_dialog_confirm(const String& name) {
if (tileset->has_tile(id)) {
tileset->remove_tile(id);
} else {
- err_dialog->set_text("Could not find tile: " + name);
+ err_dialog->set_text(TTR("Could not find tile: ") + name);
err_dialog->popup_centered(Size2(300, 60));
}
} break;
@@ -193,18 +193,18 @@ void TileSetEditor::_menu_cbk(int p_option) {
} break;
case MENU_OPTION_REMOVE_ITEM: {
- nd->set_title("Remove Item");
- nd->set_text("Item name or ID:");
+ nd->set_title(TTR("Remove Item"));
+ nd->set_text(TTR("Item name or ID:"));
nd->popup_centered(Size2(300, 95));
} break;
case MENU_OPTION_CREATE_FROM_SCENE: {
- cd->set_text("Create from scene?");
+ cd->set_text(TTR("Create from scene?"));
cd->popup_centered(Size2(300,60));
} break;
case MENU_OPTION_MERGE_FROM_SCENE: {
- cd->set_text("Merge from scene?");
+ cd->set_text(TTR("Merge from scene?"));
cd->popup_centered(Size2(300,60));
} break;
}
@@ -235,11 +235,11 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
panel->add_child(options);
options->set_pos(Point2(1,1));
options->set_text("Theme");
- options->get_popup()->add_item("Add Item",MENU_OPTION_ADD_ITEM);
- options->get_popup()->add_item("Remove Item",MENU_OPTION_REMOVE_ITEM);
+ options->get_popup()->add_item(TTR("Add Item"),MENU_OPTION_ADD_ITEM);
+ options->get_popup()->add_item(TTR("Remove Item"),MENU_OPTION_REMOVE_ITEM);
options->get_popup()->add_separator();
- options->get_popup()->add_item("Create from Scene",MENU_OPTION_CREATE_FROM_SCENE);
- options->get_popup()->add_item("Merge from Scene",MENU_OPTION_MERGE_FROM_SCENE);
+ options->get_popup()->add_item(TTR("Create from Scene"),MENU_OPTION_CREATE_FROM_SCENE);
+ options->get_popup()->add_item(TTR("Merge from Scene"),MENU_OPTION_MERGE_FROM_SCENE);
options->get_popup()->connect("item_pressed", this,"_menu_cbk");
editor=p_editor;
cd = memnew(ConfirmationDialog);
@@ -254,7 +254,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
err_dialog = memnew(AcceptDialog);
add_child(err_dialog);
- err_dialog->set_title("Error");
+ err_dialog->set_title(TTR("Error"));
}
void TileSetEditorPlugin::edit(Object *p_node) {
diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp
index 199d7646d4..c024336f27 100644
--- a/tools/editor/project_export.cpp
+++ b/tools/editor/project_export.cpp
@@ -258,7 +258,7 @@ void ProjectExportDialog::_script_edited(Variant v) {
if (updating_script)
return;
updating_script=true;
- EditorNode::get_undo_redo()->create_action("Edit Script Options");
+ EditorNode::get_undo_redo()->create_action(TTR("Edit Script Options"));
EditorNode::get_undo_redo()->add_do_method(EditorImportExport::get_singleton(),"script_set_action",script_mode->get_selected());
EditorNode::get_undo_redo()->add_undo_method(EditorImportExport::get_singleton(),"script_set_action",EditorImportExport::get_singleton()->script_get_action());
EditorNode::get_undo_redo()->add_do_method(EditorImportExport::get_singleton(),"script_set_encryption_key",script_key->get_text());
@@ -454,10 +454,10 @@ void ProjectExportDialog::_export_action(const String& p_file) {
while(true) {
- print_line("TESTING: "+location.plus_file("engine.cfg"));
+ print_line(TTR("TESTING: ")+location.plus_file("engine.cfg"));
if (FileAccess::exists(location.plus_file("engine.cfg"))) {
- error->set_text("Please export outside the project folder!");
+ error->set_text(TTR("Please export outside the project folder!"));
error->popup_centered_minsize();
return;
}
@@ -484,7 +484,7 @@ void ProjectExportDialog::_export_action(const String& p_file) {
bool debugging_enabled = EditorImportExport::get_singleton()->get_export_platform(platform)->is_debugging_enabled();
Error err = export_platform(platform,p_file,debugging_enabled,file_export_password->get_text(),false);
if (err!=OK) {
- error->set_text("Error exporting project!");
+ error->set_text(TTR("Error exporting project!"));
error->popup_centered_minsize();
}
@@ -505,7 +505,7 @@ void ProjectExportDialog::_export_action_pck(const String& p_file) {
if (p_file.ends_with(".pck")) {
FileAccess *f = FileAccess::open(p_file,FileAccess::WRITE);
if (!f) {
- error->set_text("Error exporting project PCK! Can't write");
+ error->set_text(TTR("Error exporting project PCK! Can't write"));
error->popup_centered_minsize();
}
ERR_FAIL_COND(!f);
@@ -514,7 +514,7 @@ void ProjectExportDialog::_export_action_pck(const String& p_file) {
memdelete(f);
if (err!=OK) {
- error->set_text("Error exporting project!");
+ error->set_text(TTR("Error exporting project!"));
error->popup_centered_minsize();
return;
}
@@ -523,7 +523,7 @@ void ProjectExportDialog::_export_action_pck(const String& p_file) {
Error err = exporter->save_zip(p_file,false);
if (err!=OK) {
- error->set_text("Error exporting project!");
+ error->set_text(TTR("Error exporting project!"));
error->popup_centered_minsize();
return;
}
@@ -539,7 +539,7 @@ Error ProjectExportDialog::export_platform(const String& p_platform, const Strin
List<StringName> platforms;
EditorImportExport::get_singleton()->get_export_platforms(&platforms);
- print_line("Valid export plaftorms are:");
+ print_line(TTR("Valid export plaftorms are:"));
for (List<StringName>::Element *E=platforms.front();E;E=E->next())
print_line(" \""+E->get()+"\"");
@@ -552,7 +552,7 @@ Error ProjectExportDialog::export_platform(const String& p_platform, const Strin
}
Error err = exporter->export_project(p_path,p_debug);
if (err!=OK) {
- error->set_text("Error exporting project!");
+ error->set_text(TTR("Error exporting project!"));
error->popup_centered_minsize();
ERR_PRINT("Exporting failed!");
if (p_quit_after) {
@@ -586,7 +586,7 @@ void ProjectExportDialog::custom_action(const String&) {
Ref<EditorExportPlatform> exporter = EditorImportExport::get_singleton()->get_export_platform(platform);
if (exporter.is_null()) {
- error->set_text("No exporter for platform '"+platform+"' yet.");
+ error->set_text(TTR("No exporter for platform '")+platform+"' yet.");
error->popup_centered_minsize();
return;
}
@@ -715,7 +715,7 @@ bool ProjectExportDialog::_update_group_treef(TreeItem *p_parent,EditorFileSyste
String filter=group_images_filter->get_text();
StringName current_group = _get_selected_group();
- String check_text="Include";
+ String check_text=TTR("Include");
for(int i=0;i<p_dir->get_file_count();i++) {
@@ -805,7 +805,7 @@ void ProjectExportDialog::_group_changed(Variant v) {
return;
updating=true;
StringName name = _get_selected_group();
- EditorNode::get_undo_redo()->create_action("Change Image Group");
+ EditorNode::get_undo_redo()->create_action(TTR("Change Image Group"));
EditorNode::get_undo_redo()->add_do_method(EditorImportExport::get_singleton(),"image_export_group_set_image_action",name,group_image_action->get_selected());
EditorNode::get_undo_redo()->add_do_method(EditorImportExport::get_singleton(),"image_export_group_set_make_atlas",name,group_atlas->is_pressed());
EditorNode::get_undo_redo()->add_do_method(EditorImportExport::get_singleton(),"image_export_group_set_shrink",name,group_shrink->get_val());
@@ -841,7 +841,7 @@ void ProjectExportDialog::_group_item_edited() {
}
print_line("changed "+path+" to group: "+group);
- EditorNode::get_undo_redo()->create_action("Change Image Group");
+ EditorNode::get_undo_redo()->create_action(TTR("Change Image Group"));
EditorNode::get_undo_redo()->add_do_method(EditorImportExport::get_singleton(),"image_add_to_export_group",path,group);
EditorNode::get_undo_redo()->add_undo_method(EditorImportExport::get_singleton(),"image_add_to_export_group",path,EditorImportExport::get_singleton()->image_get_export_group(path));
EditorNode::get_undo_redo()->add_undo_method(this,"_update_group_tree");
@@ -858,17 +858,17 @@ void ProjectExportDialog::_group_add() {
if (name=="") {
group_new_name_error->show();
- group_new_name_error->set_text("Group Name Can't be Empty!");
+ group_new_name_error->set_text(TTR("Group Name Can't be Empty!"));
return;
}
if (name.find("/")!=-1 || name.find(":")!=-1 || name.find(",")!=-1 || name.find("-")!=-1) {
- group_new_name_error->set_text("Invalid Character in Group Name!");
+ group_new_name_error->set_text(TTR("Invalid Character in Group Name!"));
group_new_name_error->show();
return;
}
if (EditorImportExport::get_singleton()->image_export_has_group(name)) {
- group_new_name_error->set_text("Group Name Already Exists!");
+ group_new_name_error->set_text(TTR("Group Name Already Exists!"));
group_new_name_error->show();
return;
}
@@ -877,7 +877,7 @@ void ProjectExportDialog::_group_add() {
String current=_get_selected_group();
- EditorNode::get_undo_redo()->create_action("Add Image Group");
+ EditorNode::get_undo_redo()->create_action(TTR("Add Image Group"));
EditorNode::get_undo_redo()->add_do_method(EditorImportExport::get_singleton(),"image_export_group_create",name);
EditorNode::get_undo_redo()->add_undo_method(EditorImportExport::get_singleton(),"image_export_group_remove",name);
EditorNode::get_undo_redo()->add_do_method(this,"_update_group_list");
@@ -903,7 +903,7 @@ void ProjectExportDialog::_group_del(Object *p_item, int p_column, int p_button)
return;
String name = item->get_text(0);
- EditorNode::get_undo_redo()->create_action("Delete Image Group");
+ EditorNode::get_undo_redo()->create_action(TTR("Delete Image Group"));
List<StringName> images_used;
EditorImportExport::get_singleton()->image_export_get_images_in_group(name,&images_used);
for (List<StringName>::Element*E=images_used.front();E;E=E->next()) {
@@ -962,7 +962,7 @@ void ProjectExportDialog::_group_select_all() {
if (items.size()==0)
return;
- EditorNode::get_undo_redo()->create_action("Select All");
+ EditorNode::get_undo_redo()->create_action(TTR("Select All"));
for (List<StringName>::Element *E=items.front();E;E=E->next()) {
@@ -1001,7 +1001,7 @@ void ProjectExportDialog::_group_select_none(){
if (items.size()==0)
return;
- EditorNode::get_undo_redo()->create_action("Select All");
+ EditorNode::get_undo_redo()->create_action(TTR("Select All"));
for (List<StringName>::Element *E=items.front();E;E=E->next()) {
@@ -1061,13 +1061,13 @@ void ProjectExportDialog::_group_atlas_preview() {
Error err = plugin->import2(dst_file,imd,EditorExportPlatform::IMAGE_COMPRESSION_NONE,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;
}
Ref<Texture> tex = ResourceLoader::load(dst_file);
atlas_preview_frame->set_texture(tex); //clear previous
- atlas_preview_dialog->set_title("Atlas Preview ("+itos(tex->get_width())+"x"+itos(tex->get_height())+")");
+ atlas_preview_dialog->set_title(TTR("Atlas Preview (")+itos(tex->get_width())+"x"+itos(tex->get_height())+")");
atlas_preview_dialog->popup_centered_ratio(0.9);
}
@@ -1136,7 +1136,7 @@ void ProjectExportDialog::_bind_methods() {
ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
editor=p_editor;
- set_title("Project Export Settings");
+ set_title(TTR("Project Export Settings"));
sections = memnew( TabContainer );
add_child(sections);
@@ -1144,7 +1144,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
VBoxContainer *pvbox = memnew( VBoxContainer );
sections->add_child(pvbox);
- pvbox->set_name("Target");
+ pvbox->set_name(TTR("Target"));
HBoxContainer *phbox = memnew( HBoxContainer );
pvbox->add_child(phbox);
@@ -1162,7 +1162,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
phbox->add_child(vb);
platforms = memnew( Tree );
platforms->set_hide_root(true);
- vb->add_margin_child("Export to Platform",platforms,true);
+ vb->add_margin_child(TTR("Export to Platform"),platforms,true);
platforms->connect("cell_selected",this,"_platform_selected");
@@ -1173,7 +1173,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
vb->set_v_size_flags(SIZE_EXPAND_FILL);
platform_options = memnew( PropertyEditor() );
platform_options->hide_top_label();
- vb->add_margin_child("Options",platform_options,true);
+ vb->add_margin_child(TTR("Options"),platform_options,true);
platform_options->connect("property_edited",this,"_prop_edited");
@@ -1181,16 +1181,16 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
//////////////////
vb = memnew( VBoxContainer );
- vb->set_name("Resources");
+ vb->set_name(TTR("Resources"));
sections->add_child(vb);
export_mode = memnew( OptionButton );
- export_mode->add_item("Export selected resources (including dependencies).");
- export_mode->add_item("Export all resources in the project.");
- export_mode->add_item("Export all files in the project directory.");
+ export_mode->add_item(TTR("Export selected resources (including dependencies)."));
+ export_mode->add_item(TTR("Export all resources in the project."));
+ export_mode->add_item(TTR("Export all files in the project directory."));
export_mode->connect("item_selected",this,"_export_mode_changed");
- vb->add_margin_child("Export Mode:",export_mode);
+ vb->add_margin_child(TTR("Export Mode:"),export_mode);
@@ -1199,36 +1199,36 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
tree_vb->set_v_size_flags(SIZE_EXPAND_FILL);
tree = memnew( Tree );
- tree_vb->add_margin_child("Resources to Export:",tree,true);
+ tree_vb->add_margin_child(TTR("Resources to Export:"),tree,true);
tree->set_v_size_flags(SIZE_EXPAND_FILL);
tree->connect("item_edited",this,"_tree_changed");
tree->set_columns(2);
tree->set_column_titles_visible(true);
- tree->set_column_title(0,"File");
- tree->set_column_title(1,"Action");
+ tree->set_column_title(0,TTR("File"));
+ tree->set_column_title(1,TTR("Action"));
tree->set_column_expand(1,false);
tree->set_column_min_width(1,90);
filters = memnew( LineEdit );
- vb->add_margin_child("Filters to export non-resource files (Comma Separated, eg: *.json, *.txt):",filters);
+ vb->add_margin_child(TTR("Filters to export non-resource files (Comma Separated, eg: *.json, *.txt):"),filters);
filters->connect("text_changed",this,"_filters_edited");
filters_exclude = memnew( LineEdit );
- vb->add_margin_child("Filters to exclude from export (Comma Separated, eg: *.json, *.txt):",filters_exclude);
+ vb->add_margin_child(TTR("Filters to exclude from export (Comma Separated, eg: *.json, *.txt):"),filters_exclude);
filters_exclude->connect("text_changed",this,"_filters_exclude_edited");
convert_text_scenes = memnew( CheckButton );
- convert_text_scenes->set_text("Convert text scenes to binary on export");
+ convert_text_scenes->set_text(TTR("Convert text scenes to binary on export"));
vb->add_child(convert_text_scenes);
convert_text_scenes->connect("toggled",this,"_export_mode_changed");
image_vb = memnew( VBoxContainer );
- image_vb->set_name("Images");
+ image_vb->set_name(TTR("Images"));
image_action = memnew( OptionButton );
- image_action->add_item("Keep Original");
- image_action->add_item("Compress for Disk (Lossy, WebP)");
- image_action->add_item("Compress for RAM (BC/PVRTC/ETC)");
- image_vb->add_margin_child("Convert Images (*.png):",image_action);
+ image_action->add_item(TTR("Keep Original"));
+ image_action->add_item(TTR("Compress for Disk (Lossy, WebP)"));
+ image_action->add_item(TTR("Compress for RAM (BC/PVRTC/ETC)"));
+ image_vb->add_margin_child(TTR("Convert Images (*.png):"),image_action);
HBoxContainer *qhb = memnew( HBoxContainer );
image_quality = memnew( HSlider );
qhb->add_child(image_quality);
@@ -1239,12 +1239,12 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
image_quality->set_min(0);
image_quality->set_max(1);
image_quality->set_step(0.01);
- image_vb->add_margin_child("Compress for Disk (Lossy) Quality:",qhb);
+ image_vb->add_margin_child(TTR("Compress for Disk (Lossy) Quality:"),qhb);
image_shrink = memnew( SpinBox );
image_shrink->set_min(1);
image_shrink->set_max(8);
image_shrink->set_step(0.1);
- image_vb->add_margin_child("Shrink All Images:",image_shrink);
+ image_vb->add_margin_child(TTR("Shrink All Images:"),image_shrink);
sections->add_child(image_vb);
image_formats=memnew(Tree);
@@ -1260,11 +1260,11 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
fmt->set_editable(0,true);
formats.push_back(fmt);
}
- image_vb->add_margin_child("Compress Formats: ",image_formats,true);
+ image_vb->add_margin_child(TTR("Compress Formats: "),image_formats,true);
/// groups
HBoxContainer *group_hb = memnew( HBoxContainer );
- group_hb->set_name("Image Groups");
+ group_hb->set_name(TTR("Image Groups"));
sections->add_child(group_hb);
VBoxContainer *group_vb_left = memnew( VBoxContainer);
group_hb->add_child(group_vb_left);
@@ -1293,18 +1293,18 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
groups->set_hide_root(true);
gvb->add_child(groups);
- group_vb_left->add_margin_child("Groups:",gvb,true);
+ group_vb_left->add_margin_child(TTR("Groups:"),gvb,true);
//group_vb_left->add_child( memnew( HSeparator));
group_options = memnew(VBoxContainer);
group_vb_left->add_child(group_options);
group_image_action = memnew(OptionButton);
- group_image_action->add_item("Default");
- group_image_action->add_item("Compress Disk");
- group_image_action->add_item("Compress RAM");
- group_image_action->add_item("Keep Original");
- group_options->add_margin_child("Compress Mode:",group_image_action);
+ group_image_action->add_item(TTR("Default"));
+ group_image_action->add_item(TTR("Compress Disk"));
+ group_image_action->add_item(TTR("Compress RAM"));
+ group_image_action->add_item(TTR("Keep Original"));
+ group_options->add_margin_child(TTR("Compress Mode:"),group_image_action);
group_image_action->connect("item_selected",this,"_group_changed");
group_lossy_quality = memnew( HSlider );
@@ -1312,12 +1312,12 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
group_lossy_quality->set_max(1.0);
group_lossy_quality->set_step(0.1);
group_lossy_quality->set_val(0.7);
- group_options->add_margin_child("Lossy Quality:",group_lossy_quality);
+ group_options->add_margin_child(TTR("Lossy Quality:"),group_lossy_quality);
group_lossy_quality->connect("value_changed",this,"_quality_edited");
group_atlas = memnew(CheckButton);
- group_atlas->set_pressed("Generate Atlas");
- group_options->add_margin_child("Atlas:",group_atlas);
+ group_atlas->set_pressed(true);
+ group_options->add_margin_child(TTR("Atlas:"),group_atlas);
group_atlas->connect("toggled",this,"_group_changed");
group_shrink = memnew(SpinBox);
@@ -1325,11 +1325,11 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
group_shrink->set_max(8);
group_shrink->set_val(1);
group_shrink->set_step(0.001);
- group_options->add_margin_child("Shrink By:",group_shrink);
+ group_options->add_margin_child(TTR("Shrink By:"),group_shrink);
group_shrink->connect("value_changed",this,"_group_changed");
atlas_preview = memnew( Button );
- atlas_preview->set_text("Preview Atlas");
+ atlas_preview->set_text(TTR("Preview Atlas"));
group_options->add_child(atlas_preview);
atlas_preview->show();
atlas_preview->connect("pressed",this,"_group_atlas_preview");
@@ -1344,21 +1344,21 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
HBoxContainer *filter_hb = memnew (HBoxContainer);
group_images_filter = memnew( LineEdit );
- group_vb_right->add_margin_child("Image Filter:",filter_hb);
+ group_vb_right->add_margin_child(TTR("Image Filter:"),filter_hb);
filter_hb->add_child(group_images_filter);
group_images_filter->set_h_size_flags(SIZE_EXPAND_FILL);
group_images_filter->connect("text_changed",this,"_image_filter_changed");
group_images = memnew( Tree );
group_images->set_v_size_flags(SIZE_EXPAND_FILL);
- group_vb_right->add_margin_child("Images:",group_images,true);
+ group_vb_right->add_margin_child(TTR("Images:"),group_images,true);
Button *filt_select_all = memnew( Button );
- filt_select_all->set_text("Select All");
+ filt_select_all->set_text(TTR("Select All"));
filter_hb->add_child(filt_select_all);
filt_select_all->connect("pressed",this,"_group_select_all");
Button *filt_select_none = memnew( Button );
- filt_select_none->set_text("Select None");
+ filt_select_none->set_text(TTR("Select None"));
filter_hb->add_child(filt_select_none);
filt_select_none->connect("pressed",this,"_group_select_none");
@@ -1378,7 +1378,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
group_images->set_column_min_width(1,100);
group_images->set_column_titles_visible(true);
group_images->set_column_title(0,"Image");
- group_images->set_column_title(1,"Group");
+ group_images->set_column_title(1,TTR("Group"));
group_images->connect("item_edited",this,"_group_item_edited",varray(),CONNECT_DEFERRED);
/* SpinBox *group_shrink;
@@ -1405,30 +1405,30 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
sample_vbox = memnew( VBoxContainer );
- sample_vbox->set_name("Samples");
+ sample_vbox->set_name(TTR("Samples"));
sections->add_child(sample_vbox);
sample_mode = memnew( OptionButton );
- sample_vbox->add_margin_child("Sample Conversion Mode: (.wav files):",sample_mode);
- sample_mode->add_item("Keep");
- sample_mode->add_item("Compress (RAM - IMA-ADPCM)");
+ sample_vbox->add_margin_child(TTR("Sample Conversion Mode: (.wav files):"),sample_mode);
+ sample_mode->add_item(TTR("Keep"));
+ sample_mode->add_item(TTR("Compress (RAM - IMA-ADPCM)"));
sample_max_hz = memnew( SpinBox );
sample_max_hz->set_max(192000);
sample_max_hz->set_min(8000);
- sample_vbox->add_margin_child("Sampling Rate Limit: (hz)",sample_max_hz);
+ sample_vbox->add_margin_child(TTR("Sampling Rate Limit: (hz)"),sample_max_hz);
sample_trim = memnew( CheckButton );
- sample_trim->set_text("Trim");
- sample_vbox->add_margin_child("Trailing Silence:",sample_trim);
+ sample_trim->set_text(TTR("Trim"));
+ sample_vbox->add_margin_child(TTR("Trailing Silence:"),sample_trim);
script_vbox = memnew( VBoxContainer );
script_vbox->set_name("Script");
sections->add_child(script_vbox);
script_mode = memnew( OptionButton );
- script_vbox->add_margin_child("Script Export Mode:",script_mode);
- script_mode->add_item("Text");
- script_mode->add_item("Compiled");
- script_mode->add_item("Encrypted (Provide Key Below)");
+ script_vbox->add_margin_child(TTR("Script Export Mode:"),script_mode);
+ script_mode->add_item(TTR("Text"));
+ script_mode->add_item(TTR("Compiled"));
+ script_mode->add_item(TTR("Encrypted (Provide Key Below)"));
script_key = memnew( LineEdit );
- script_vbox->add_margin_child("Script Encryption Key (256-bits as hex):",script_key);
+ script_vbox->add_margin_child(TTR("Script Encryption Key (256-bits as hex):"),script_key);
@@ -1441,7 +1441,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
add_child(confirm);
confirm->connect("confirmed",this,"_confirmed");
- get_ok()->set_text("Export PCK/Zip");
+ get_ok()->set_text(TTR("Export PCK/Zip"));
expopt="--,Export,Bundle";
@@ -1451,24 +1451,24 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
file_export->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
file_export->set_current_dir( EditorSettings::get_singleton()->get("global/default_project_export_path") );
- file_export->set_title("Export Project");
+ file_export->set_title(TTR("Export Project"));
file_export->connect("file_selected", this,"_export_action");
file_export_password = memnew( LineEdit );
file_export_password->set_secret(true);
file_export_password->set_editable(false);
- file_export->get_vbox()->add_margin_child("Password:",file_export_password);
+ file_export->get_vbox()->add_margin_child(TTR("Password:"),file_export_password);
pck_export = memnew( EditorFileDialog );
pck_export->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
pck_export->set_current_dir( EditorSettings::get_singleton()->get("global/default_project_export_path") );
- pck_export->set_title("Export Project PCK");
+ pck_export->set_title(TTR("Export Project PCK"));
pck_export->connect("file_selected", this,"_export_action_pck");
pck_export->add_filter("*.pck ; Data Pack");
pck_export->add_filter("*.zip ; Zip");
add_child(pck_export);
- button_export = add_button("Export..",!OS::get_singleton()->get_swap_ok_cancel(),"export_pck");
+ button_export = add_button(TTR("Export.."),!OS::get_singleton()->get_swap_ok_cancel(),"export_pck");
updating_script=false;
ei="EditorIcons";
@@ -1522,7 +1522,7 @@ Error ProjectExport::export_project(const String& p_preset) {
String preset_path=Globals::get_singleton()->get("export_presets_path/"+selected);
if (preset_path=="") {
- error->set_text("Export path empty, see export options");
+ error->set_text(TTR("Export path empty, see export options"));
error->popup_centered_minsize(Size2(300,100));
ERR_FAIL_V(ERR_INVALID_DATA);
}
@@ -1544,9 +1544,9 @@ Error ProjectExport::export_project(const String& p_preset) {
}
if (pc%3 != 0 ) {
memdelete(d);
- error->set_text("Corrupted export data..");
+ error->set_text(TTR("Corrupted export data.."));
error->popup_centered_minsize(Size2(300,100));
- ERR_EXPLAIN("Corrupted export data...");
+ ERR_EXPLAIN(TTR("Corrupted export data..."));
ERR_FAIL_V(ERR_INVALID_DATA);
}
@@ -1681,7 +1681,7 @@ Error ProjectExport::export_project(const String& p_preset) {
else
preset=names[E->get().action-2];
- print_line("Exporting "+itos(idx)+"/"+itos(export_action.size())+": "+path);
+ print_line(TTR("Exporting ")+itos(idx)+"/"+itos(export_action.size())+": "+path);
String base_dir = Globals::get_singleton()->localize_path(path.get_base_dir()).replace("\\","/").replace("res://","");
DirAccess *da=DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
@@ -1699,7 +1699,7 @@ Error ProjectExport::export_project(const String& p_preset) {
if (err!=OK) {
memdelete(da);
memdelete(d);
- ERR_EXPLAIN("Cannot make dir: "+cwd+"/"+p);
+ ERR_EXPLAIN(TTR("Cannot make dir: ")+cwd+"/"+p);
ERR_FAIL_V(ERR_CANT_CREATE);
}
@@ -1707,7 +1707,7 @@ Error ProjectExport::export_project(const String& p_preset) {
memdelete(da);
memdelete(d);
- ERR_EXPLAIN("Cannot change to dir: "+cwd+"/"+p);
+ ERR_EXPLAIN(TTR("Cannot change to dir: ")+cwd+"/"+p);
ERR_FAIL_V(ERR_CANT_CREATE);
}
@@ -1721,7 +1721,7 @@ Error ProjectExport::export_project(const String& p_preset) {
String source_file;
- print_line("Exporting: "+source_file);
+ print_line(TTR("Exporting: ")+source_file);
bool delete_source=false;
if (preset=="") {
//just copy!
@@ -1735,7 +1735,7 @@ Error ProjectExport::export_project(const String& p_preset) {
if (!Globals::get_singleton()->has("optimizer_presets/"+preset)) {
memdelete(d);
- ERR_EXPLAIN("Unknown optimizer preset: "+preset);
+ ERR_EXPLAIN(TTR("Unknown optimizer preset: ")+preset);
ERR_FAIL_V(ERR_INVALID_DATA);
}
@@ -1756,7 +1756,7 @@ Error ProjectExport::export_project(const String& p_preset) {
if (saver.is_null()) {
memdelete(d);
- ERR_EXPLAIN("Preset '"+preset+"' references nonexistent saver: "+type);
+ ERR_EXPLAIN(TTR("Preset '")+preset+"' references nonexistent saver: "+type);
ERR_FAIL_COND_V(saver.is_null(),ERR_INVALID_DATA);
}
@@ -1800,7 +1800,7 @@ Error ProjectExport::export_project(const String& p_preset) {
if (res.is_null()) {
memdelete(d);
- ERR_EXPLAIN("Errr loading resource to optimize: "+path);
+ ERR_EXPLAIN(TTR("Errr loading resource to optimize: ")+path);
ERR_FAIL_V(ERR_INVALID_DATA);
}
@@ -1819,11 +1819,11 @@ Error ProjectExport::export_project(const String& p_preset) {
String write_file = path+".opt.res";
- print_line("DST RES FILE: "+write_file);
+ print_line(TTR("DST RES FILE: ")+write_file);
Error err = ResourceSaver::save(write_file,res,flags,saver);
if (err) {
memdelete(d);
- ERR_EXPLAIN("Errr saving optimized resource: "+write_file);
+ ERR_EXPLAIN(TTR("Errr saving optimized resource: ")+write_file);
ERR_FAIL_COND_V(err,ERR_CANT_OPEN);
}
source_file=write_file;
@@ -1846,7 +1846,7 @@ Error ProjectExport::export_project(const String& p_preset) {
if (err) {
- ERR_EXPLAIN("Error copying from: "+source_file+" to "+dst_file+".");
+ ERR_EXPLAIN(TTR("Error copying from: ")+source_file+" to "+dst_file+".");
ERR_FAIL_COND_V(err,err);
}
@@ -1898,13 +1898,13 @@ ProjectExport::ProjectExport(EditorData* p_data) {
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
set_child_rect(vbc);
- set_title("Project Export");
+ set_title(TTR("Project Export"));
label = memnew( Label );
- label->set_text("Export Preset:");
+ label->set_text(TTR("Export Preset:"));
vbc->add_child(label);
export_preset = memnew (OptionButton);
vbc->add_child(export_preset);
- get_ok()->set_text("Export");
+ get_ok()->set_text(TTR("Export"));
set_hide_on_ok(false);
error = memnew( AcceptDialog );
add_child(error);
diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp
index 4386717c4c..368f952dc9 100644
--- a/tools/editor/project_manager.cpp
+++ b/tools/editor/project_manager.cpp
@@ -66,7 +66,7 @@ class NewProjectDialog : public ConfirmationDialog {
get_ok()->set_disabled(true);
DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
if (project_path->get_text() != "" && d->change_dir(project_path->get_text())!=OK) {
- error->set_text("Invalid Path for Project, Path Must Exist!");
+ error->set_text(TTR("Invalid Path for Project, Path Must Exist!"));
memdelete(d);
return false;
}
@@ -75,7 +75,7 @@ class NewProjectDialog : public ConfirmationDialog {
if (d->file_exists("engine.cfg")) {
- error->set_text("Invalid Project Path (engine.cfg must not exist).");
+ error->set_text(TTR("Invalid Project Path (engine.cfg must not exist)."));
memdelete(d);
return false;
}
@@ -84,7 +84,7 @@ class NewProjectDialog : public ConfirmationDialog {
if (project_path->get_text() != "" && !d->file_exists("engine.cfg")) {
- error->set_text("Invalid Project Path (engine.cfg must exist).");
+ error->set_text(TTR("Invalid Project Path (engine.cfg must exist)."));
memdelete(d);
return false;
}
@@ -109,7 +109,7 @@ class NewProjectDialog : public ConfirmationDialog {
sp=sp.substr(lidx+1,sp.length());
}
if (sp=="" && import_mode )
- sp="Imported Project";
+ sp=TTR("Imported Project");
project_name->set_text(sp);
}
@@ -170,7 +170,7 @@ class NewProjectDialog : public ConfirmationDialog {
DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
if (d->change_dir(project_path->get_text())!=OK) {
- error->set_text("Invalid Path for Project (changed anything?)");
+ error->set_text(TTR("Invalid Path for Project (changed anything?)"));
memdelete(d);
return;
}
@@ -180,7 +180,7 @@ class NewProjectDialog : public ConfirmationDialog {
FileAccess *f = FileAccess::open(dir.plus_file("/engine.cfg"),FileAccess::WRITE);
if (!f) {
- error->set_text("Couldn't create engine.cfg in project path");
+ error->set_text(TTR("Couldn't create engine.cfg in project path"));
} else {
f->store_line("; Engine configuration file.");
@@ -245,20 +245,20 @@ public:
project_name->clear();
if (import_mode) {
- set_title("Import Existing Project");
- get_ok()->set_text("Import");
- pp->set_text("Project Path: (Must exist)");
- pn->set_text("Project Name:");
+ set_title(TTR("Import Existing Project"));
+ get_ok()->set_text(TTR("Import"));
+ pp->set_text(TTR("Project Path: (Must exist)"));
+ pn->set_text(TTR("Project Name:"));
pn->hide();
project_name->hide();
popup_centered(Size2(500,125));
} else {
- set_title("Create New Project");
- get_ok()->set_text("Create");
- pp->set_text("Project Path:");
- pn->set_text("Project Name:");
+ set_title(TTR("Create New Project"));
+ get_ok()->set_text(TTR("Create"));
+ pp->set_text(TTR("Project Path:"));
+ pn->set_text(TTR("Project Name:"));
pn->show();
project_name->show();
@@ -278,7 +278,7 @@ public:
set_child_rect(vb);
Label* l = memnew(Label);
- l->set_text("Project Path:");
+ l->set_text(TTR("Project Path:"));
vb->add_child(l);
pp=l;
@@ -292,11 +292,11 @@ public:
Button* browse = memnew( Button );
pphb->add_child(browse);
- browse->set_text("Browse");
+ browse->set_text(TTR("Browse"));
browse->connect("pressed", this,"_browse_path");
l = memnew(Label);
- l->set_text("Project Name:");
+ l->set_text(TTR("Project Name:"));
l->set_pos(Point2(5,50));
vb->add_child(l);
pn=l;
@@ -305,11 +305,11 @@ public:
mc = memnew( MarginContainer );
vb->add_child(mc);
mc->add_child(project_name);
- project_name->set_text("New Game Project");
+ project_name->set_text(TTR("New Game Project"));
l = memnew(Label);
- l->set_text("That's a BINGO!");
+ l->set_text(TTR("That's a BINGO!"));
vb->add_child(l);
error=l;
l->add_color_override("font_color",Color(1,0.4,0.3,0.8));
@@ -536,7 +536,7 @@ void ProjectManager::_load_recent_projects() {
ERR_CONTINUE(err!=OK);
- String project_name="Unnamed Project";
+ String project_name=TTR("Unnamed Project");
if (cf->has_section_key("application","name")) {
project_name = static_cast<String>(cf->get_value("application","name")).xml_unescape();
@@ -622,7 +622,7 @@ void ProjectManager::_open_project_confirm() {
for (Map<String,String>::Element *E=selected_list.front(); E; E=E->next()) {
const String &selected = E->key();
String path = EditorSettings::get_singleton()->get("projects/"+selected);
- print_line("OPENING: "+path+" ("+selected+")");
+ print_line(TTR("OPENING: ")+path+" ("+selected+")");
List<String> args;
@@ -648,7 +648,7 @@ void ProjectManager::_open_project() {
}
if (selected_list.size()>1) {
- multi_open_ask->set_text("Are you sure to open more than one projects?");
+ multi_open_ask->set_text(TTR("Are you sure to open more than one projects?"));
multi_open_ask->popup_centered_minsize();
} else {
_open_project_confirm();
@@ -664,7 +664,7 @@ void ProjectManager::_run_project_confirm() {
const String &selected = E->key();
String path = EditorSettings::get_singleton()->get("projects/"+selected);
- print_line("OPENING: "+path+" ("+selected+")");
+ print_line(TTR("OPENING: ")+path+" ("+selected+")");
List<String> args;
@@ -688,7 +688,7 @@ void ProjectManager::_run_project() {
}
if (selected_list.size()>1) {
- multi_run_ask->set_text("Are you sure to run more than one projects?");
+ multi_run_ask->set_text(TTR("Are you sure to run more than one projects?"));
multi_run_ask->popup_centered_minsize();
} else {
_run_project_confirm();
@@ -727,7 +727,7 @@ void ProjectManager::_scan_dir(DirAccess *da,float pos, float total,List<String>
void ProjectManager::_scan_begin(const String& p_base) {
- print_line("SCAN PROJECTS AT: "+p_base);
+ print_line(TTR("SCAN PROJECTS AT: ")+p_base);
List<String> projects;
DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
da->change_dir(p_base);
@@ -788,7 +788,7 @@ void ProjectManager::_erase_project() {
return;
- erase_ask->set_text("Remove project from list?? (Folder contents will not be modified)");
+ erase_ask->set_text(TTR("Remove project from list?? (Folder contents will not be modified)"));
erase_ask->popup_centered_minsize();
}
@@ -822,8 +822,8 @@ void ProjectManager::_bind_methods() {
ProjectManager::ProjectManager() {
- 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"));
// load settings
if (!EditorSettings::get_singleton())
@@ -870,7 +870,7 @@ ProjectManager::ProjectManager() {
HBoxContainer *tree_hb = memnew( HBoxContainer);
- vb->add_margin_child("Recent Projects:",tree_hb,true);
+ vb->add_margin_child(TTR("Recent Projects:"),tree_hb,true);
VBoxContainer *search_tree_vb = memnew(VBoxContainer);
search_tree_vb->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -903,13 +903,13 @@ ProjectManager::ProjectManager() {
//vb->add_child(hb);
Button *open = memnew( Button );
- open->set_text("Edit");
+ open->set_text(TTR("Edit"));
tree_vb->add_child(open);
open->connect("pressed", this,"_open_project");
open_btn=open;
Button *run = memnew( Button );
- run->set_text("Run");
+ run->set_text(TTR("Run"));
tree_vb->add_child(run);
run->connect("pressed", this,"_run_project");
run_btn=run;
@@ -917,7 +917,7 @@ ProjectManager::ProjectManager() {
tree_vb->add_child(memnew( HSeparator ));
Button *scan = memnew( Button );
- scan->set_text("Scan");
+ scan->set_text(TTR("Scan"));
tree_vb->add_child(scan);
scan->connect("pressed", this,"_scan_projects");
@@ -932,18 +932,18 @@ ProjectManager::ProjectManager() {
Button* create = memnew( Button );
- create->set_text("New Project");
+ create->set_text(TTR("New Project"));
tree_vb->add_child(create);
create->connect("pressed", this,"_new_project");
Button* import = memnew( Button );
- import->set_text("Import");
+ import->set_text(TTR("Import"));
tree_vb->add_child(import);
import->connect("pressed", this,"_import_project");
Button* erase = memnew( Button );
- erase->set_text("Remove");
+ erase->set_text(TTR("Remove"));
tree_vb->add_child(erase);
erase->connect("pressed", this,"_erase_project");
erase_btn=erase;
@@ -952,7 +952,7 @@ ProjectManager::ProjectManager() {
tree_vb->add_spacer();
Button * cancel = memnew( Button );
- cancel->set_text("Exit");
+ cancel->set_text(TTR("Exit"));
tree_vb->add_child(cancel);
cancel->connect("pressed", this,"_exit_dialog");
@@ -970,19 +970,19 @@ ProjectManager::ProjectManager() {
erase_ask = memnew( ConfirmationDialog );
- erase_ask->get_ok()->set_text("Remove");
+ erase_ask->get_ok()->set_text(TTR("Remove"));
erase_ask->get_ok()->connect("pressed", this,"_erase_project_confirm");
add_child(erase_ask);
multi_open_ask = memnew( ConfirmationDialog );
- multi_open_ask->get_ok()->set_text("Edit");
+ multi_open_ask->get_ok()->set_text(TTR("Edit"));
multi_open_ask->get_ok()->connect("pressed", this, "_open_project_confirm");
add_child(multi_open_ask);
multi_run_ask = memnew( ConfirmationDialog );
- multi_run_ask->get_ok()->set_text("Run");
+ multi_run_ask->get_ok()->set_text(TTR("Run"));
multi_run_ask->get_ok()->connect("pressed", this, "_run_project_confirm");
add_child(multi_run_ask);
@@ -999,8 +999,8 @@ ProjectManager::ProjectManager() {
_scan_begin( EditorSettings::get_singleton()->get("global/autoscan_project_path") );
}
- //get_ok()->set_text("Open");
- //get_ok()->set_text("Exit");
+ //get_ok()->set_text(TTR("Open"));
+ //get_ok()->set_text(TTR("Exit"));
last_clicked = "";
}
@@ -1015,7 +1015,7 @@ ProjectManager::~ProjectManager() {
void ProjectListFilter::_setup_filters() {
filter_option->clear();
- filter_option->add_item("Name");
+ filter_option->add_item(TTR("Name"));
filter_option->add_item("Path");
}
diff --git a/tools/editor/project_settings.cpp b/tools/editor/project_settings.cpp
index 179af051a9..d69d565795 100644
--- a/tools/editor/project_settings.cpp
+++ b/tools/editor/project_settings.cpp
@@ -139,7 +139,7 @@ void ProjectSettings::_action_edited() {
ti->set_text(0,old_name);
add_at="input/"+old_name;
- message->set_text("Invalid Action (Anything goes but / or :).");
+ message->set_text(TTR("Invalid Action (Anything goes but / or :)."));
message->popup_centered(Size2(300,100));
return;
}
@@ -151,7 +151,7 @@ void ProjectSettings::_action_edited() {
ti->set_text(0,old_name);
add_at="input/"+old_name;
- message->set_text("Action '"+new_name+"' already exists!.");
+ message->set_text(TTR("Action '")+new_name+"' already exists!.");
message->popup_centered(Size2(300,100));
return;
}
@@ -161,7 +161,7 @@ void ProjectSettings::_action_edited() {
bool persisting = Globals::get_singleton()->is_persisting(add_at);
setting=true;
- undo_redo->create_action("Rename Input Action Event");
+ undo_redo->create_action(TTR("Rename Input Action Event"));
undo_redo->add_do_method(Globals::get_singleton(),"clear",add_at);
undo_redo->add_do_method(Globals::get_singleton(),"set",action_prop,va);
undo_redo->add_do_method(Globals::get_singleton(),"set_persisting",action_prop,persisting);
@@ -245,7 +245,7 @@ void ProjectSettings::_device_input_add() {
arr.push_back(ie);
- undo_redo->create_action("Add Input Action Event");
+ undo_redo->create_action(TTR("Add Input Action Event"));
undo_redo->add_do_method(Globals::get_singleton(),"set",name,arr);
undo_redo->add_do_method(Globals::get_singleton(),"set_persisting",name,true);
undo_redo->add_undo_method(Globals::get_singleton(),"set",name,old_val);
@@ -283,7 +283,7 @@ void ProjectSettings::_press_a_key_confirm() {
arr.push_back(ie);
- undo_redo->create_action("Add Input Action Event");
+ undo_redo->create_action(TTR("Add Input Action Event"));
undo_redo->add_do_method(Globals::get_singleton(),"set",name,arr);
undo_redo->add_do_method(Globals::get_singleton(),"set_persisting",name,true);
undo_redo->add_undo_method(Globals::get_singleton(),"set",name,old_val);
@@ -304,13 +304,13 @@ void ProjectSettings::_wait_for_key(const InputEvent& p_event) {
last_wait_for_key=p_event;
String str=keycode_get_string(p_event.key.scancode).capitalize();
if (p_event.key.mod.meta)
- str="Meta+"+str;
+ str=TTR("Meta+")+str;
if (p_event.key.mod.shift)
- str="Shift+"+str;
+ str=TTR("Shift+")+str;
if (p_event.key.mod.alt)
- str="Alt+"+str;
+ str=TTR("Alt+")+str;
if (p_event.key.mod.control)
- str="Control+"+str;
+ str=TTR("Control+")+str;
press_a_key_label->set_text(str);
@@ -328,7 +328,7 @@ void ProjectSettings::_add_item(int p_item){
case InputEvent::KEY: {
- press_a_key_label->set_text("Press a Key..");
+ press_a_key_label->set_text(TTR("Press a Key.."));
last_wait_for_key=InputEvent();
press_a_key->popup_centered(Size2(250,80));
press_a_key->grab_focus();
@@ -336,28 +336,28 @@ void ProjectSettings::_add_item(int p_item){
case InputEvent::MOUSE_BUTTON: {
device_id->set_val(0);
- device_index_label->set_text("Mouse Button Index:");
+ device_index_label->set_text(TTR("Mouse Button Index:"));
device_index->clear();
- device_index->add_item("Left Button");
- device_index->add_item("Right Button");
- device_index->add_item("Middle Button");
- device_index->add_item("Wheel Up Button");
- device_index->add_item("Wheel Down Button");
- device_index->add_item("Button 6");
- device_index->add_item("Button 7");
- device_index->add_item("Button 8");
- device_index->add_item("Button 9");
+ device_index->add_item(TTR("Left Button"));
+ device_index->add_item(TTR("Right Button"));
+ device_index->add_item(TTR("Middle Button"));
+ device_index->add_item(TTR("Wheel Up Button"));
+ device_index->add_item(TTR("Wheel Down Button"));
+ device_index->add_item(TTR("Button 6"));
+ device_index->add_item(TTR("Button 7"));
+ device_index->add_item(TTR("Button 8"));
+ device_index->add_item(TTR("Button 9"));
device_input->popup_centered(Size2(350,95));
} break;
case InputEvent::JOYSTICK_MOTION: {
device_id->set_val(0);
- device_index_label->set_text("Joystick Axis Index:");
+ device_index_label->set_text(TTR("Joystick Axis Index:"));
device_index->clear();
for(int i=0;i<JOY_AXIS_MAX*2;i++) {
String desc = _axis_names[i];
- device_index->add_item("Axis "+itos(i/2)+" "+(i&1?"+":"-")+desc);
+ device_index->add_item(TTR("Axis ")+itos(i/2)+" "+(i&1?"+":"-")+desc);
}
device_input->popup_centered(Size2(350,95));
@@ -365,7 +365,7 @@ void ProjectSettings::_add_item(int p_item){
case InputEvent::JOYSTICK_BUTTON: {
device_id->set_val(0);
- device_index_label->set_text("Joystick Button Index:");
+ device_index_label->set_text(TTR("Joystick Button Index:"));
device_index->clear();
for(int i=0;i<JOY_BUTTON_MAX;i++) {
@@ -409,7 +409,7 @@ void ProjectSettings::_action_button_pressed(Object* p_obj, int p_column,int p_i
Variant old_val = Globals::get_singleton()->get(name);
int order=Globals::get_singleton()->get_order(name);
- undo_redo->create_action("Add Input Action");
+ undo_redo->create_action(TTR("Add Input Action"));
undo_redo->add_do_method(Globals::get_singleton(),"clear",name);
undo_redo->add_undo_method(Globals::get_singleton(),"set",name,old_val);
undo_redo->add_undo_method(Globals::get_singleton(),"set_order",name,order);
@@ -438,7 +438,7 @@ void ProjectSettings::_action_button_pressed(Object* p_obj, int p_column,int p_i
va.resize(va.size()-1);
- undo_redo->create_action("Erase Input Action Event");
+ undo_redo->create_action(TTR("Erase Input Action Event"));
undo_redo->add_do_method(Globals::get_singleton(),"set",name,va);
undo_redo->add_undo_method(Globals::get_singleton(),"set",name,old_val);
undo_redo->add_do_method(this,"_update_actions");
@@ -503,13 +503,13 @@ void ProjectSettings::_update_actions() {
String str=keycode_get_string(ie.key.scancode).capitalize();
if (ie.key.mod.meta)
- str="Meta+"+str;
+ str=TTR("Meta+")+str;
if (ie.key.mod.shift)
- str="Shift+"+str;
+ str=TTR("Shift+")+str;
if (ie.key.mod.alt)
- str="Alt+"+str;
+ str=TTR("Alt+")+str;
if (ie.key.mod.control)
- str="Control+"+str;
+ str=TTR("Control+")+str;
action->set_text(0,str);
action->set_icon(0,get_icon("Keyboard","EditorIcons"));
@@ -517,7 +517,7 @@ void ProjectSettings::_update_actions() {
} break;
case InputEvent::JOYSTICK_BUTTON: {
- String str = "Device "+itos(ie.device)+", Button "+itos(ie.joy_button.button_index);
+ String str = TTR("Device ")+itos(ie.device)+", Button "+itos(ie.joy_button.button_index);
if (ie.joy_button.button_index>=0 && ie.joy_button.button_index<JOY_BUTTON_MAX)
str+=String()+" ("+_button_names[ie.joy_button.button_index]+").";
else
@@ -528,14 +528,14 @@ void ProjectSettings::_update_actions() {
} break;
case InputEvent::MOUSE_BUTTON: {
- String str = "Device "+itos(ie.device)+", ";
+ String str = TTR("Device ")+itos(ie.device)+", ";
switch (ie.mouse_button.button_index) {
- case BUTTON_LEFT: str+="Left Button."; break;
- case BUTTON_RIGHT: str+="Right Button."; break;
- case BUTTON_MIDDLE: str+="Middle Button."; break;
- case BUTTON_WHEEL_UP: str+="Wheel Up."; break;
- case BUTTON_WHEEL_DOWN: str+="Wheel Down."; break;
- default: str+="Button "+itos(ie.mouse_button.button_index)+".";
+ case BUTTON_LEFT: str+=TTR("Left Button."); break;
+ case BUTTON_RIGHT: str+=TTR("Right Button."); break;
+ case BUTTON_MIDDLE: str+=TTR("Middle Button."); break;
+ case BUTTON_WHEEL_UP: str+=TTR("Wheel Up."); break;
+ case BUTTON_WHEEL_DOWN: str+=TTR("Wheel Down."); break;
+ default: str+=TTR("Button ")+itos(ie.mouse_button.button_index)+".";
}
action->set_text(0,str);
@@ -546,7 +546,7 @@ void ProjectSettings::_update_actions() {
int ax = ie.joy_motion.axis;
int n = 2*ax + (ie.joy_motion.axis_value<0 ? 0:1);
String desc = _axis_names[n];
- String str = "Device "+itos(ie.device)+", Axis "+itos(ax)+" "+(ie.joy_motion.axis_value<0?"-":"+")+desc +".";
+ String str = TTR("Device ")+itos(ie.device)+", Axis "+itos(ax)+" "+(ie.joy_motion.axis_value<0?"-":"+")+desc +".";
action->set_text(0,str);
action->set_icon(0,get_icon("JoyAxis","EditorIcons"));
} break;
@@ -650,20 +650,20 @@ void ProjectSettings::_action_add() {
String action = action_name->get_text();
if (action.find("/")!=-1 || action.find(":")!=-1 || action=="") {
- message->set_text("Invalid Action (Anything goes but / or :).");
+ message->set_text(TTR("Invalid Action (Anything goes but / or :)."));
message->popup_centered(Size2(300,100));
return;
}
if (Globals::get_singleton()->has("input/"+action)) {
- message->set_text("Action '"+action+"' already exists!.");
+ message->set_text(TTR("Action '")+action+"' already exists!.");
message->popup_centered(Size2(300,100));
return;
}
Array va;
String name = "input/"+action;
- undo_redo->create_action("Add Input Action Event");
+ undo_redo->create_action(TTR("Add Input Action Event"));
undo_redo->add_do_method(Globals::get_singleton(),"set",name,va);
undo_redo->add_do_method(Globals::get_singleton(),"set_persisting",name,true);
undo_redo->add_undo_method(Globals::get_singleton(),"clear",name);
@@ -693,7 +693,7 @@ void ProjectSettings::_action_add() {
void ProjectSettings::_item_checked(const String& p_item, bool p_check) {
- undo_redo->create_action("Toggle Persisting");
+ undo_redo->create_action(TTR("Toggle Persisting"));
String full_item = globals_editor->get_full_item_path(p_item);
undo_redo->add_do_method(Globals::get_singleton(),"set_persisting",full_item,p_check);
@@ -710,7 +710,7 @@ void ProjectSettings::_item_checked(const String& p_item, bool p_check) {
void ProjectSettings::_save() {
Error err = Globals::get_singleton()->save();
- message->set_text(err!=OK?"Error saving settings.":"Settings Saved OK.");
+ message->set_text(err!=OK?TTR("Error saving settings."):"Settings Saved OK.");
message->popup_centered(Size2(300,100));
}
@@ -794,7 +794,7 @@ void ProjectSettings::_translation_add(const String& p_path) {
}
translations.push_back(p_path);
- undo_redo->create_action("Add Translation");
+ undo_redo->create_action(TTR("Add Translation"));
undo_redo->add_do_property(Globals::get_singleton(),"locale/translations",translations);
undo_redo->add_undo_property(Globals::get_singleton(),"locale/translations",Globals::get_singleton()->get("locale/translations"));
undo_redo->add_do_method(Globals::get_singleton(),"set_persisting","locale/translations",true);
@@ -851,7 +851,7 @@ void ProjectSettings::_autoload_edited() {
if (checked)
path="*"+path;
- undo_redo->create_action("Toggle Autoload GlobalVar");
+ undo_redo->create_action(TTR("Toggle Autoload GlobalVar"));
undo_redo->add_do_property(Globals::get_singleton(),base,path);
undo_redo->add_undo_property(Globals::get_singleton(),base,Globals::get_singleton()->get(base));
undo_redo->add_do_method(Globals::get_singleton(),"set_order",base,order); // keep order, as config order matters for these
@@ -877,7 +877,7 @@ void ProjectSettings::_autoload_add() {
if (ObjectTypeDB::type_exists(name)) {
- message->set_text("Invalid Name.Must not collide with an existing engine class name.");
+ message->set_text(TTR("Invalid Name.Must not collide with an existing engine class name."));
message->popup_centered(Size2(300,100));
return;
@@ -886,7 +886,7 @@ void ProjectSettings::_autoload_add() {
for(int i=0;i<Variant::VARIANT_MAX;i++) {
if (Variant::get_type_name(Variant::Type(i))==name) {
- message->set_text("Invalid Name.Must not collide with an existing buit-in type name.");
+ message->set_text(TTR("Invalid Name.Must not collide with an existing buit-in type name."));
message->popup_centered(Size2(300,100));
return;
@@ -897,7 +897,7 @@ void ProjectSettings::_autoload_add() {
if (GlobalConstants::get_global_constant_name(i)==name) {
- message->set_text("Invalid Name.Must not collide with an existing global constant name.");
+ message->set_text(TTR("Invalid Name.Must not collide with an existing global constant name."));
message->popup_centered(Size2(300,100));
return;
}
@@ -918,7 +918,7 @@ void ProjectSettings::_autoload_add() {
}
- undo_redo->create_action("Add Autoload");
+ undo_redo->create_action(TTR("Add Autoload"));
name = "autoload/"+name;
undo_redo->add_do_property(Globals::get_singleton(),name,"*"+path);
if (Globals::get_singleton()->has(name))
@@ -948,7 +948,7 @@ void ProjectSettings::_autoload_delete(Object *p_item,int p_column, int p_button
if (p_button==0) {
//delete
int order = Globals::get_singleton()->get_order(name);
- undo_redo->create_action("Remove Autoload");
+ undo_redo->create_action(TTR("Remove Autoload"));
undo_redo->add_do_property(Globals::get_singleton(),name,Variant());
undo_redo->add_undo_property(Globals::get_singleton(),name,Globals::get_singleton()->get(name));
undo_redo->add_undo_method(Globals::get_singleton(),"set_persisting",name,true);
@@ -975,7 +975,7 @@ void ProjectSettings::_autoload_delete(Object *p_item,int p_column, int p_button
int order = Globals::get_singleton()->get_order(name);
int swap_order = Globals::get_singleton()->get_order(swap_name);
- undo_redo->create_action("Move Autoload");
+ undo_redo->create_action(TTR("Move Autoload"));
undo_redo->add_do_method(Globals::get_singleton(),"set_order",swap_name,order);
undo_redo->add_do_method(Globals::get_singleton(),"set_order",name,swap_order);
undo_redo->add_undo_method(Globals::get_singleton(),"set_order",swap_name,swap_order);
@@ -1004,7 +1004,7 @@ void ProjectSettings::_translation_delete(Object *p_item,int p_column, int p_but
translations.remove(idx);
- undo_redo->create_action("Remove Translation");
+ undo_redo->create_action(TTR("Remove Translation"));
undo_redo->add_do_property(Globals::get_singleton(),"locale/translations",translations);
undo_redo->add_undo_property(Globals::get_singleton(),"locale/translations",Globals::get_singleton()->get("locale/translations"));
undo_redo->add_do_method(this,"_update_translations");
@@ -1037,7 +1037,7 @@ void ProjectSettings::_translation_res_add(const String& p_path){
remaps[p_path]=StringArray();
- undo_redo->create_action("Add Remapped Path");
+ undo_redo->create_action(TTR("Add Remapped Path"));
undo_redo->add_do_property(Globals::get_singleton(),"locale/translation_remaps",remaps);
undo_redo->add_do_method(Globals::get_singleton(),"set_persisting","locale/translation_remaps",true);
undo_redo->add_undo_property(Globals::get_singleton(),"locale/translation_remaps",prev);
@@ -1071,7 +1071,7 @@ void ProjectSettings::_translation_res_option_add(const String& p_path) {
remaps[key]=r;
- undo_redo->create_action("Resource Remap Add Remap");
+ undo_redo->create_action(TTR("Resource Remap Add Remap"));
undo_redo->add_do_property(Globals::get_singleton(),"locale/translation_remaps",remaps);
undo_redo->add_do_method(Globals::get_singleton(),"set_persisting","locale/translation_remaps",true);
undo_redo->add_undo_property(Globals::get_singleton(),"locale/translation_remaps",Globals::get_singleton()->get("locale/translation_remaps"));
@@ -1126,7 +1126,7 @@ void ProjectSettings::_translation_res_option_changed() {
remaps[key]=r;
updating_translations=true;
- undo_redo->create_action("Change Resource Remap Language");
+ undo_redo->create_action(TTR("Change Resource Remap Language"));
undo_redo->add_do_property(Globals::get_singleton(),"locale/translation_remaps",remaps);
undo_redo->add_do_method(Globals::get_singleton(),"set_persisting","locale/translation_remaps",true);
undo_redo->add_undo_property(Globals::get_singleton(),"locale/translation_remaps",Globals::get_singleton()->get("locale/translation_remaps"));
@@ -1158,7 +1158,7 @@ void ProjectSettings::_translation_res_delete(Object *p_item,int p_column, int p
remaps.erase(key);
- undo_redo->create_action("Remove Resource Remap");
+ undo_redo->create_action(TTR("Remove Resource Remap"));
undo_redo->add_do_property(Globals::get_singleton(),"locale/translation_remaps",remaps);
undo_redo->add_do_method(Globals::get_singleton(),"set_persisting","locale/translation_remaps",true);
undo_redo->add_undo_property(Globals::get_singleton(),"locale/translation_remaps",Globals::get_singleton()->get("locale/translation_remaps"));
@@ -1194,7 +1194,7 @@ void ProjectSettings::_translation_res_option_delete(Object *p_item,int p_column
remaps[key]=r;
- undo_redo->create_action("Remove Resource Remap Option");
+ undo_redo->create_action(TTR("Remove Resource Remap Option"));
undo_redo->add_do_property(Globals::get_singleton(),"locale/translation_remaps",remaps);
undo_redo->add_do_method(Globals::get_singleton(),"set_persisting","locale/translation_remaps",true);
undo_redo->add_undo_property(Globals::get_singleton(),"locale/translation_remaps",Globals::get_singleton()->get("locale/translation_remaps"));
@@ -1351,7 +1351,7 @@ void ProjectSettings::_update_autoload() {
t->set_text(1,path);
t->set_cell_mode(2,TreeItem::CELL_MODE_CHECK);
t->set_editable(2,true);
- t->set_text(2,"Enable");
+ t->set_text(2,TTR("Enable"));
t->set_checked(2,global);
t->add_button(3,get_icon("MoveUp","EditorIcons"),1);
t->add_button(3,get_icon("MoveDown","EditorIcons"),2);
@@ -1446,7 +1446,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
singleton=this;
- set_title("Project Settings (engine.cfg)");
+ set_title(TTR("Project Settings (engine.cfg)"));
undo_redo=&p_data->get_undo_redo();
data=p_data;
@@ -1464,7 +1464,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
props_base->set_alignment(BoxContainer::ALIGN_BEGIN);
props_base->set_v_size_flags(Control::SIZE_EXPAND_FILL);
tab_container->add_child(props_base);
- props_base->set_name("General");
+ props_base->set_name(TTR("General"));
HBoxContainer *hbc = memnew( HBoxContainer );
hbc->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -1473,7 +1473,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
search_button = memnew( ToolButton );
search_button->set_toggle_mode(true);
search_button->set_pressed(false);
- search_button->set_text("Search");
+ search_button->set_text(TTR("Search"));
hbc->add_child(search_button);
search_button->connect("toggled",this,"_toggle_search_bar");
@@ -1485,7 +1485,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
Label *l = memnew( Label );
add_prop_bar->add_child(l);
- l->set_text("Category:");
+ l->set_text(TTR("Category:"));
category = memnew( LineEdit );
category->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -1494,7 +1494,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
l = memnew( Label );
add_prop_bar->add_child(l);
- l->set_text("Property:");
+ l->set_text(TTR("Property:"));
property = memnew( LineEdit );
property->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -1503,7 +1503,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
l = memnew( Label );
add_prop_bar->add_child(l);
- l->set_text("Type:");
+ l->set_text(TTR("Type:"));
type = memnew( OptionButton );
type->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -1515,12 +1515,12 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
Button *add = memnew( Button );
add_prop_bar->add_child(add);
- add->set_text("Add");
+ add->set_text(TTR("Add"));
add->connect("pressed",this,"_item_add");
Button *del = memnew( Button );
add_prop_bar->add_child(del);
- del->set_text("Del");
+ del->set_text(TTR("Del"));
del->connect("pressed",this,"_item_del");
search_bar = memnew( HBoxContainer );
@@ -1556,7 +1556,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
save->set_anchor(MARGIN_BOTTOM,ANCHOR_END);
save->set_begin( Point2(80,28) );
save->set_end( Point2(10,20) );
- save->set_text("Save");
+ save->set_text(TTR("Save"));
save->connect("pressed",this,"_save");
*/
@@ -1564,7 +1564,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
props_base->add_child(hbc);
popup_platform = memnew( MenuButton );
- popup_platform->set_text("Copy To Platform..");
+ popup_platform->set_text(TTR("Copy To Platform.."));
popup_platform->set_disabled(true);
hbc->add_child(popup_platform);
@@ -1581,7 +1581,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
}
popup_platform->get_popup()->connect("item_pressed",this,"_copy_to_platform");
- get_ok()->set_text("Close");
+ get_ok()->set_text(TTR("Close"));
set_hide_on_ok(true);
message = memnew( ConfirmationDialog );
@@ -1590,14 +1590,14 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
message->set_hide_on_ok(true);
Control *input_base = memnew( Control );
- input_base->set_name("Input Map");
+ input_base->set_name(TTR("Input Map"));
input_base->set_area_as_parent_rect();;
tab_container->add_child(input_base);
l = memnew( Label );
input_base->add_child(l);
l->set_pos(Point2(6,5));
- l->set_text("Action:");
+ l->set_text(TTR("Action:"));
action_name = memnew( LineEdit );
action_name->set_anchor(MARGIN_RIGHT,ANCHOR_RATIO);
@@ -1612,7 +1612,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
add->set_begin( Point2(0.86,25) );
add->set_anchor(MARGIN_RIGHT,ANCHOR_END);
add->set_end( Point2(5,26) );
- add->set_text("Add");
+ add->set_text(TTR("Add"));
add->connect("pressed",this,"_action_add");
input_editor = memnew( Tree );
@@ -1634,7 +1634,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
add_child(press_a_key);
l = memnew( Label );
- l->set_text("Press a Key..");
+ l->set_text(TTR("Press a Key.."));
l->set_area_as_parent_rect();
l->set_align(Label::ALIGN_CENTER);
l->set_margin(MARGIN_TOP,20);
@@ -1647,16 +1647,16 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
device_input=memnew( ConfirmationDialog );
add_child(device_input);
- device_input->get_ok()->set_text("Add");
+ device_input->get_ok()->set_text(TTR("Add"));
device_input->connect("confirmed",this,"_device_input_add");
l = memnew( Label );
- l->set_text("Device:");
+ l->set_text(TTR("Device:"));
l->set_pos(Point2(15,10));
device_input->add_child(l);
l = memnew( Label );
- l->set_text("Index:");
+ l->set_text(TTR("Index:"));
l->set_pos(Point2(90,10));
device_input->add_child(l);
device_index_label=l;
@@ -1684,26 +1684,26 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
save->set_anchor(MARGIN_BOTTOM,ANCHOR_END);
save->set_begin( Point2(80,28) );
save->set_end( Point2(10,20) );
- save->set_text("Save");
+ save->set_text(TTR("Save"));
save->connect("pressed",this,"_save");
*/
setting=false;
//translations
TabContainer *translations = memnew( TabContainer );
- translations->set_name("Localization");
+ translations->set_name(TTR("Localization"));
tab_container->add_child(translations);
{
VBoxContainer *tvb = memnew( VBoxContainer );
translations->add_child(tvb);
- tvb->set_name("Translations");
+ tvb->set_name(TTR("Translations"));
HBoxContainer *thb = memnew( HBoxContainer);
tvb->add_child(thb);
- thb->add_child( memnew( Label("Translations:")));
+ thb->add_child( memnew( Label(TTR("Translations:"))));
thb->add_spacer();
- Button *addtr = memnew( Button("Add..") );
+ Button *addtr = memnew( Button(TTR("Add..")) );
addtr->connect("pressed",this,"_translation_file_open");
thb->add_child(addtr);
MarginContainer *tmc = memnew( MarginContainer );
@@ -1723,12 +1723,12 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
{
VBoxContainer *tvb = memnew( VBoxContainer );
translations->add_child(tvb);
- tvb->set_name("Remaps");
+ tvb->set_name(TTR("Remaps"));
HBoxContainer *thb = memnew( HBoxContainer);
tvb->add_child(thb);
- thb->add_child( memnew( Label("Resources:")));
+ thb->add_child( memnew( Label(TTR("Resources:"))));
thb->add_spacer();
- Button *addtr = memnew( Button("Add..") );
+ Button *addtr = memnew( Button(TTR("Add..")) );
addtr->connect("pressed",this,"_translation_res_file_open");
thb->add_child(addtr);
MarginContainer *tmc = memnew( MarginContainer );
@@ -1747,9 +1747,9 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
thb = memnew( HBoxContainer);
tvb->add_child(thb);
- thb->add_child( memnew( Label("Remaps by Locale:")));
+ thb->add_child( memnew( Label(TTR("Remaps by Locale:"))));
thb->add_spacer();
- addtr = memnew( Button("Add..") );
+ addtr = memnew( Button(TTR("Add..")) );
addtr->connect("pressed",this,"_translation_res_option_file_open");
translation_res_option_add_button=addtr;
thb->add_child(addtr);
@@ -1762,7 +1762,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
translation_remap_options->set_columns(2);
translation_remap_options->set_column_title(0,"Path");
- translation_remap_options->set_column_title(1,"Locale");
+ translation_remap_options->set_column_title(1,TTR("Locale"));
translation_remap_options->set_column_titles_visible(true);
translation_remap_options->set_column_expand(0,true);
translation_remap_options->set_column_expand(1,false);
@@ -1781,7 +1781,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
{
VBoxContainer *avb = memnew( VBoxContainer );
tab_container->add_child(avb);
- avb->set_name("AutoLoad");
+ avb->set_name(TTR("AutoLoad"));
HBoxContainer *ahb = memnew( HBoxContainer);
avb->add_child(ahb);
@@ -1796,7 +1796,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
ahb_path->add_child(browseaa);
browseaa->connect("pressed",this,"_autoload_file_open");
- avb_path->add_margin_child("Path:",ahb_path);
+ avb_path->add_margin_child(TTR("Path:"),ahb_path);
ahb->add_child(avb_path);
VBoxContainer *avb_name = memnew( VBoxContainer );
@@ -1806,8 +1806,8 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
autoload_add_name = memnew(LineEdit);
autoload_add_name->set_h_size_flags(SIZE_EXPAND_FILL);
ahb_name->add_child(autoload_add_name);
- avb_name->add_margin_child("Node Name:",ahb_name);
- Button *addaa = memnew( Button("Add") );
+ avb_name->add_margin_child(TTR("Node Name:"),ahb_name);
+ Button *addaa = memnew( Button(TTR("Add")) );
ahb_name->add_child(addaa);
addaa->connect("pressed",this,"_autoload_add");
@@ -1815,7 +1815,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
autoload_list = memnew( Tree );
autoload_list->set_v_size_flags(SIZE_EXPAND_FILL);
- avb->add_margin_child("List:",autoload_list,true);
+ avb->add_margin_child(TTR("List:"),autoload_list,true);
autoload_file_open=memnew( EditorFileDialog );
add_child(autoload_file_open);
@@ -1824,13 +1824,13 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
autoload_list->set_columns(4);
autoload_list->set_column_titles_visible(true);
- autoload_list->set_column_title(0,"Name");
+ autoload_list->set_column_title(0,TTR("Name"));
autoload_list->set_column_expand(0,true);
autoload_list->set_column_min_width(0,100);
autoload_list->set_column_title(1,"Path");
autoload_list->set_column_expand(1,true);
autoload_list->set_column_min_width(1,100);
- autoload_list->set_column_title(2,"Singleton");
+ autoload_list->set_column_title(2,TTR("Singleton"));
autoload_list->set_column_expand(2,false);
autoload_list->set_column_min_width(2,80);
autoload_list->set_column_expand(3,false);
@@ -1846,7 +1846,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
{
plugin_settings = memnew( EditorPluginSettings );
- plugin_settings->set_name("Plugins");
+ plugin_settings->set_name(TTR("Plugins"));
tab_container->add_child(plugin_settings);
}
@@ -1861,7 +1861,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
/*
Control * es = memnew( Control );
- es->set_name("Export");
+ es->set_name(TTR("Export"));
tab_container->add_child(es);
export_settings = memnew( ProjectExportSettings );
es->add_child(export_settings);
diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp
index 110f5bb7f5..7c88870902 100644
--- a/tools/editor/property_editor.cpp
+++ b/tools/editor/property_editor.cpp
@@ -347,15 +347,15 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
type_button->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_END,3);
type_button->set_anchor_and_margin(MARGIN_TOP,ANCHOR_END,25);
type_button->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_END,7);
- type_button->set_text("Preset..");
+ type_button->set_text(TTR("Preset.."));
type_button->get_popup()->clear();
- type_button->get_popup()->add_item("Linear",EASING_LINEAR);
- type_button->get_popup()->add_item("Ease In",EASING_EASE_IN);
- type_button->get_popup()->add_item("Ease Out",EASING_EASE_OUT);
+ type_button->get_popup()->add_item(TTR("Linear"),EASING_LINEAR);
+ type_button->get_popup()->add_item(TTR("Ease In"),EASING_EASE_IN);
+ type_button->get_popup()->add_item(TTR("Ease Out"),EASING_EASE_OUT);
if (hint_text!="attenuation") {
- type_button->get_popup()->add_item("Zero",EASING_ZERO);
- type_button->get_popup()->add_item("Easing In-Out",EASING_IN_OUT);
- type_button->get_popup()->add_item("Easing Out-In",EASING_OUT_IN);
+ type_button->get_popup()->add_item(TTR("Zero"),EASING_ZERO);
+ type_button->get_popup()->add_item(TTR("Easing In-Out"),EASING_IN_OUT);
+ type_button->get_popup()->add_item(TTR("Easing Out-In"),EASING_OUT_IN);
}
type_button->show();
@@ -393,15 +393,15 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
if (hint==PROPERTY_HINT_FILE || hint==PROPERTY_HINT_GLOBAL_FILE) {
List<String> names;
- names.push_back("File..");
- names.push_back("Clear");
+ names.push_back(TTR("File.."));
+ names.push_back(TTR("Clear"));
config_action_buttons(names);
} else if (hint==PROPERTY_HINT_DIR || hint==PROPERTY_HINT_GLOBAL_DIR) {
List<String> names;
- names.push_back("Dir..");
- names.push_back("Clear");
+ names.push_back(TTR("Dir.."));
+ names.push_back(TTR("Clear"));
config_action_buttons(names);
} else if (hint==PROPERTY_HINT_ENUM) {
@@ -414,8 +414,8 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
//action_buttons[0];
- int button_margin = get_constant("button_margin","Dialogs");
- int margin = get_constant("margin","Dialogs");
+ int button_margin = get_constant("button_margin",TTR("Dialogs"));
+ int margin = get_constant("margin",TTR("Dialogs"));
action_buttons[0]->set_anchor( MARGIN_LEFT, ANCHOR_END );
action_buttons[0]->set_anchor( MARGIN_TOP, ANCHOR_END );
@@ -423,7 +423,7 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
action_buttons[0]->set_anchor( MARGIN_BOTTOM, ANCHOR_END );
action_buttons[0]->set_begin( Point2( 70, button_margin-5 ) );
action_buttons[0]->set_end( Point2( margin, margin ) );
- action_buttons[0]->set_text("Close");
+ action_buttons[0]->set_text(TTR("Close"));
action_buttons[0]->show();
} else {
@@ -634,17 +634,17 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
case Variant::IMAGE: {
List<String> names;
- names.push_back("New");
- names.push_back("Load");
- names.push_back("Clear");
+ names.push_back(TTR("New"));
+ names.push_back(TTR("Load"));
+ names.push_back(TTR("Clear"));
config_action_buttons(names);
} break;
case Variant::NODE_PATH: {
List<String> names;
- names.push_back("Assign");
- names.push_back("Clear");
+ names.push_back(TTR("Assign"));
+ names.push_back(TTR("Clear"));
config_action_buttons(names);
} break;
@@ -689,7 +689,7 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
menu->add_icon_item(get_icon(t,"EditorIcons"),"New "+t,id);
} else {
- menu->add_item("New "+t,id);
+ menu->add_item(TTR("New ")+t,id);
}
idx++;
@@ -745,12 +745,12 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
if (!RES(v).is_null()) {
- menu->add_item("Copy",OBJ_MENU_COPY);
+ menu->add_item(TTR("Copy"),OBJ_MENU_COPY);
}
if (paste_valid) {
- menu->add_item("Paste",OBJ_MENU_PASTE);
+ menu->add_item(TTR("Paste"),OBJ_MENU_PASTE);
}
}
@@ -830,7 +830,7 @@ void CustomPropertyEditor::_file_selected(String p_file) {
RES res = ResourceLoader::load(p_file,type);
if (res.is_null()) {
- error->set_text("Error loading file: Not a resource!");
+ error->set_text(TTR("Error loading file: Not a resource!"));
error->popup_centered_minsize();
break;
}
@@ -842,7 +842,7 @@ void CustomPropertyEditor::_file_selected(String p_file) {
Image image;
Error err = ImageLoader::load_image(p_file,&image);
- ERR_EXPLAIN("Couldn't load image");
+ ERR_EXPLAIN(TTR("Couldn't load image"));
ERR_FAIL_COND(err);
v=image;
emit_signal("variant_changed");
@@ -931,7 +931,7 @@ void CustomPropertyEditor::_node_path_selected(NodePath p_path) {
if (owner->is_type("Node"))
node = owner->cast_to<Node>();
- else if (owner->is_type("ArrayPropertyEdit"))
+ else if (owner->is_type(TTR("ArrayPropertyEdit")))
node = owner->cast_to<ArrayPropertyEdit>()->get_node();
if (!node) {
@@ -1727,7 +1727,7 @@ CustomPropertyEditor::CustomPropertyEditor() {
add_child(checks20[i]);
checks20[i]->hide();
checks20[i]->connect("pressed",this,"_action_pressed",make_binds(i));
- checks20[i]->set_tooltip("Bit "+itos(i)+", val "+itos(1<<i)+".");
+ checks20[i]->set_tooltip(TTR("Bit ")+itos(i)+", val "+itos(1<<i)+".");
}
text_edit = memnew( TextEdit );
@@ -1767,7 +1767,7 @@ CustomPropertyEditor::CustomPropertyEditor() {
file->connect("dir_selected", this,"_file_selected");
error = memnew( ConfirmationDialog );
- error->set_title("Error!");
+ error->set_title(TTR("Error!"));
add_child(error);
//error->get_cancel()->hide();
@@ -2465,11 +2465,11 @@ void PropertyEditor::update_tree() {
TreeItem *title = tree->create_item(root);
title->set_custom_bg_color(0,get_color("prop_section","Editor"));
- title->set_text(0,"Property"); // todo, fetch name if ID exists in database
+ title->set_text(0,TTR("Property")); // todo, fetch name if ID exists in database
title->set_editable(0,false);
title->set_selectable(0,false);
title->set_custom_bg_color(1,get_color("prop_section","Editor"));
- title->set_text(1,"Value"); // todo, fetch name if ID exists in database
+ title->set_text(1,TTR("Value")); // todo, fetch name if ID exists in database
title->set_editable(1,false);
title->set_selectable(1,false);
*/
@@ -2478,7 +2478,7 @@ void PropertyEditor::update_tree() {
if (obj->cast_to<Node>() || obj->cast_to<Resource>()) {
TreeItem *type = tree->create_item(root);
- type->set_text(0,"Type"); // todo, fetch name if ID exists in database
+ type->set_text(0,TTR("Type")); // todo, fetch name if ID exists in database
type->set_text(1,obj->get_type()); // todo, fetch name if ID exists in database
if (has_icon(obj->get_type(),"EditorIcons"))
type->set_icon(1,get_icon(obj->get_type(),"EditorIcons") );
@@ -2491,7 +2491,7 @@ void PropertyEditor::update_tree() {
TreeItem *name = tree->create_item(root);
- name->set_text(0,"Name"); // todo, fetch name if ID exists in database
+ name->set_text(0,TTR("Name")); // todo, fetch name if ID exists in database
if (obj->is_type("Resource"))
name->set_text(1,obj->cast_to<Resource>()->get_name());
else if (obj->is_type("Node"))
@@ -2552,7 +2552,7 @@ void PropertyEditor::update_tree() {
sep->set_icon(0,get_icon(type,"EditorIcons") );
else
sep->set_icon(0,get_icon("Object","EditorIcons") );
- print_line("CATEGORY: "+type);
+ print_line(TTR("CATEGORY: ")+type);
*/
sep->set_text(0,type);
sep->set_selectable(0,false);
@@ -2574,7 +2574,7 @@ void PropertyEditor::update_tree() {
}
- sep->set_tooltip(0,"Class: "+p.name+":\n\n"+class_descr_cache[type]);
+ sep->set_tooltip(0,TTR("Class: ")+p.name+":\n\n"+class_descr_cache[type]);
}
//sep->set_custom_color(0,Color(1,1,1));
@@ -2671,7 +2671,7 @@ void PropertyEditor::update_tree() {
descr_cache[type][setter]=descr;
}
- item->set_tooltip(0, "Property: "+p.name+"\n\n"+descr);
+ item->set_tooltip(0, TTR("Property: ")+p.name+"\n\n"+descr);
}
}
//EditorHelp::get_doc_data();
@@ -2702,7 +2702,7 @@ void PropertyEditor::update_tree() {
case Variant::BOOL: {
item->set_cell_mode( 1, TreeItem::CELL_MODE_CHECK );
- item->set_text(1,"On");
+ item->set_text(1,TTR("On"));
item->set_checked( 1, obj->get( p.name ) );
if (show_type_icons)
item->set_icon( 0, get_icon("Bool","EditorIcons") );
@@ -3240,7 +3240,7 @@ void PropertyEditor::_edit_set(const String& p_name, const Variant& p_value) {
} else {
- undo_redo->create_action("Set "+p_name,true);
+ undo_redo->create_action(TTR("Set ")+p_name,true);
undo_redo->add_do_property(obj,p_name,p_value);
undo_redo->add_undo_property(obj,p_name,obj->get(p_name));
undo_redo->add_do_method(this,"_changed_callback",obj,p_name);
@@ -3752,7 +3752,7 @@ PropertyEditor::PropertyEditor() {
update_tree_pending=false;
top_label = memnew( Label );
- top_label->set_text("Properties:");
+ top_label->set_text(TTR("Properties:"));
top_label->set_anchor( MARGIN_RIGHT, ANCHOR_END );
top_label->set_begin( Point2( 10,0) );
top_label->set_end( Point2( 0,12) );
@@ -4003,7 +4003,7 @@ void SectionedPropertyEditor::update_category_list() {
} else {
if (!existing_sections.has("")) {
existing_sections.insert("");
- sections->add_item("Global");
+ sections->add_item(TTR("Global"));
sections->set_item_metadata(sections->get_item_count()-1,"");
}
}
@@ -4026,7 +4026,7 @@ SectionedPropertyEditor::SectionedPropertyEditor() {
sections = memnew( ItemList );
sections->set_v_size_flags(SIZE_EXPAND_FILL);
- left_vb->add_margin_child("Sections:",sections,true);
+ left_vb->add_margin_child(TTR("Sections:"),sections,true);
VBoxContainer *right_vb = memnew( VBoxContainer);
right_vb->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -4035,7 +4035,7 @@ SectionedPropertyEditor::SectionedPropertyEditor() {
filter = memnew( SectionedPropertyEditorFilter );
editor = memnew( PropertyEditor );
editor->set_v_size_flags(SIZE_EXPAND_FILL);
- right_vb->add_margin_child("Properties:",editor,true);
+ right_vb->add_margin_child(TTR("Properties:"),editor,true);
editor->get_scene_tree()->set_column_titles_visible(false);
diff --git a/tools/editor/pvrtc_compress.cpp b/tools/editor/pvrtc_compress.cpp
index c30aedc1dc..fcb3c7abc8 100644
--- a/tools/editor/pvrtc_compress.cpp
+++ b/tools/editor/pvrtc_compress.cpp
@@ -82,7 +82,7 @@ static void _compress_image(Image::CompressMode p_mode,Image *p_image) {
}
- if (EditorSettings::get_singleton()->get("PVRTC/fast_conversion").operator bool()) {
+ if (EditorSettings::get_singleton()->get(TTR("PVRTC/fast_conversion")).operator bool()) {
args.push_back("-pvrtcfast");
}
if (p_image->get_mipmaps()>0)
@@ -93,13 +93,13 @@ static void _compress_image(Image::CompressMode p_mode,Image *p_image) {
ResourceSaver::save(src_img,t);
Error err = OS::get_singleton()->execute(ttpath,args,true);
- ERR_EXPLAIN("Could not execute PVRTC Tool: "+ttpath);
+ ERR_EXPLAIN(TTR("Could not execute PVRTC Tool: ")+ttpath);
ERR_FAIL_COND(err!=OK);
t=ResourceLoader::load(dst_img,"Texture");
- ERR_EXPLAIN("Can't load back converted image using PVRTC Tool: "+dst_img);
+ ERR_EXPLAIN(TTR("Can't load back converted image using PVRTC Tool: ")+dst_img);
ERR_FAIL_COND(t.is_null());
*p_image=t->get_data();
diff --git a/tools/editor/quick_open.cpp b/tools/editor/quick_open.cpp
index 828275340b..72059c264f 100644
--- a/tools/editor/quick_open.cpp
+++ b/tools/editor/quick_open.cpp
@@ -216,12 +216,12 @@ EditorQuickOpen::EditorQuickOpen() {
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("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);
diff --git a/tools/editor/reparent_dialog.cpp b/tools/editor/reparent_dialog.cpp
index 2a886b85fa..7803208c89 100644
--- a/tools/editor/reparent_dialog.cpp
+++ b/tools/editor/reparent_dialog.cpp
@@ -84,7 +84,7 @@ void ReparentDialog::_bind_methods() {
ReparentDialog::ReparentDialog() {
- set_title("Reparent Node");
+ set_title(TTR("Reparent Node"));
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
@@ -93,25 +93,25 @@ ReparentDialog::ReparentDialog() {
tree = memnew( SceneTreeEditor(false) );
tree->set_show_enabled_subscene(true);
- vbc->add_margin_child("Reparent Location (Select new Parent):",tree,true);
+ vbc->add_margin_child(TTR("Reparent Location (Select new Parent):"),tree,true);
tree->get_scene_tree()->connect("item_activated",this,"_reparent");
//Label *label = memnew( Label );
//label->set_pos( Point2( 15,8) );
- //label->set_text("Reparent Location (Select new Parent):");
+ //label->set_text(TTR("Reparent Location (Select new Parent):"));
keep_transform = memnew( CheckBox );
- keep_transform->set_text("Keep Global Transform");
+ keep_transform->set_text(TTR("Keep Global Transform"));
keep_transform->set_pressed(true);
vbc->add_child(keep_transform);
- //vbc->add_margin_child("Options:",node_only);;
+ //vbc->add_margin_child(TTR("Options:"),node_only);;
//cancel->connect("pressed", this,"_cancel");
- get_ok()->set_text("Reparent");
+ get_ok()->set_text(TTR("Reparent"));
}
diff --git a/tools/editor/resources_dock.cpp b/tools/editor/resources_dock.cpp
index 5e44162c93..10292ed10d 100644
--- a/tools/editor/resources_dock.cpp
+++ b/tools/editor/resources_dock.cpp
@@ -133,7 +133,7 @@ void ResourcesDock::save_resource(const String& p_path,const Ref<Resource>& p_re
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;
}
@@ -351,21 +351,21 @@ ResourcesDock::ResourcesDock(EditorNode *p_editor) {
Button *b;
b = memnew( ToolButton );
- b->set_tooltip("Create New Resource");
+ b->set_tooltip(TTR("Create New Resource"));
b->connect("pressed",this,"_tool_selected",make_binds(TOOL_NEW));
hbc->add_child( b );
button_new=b;
b = memnew( ToolButton );
- b->set_tooltip("Open Resource");
+ b->set_tooltip(TTR("Open Resource"));
b->connect("pressed",this,"_tool_selected",make_binds(TOOL_OPEN));
hbc->add_child( b );
button_open=b;
MenuButton *mb = memnew( MenuButton );
- mb->set_tooltip("Save Resource");
- mb->get_popup()->add_item("Save Resource",TOOL_SAVE);
- mb->get_popup()->add_item("Save Resource As..",TOOL_SAVE_AS);
+ mb->set_tooltip(TTR("Save Resource"));
+ mb->get_popup()->add_item(TTR("Save Resource"),TOOL_SAVE);
+ mb->get_popup()->add_item(TTR("Save Resource As.."),TOOL_SAVE_AS);
mb->get_popup()->connect("item_pressed",this,"_tool_selected" );
hbc->add_child( mb );
button_save=mb;
@@ -373,10 +373,10 @@ ResourcesDock::ResourcesDock(EditorNode *p_editor) {
hbc->add_spacer();
mb = memnew( MenuButton );
- mb->set_tooltip("Resource Tools");
- mb->get_popup()->add_item("Make Local",TOOL_MAKE_LOCAL);
- mb->get_popup()->add_item("Copy",TOOL_COPY);
- mb->get_popup()->add_item("Paste",TOOL_PASTE);
+ mb->set_tooltip(TTR("Resource Tools"));
+ mb->get_popup()->add_item(TTR("Make Local"),TOOL_MAKE_LOCAL);
+ mb->get_popup()->add_item(TTR("Copy"),TOOL_COPY);
+ mb->get_popup()->add_item(TTR("Paste"),TOOL_PASTE);
mb->get_popup()->connect("item_pressed",this,"_tool_selected" );
hbc->add_child( mb );
button_tools=mb;
diff --git a/tools/editor/run_settings_dialog.cpp b/tools/editor/run_settings_dialog.cpp
index 9dc4d703fc..fd2e9f9759 100644
--- a/tools/editor/run_settings_dialog.cpp
+++ b/tools/editor/run_settings_dialog.cpp
@@ -79,20 +79,20 @@ RunSettingsDialog::RunSettingsDialog() {
set_child_rect(vbc);
run_mode = memnew( OptionButton );
- vbc->add_margin_child("Run Mode:",run_mode);
- run_mode->add_item("Current Scene");
- run_mode->add_item("Main Scene");
+ vbc->add_margin_child(TTR("Run Mode:"),run_mode);
+ run_mode->add_item(TTR("Current Scene"));
+ run_mode->add_item(TTR("Main Scene"));
run_mode->connect("item_selected",this,"_run_mode_changed");
arguments = memnew( LineEdit );
- vbc->add_margin_child("Main Scene Arguments:",arguments);
+ vbc->add_margin_child(TTR("Main Scene Arguments:"),arguments);
arguments->set_editable(false);
- get_ok()->set_text("Close");
- //get_cancel()->set_text("Close");
+ get_ok()->set_text(TTR("Close"));
+ //get_cancel()->set_text(TTR("Close"));
arguments->set_text("-l $scene");
- set_title("Scene Run Settings");
+ set_title(TTR("Scene Run Settings"));
}
diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp
index c6115ba87a..113d18ea73 100644
--- a/tools/editor/scene_tree_dock.cpp
+++ b/tools/editor/scene_tree_dock.cpp
@@ -63,8 +63,8 @@ Node* SceneTreeDock::instance(const String& p_file) {
current_option=-1;
//accept->get_cancel()->hide();
- accept->get_ok()->set_text("Ok :( ");
- accept->set_text("No parent to instance a child at.");
+ accept->get_ok()->set_text(TTR("Ok :( "));
+ accept->set_text(TTR("No parent to instance a child at."));
accept->popup_centered_minsize();
return NULL;
};
@@ -81,8 +81,8 @@ Node* SceneTreeDock::instance(const String& p_file) {
current_option=-1;
//accept->get_cancel()->hide();
- accept->get_ok()->set_text("Ugh");
- accept->set_text(String("Error loading scene from ")+p_file);
+ accept->get_ok()->set_text(TTR("Ugh"));
+ accept->set_text(String(TTR("Error loading scene from "))+p_file);
accept->popup_centered_minsize();
return NULL;
}
@@ -92,8 +92,8 @@ Node* SceneTreeDock::instance(const String& p_file) {
if (_cyclical_dependency_exists(edited_scene->get_filename(), instanced_scene)) {
- accept->get_ok()->set_text("Ok");
- accept->set_text(String("Cannot instance the scene '")+p_file+String("' because the current scene exists within one of its' nodes."));
+ accept->get_ok()->set_text(TTR("Ok"));
+ accept->set_text(String(TTR("Cannot instance the scene '"))+p_file+String("' because the current scene exists within one of its' nodes."));
accept->popup_centered_minsize();
return NULL;
}
@@ -102,7 +102,7 @@ Node* SceneTreeDock::instance(const String& p_file) {
//instanced_scene->generate_instance_state();
instanced_scene->set_filename( Globals::get_singleton()->localize_path(p_file) );
- editor_data->get_undo_redo().create_action("Instance Scene");
+ editor_data->get_undo_redo().create_action(TTR("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_method(editor_selection,"clear");
@@ -173,7 +173,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
current_option=-1;
//confirmation->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();
break;
@@ -254,7 +254,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
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 on the tree root.");
accept->popup_centered_minsize();
break;
@@ -288,8 +288,8 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
if (!common_parent || (MOVING_DOWN && highest_id >= common_parent->get_child_count() - MOVING_DOWN) || (MOVING_UP && lowest_id == 0))
break; // one or more nodes can not be moved
- if (selection.size() == 1) editor_data->get_undo_redo().create_action("Move Node In Parent");
- if (selection.size() > 1) editor_data->get_undo_redo().create_action("Move Nodes In Parent");
+ if (selection.size() == 1) editor_data->get_undo_redo().create_action(TTR("Move Node In Parent"));
+ if (selection.size() > 1) editor_data->get_undo_redo().create_action(TTR("Move Nodes In Parent"));
for (int i = 0; i < selection.size(); i++) {
Node *top_node = selection[i];
@@ -322,7 +322,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
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 on the tree root.");
accept->popup_centered_minsize();
break;
@@ -335,7 +335,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
List<Node*> reselect;
- editor_data->get_undo_redo().create_action("Duplicate Node(s)");
+ editor_data->get_undo_redo().create_action(TTR("Duplicate Node(s)"));
editor_data->get_undo_redo().add_do_method(editor_selection,"clear");
Node *dupsingle=NULL;
@@ -434,7 +434,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
current_option=-1;
//confirmation->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 on the tree root.");
accept->popup_centered_minsize();
break;
@@ -484,7 +484,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
editor->get_viewport_control()->update();
} else {
- delete_dialog->set_text("Delete Node(s)?");
+ delete_dialog->set_text(TTR("Delete Node(s)?"));
delete_dialog->popup_centered_minsize();
}
@@ -494,7 +494,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
Node *scene = editor_data->get_edited_scene_root();
if (!scene) {
- 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 scene.");
accept->popup_centered_minsize();
break;
@@ -503,8 +503,8 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
List<Node*> selection = editor_selection->get_selected_node_list();
if (selection.size()!=1) {
- accept->get_ok()->set_text("I see..");
- accept->set_text("This operation requires a single selected node.");
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("This operation requires a single selected node."));
accept->popup_centered_minsize();
break;
}
@@ -512,7 +512,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
Node *tocopy = selection.front()->get();
if (tocopy!=editor_data->get_edited_scene_root() && tocopy->get_filename()!="") {
- accept->get_ok()->set_text("I see..");
+ accept->get_ok()->set_text(TTR("I see.."));
accept->set_text("This operation can't be done on instanced scenes.");
accept->popup_centered_minsize();
break;
@@ -535,7 +535,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
new_scene_from_dialog->set_current_path(existing);
new_scene_from_dialog->popup_centered_ratio();
- new_scene_from_dialog->set_title("Save New Scene As..");
+ new_scene_from_dialog->set_title(TTR("Save New Scene As.."));
} break;
@@ -919,8 +919,8 @@ bool SceneTreeDock::_validate_no_foreign() {
if (E->get()!=edited_scene && E->get()->get_owner()!=edited_scene) {
- accept->get_ok()->set_text("Makes Sense!");
- accept->set_text("Can't operate on nodes from a foreign scene!");
+ accept->get_ok()->set_text(TTR("Makes Sense!"));
+ accept->set_text(TTR("Can't operate on nodes from a foreign scene!"));
accept->popup_centered_minsize();
return false;
@@ -928,8 +928,8 @@ bool SceneTreeDock::_validate_no_foreign() {
if (edited_scene->get_scene_inherited_state().is_valid() && edited_scene->get_scene_inherited_state()->find_node_by_path(edited_scene->get_path_to(E->get()))>=0) {
- accept->get_ok()->set_text("Makes Sense!");
- accept->set_text("Can't operate on nodes the current scene inherits from!");
+ accept->get_ok()->set_text(TTR("Makes Sense!"));
+ accept->set_text(TTR("Can't operate on nodes the current scene inherits from!"));
accept->popup_centered_minsize();
return false;
@@ -970,7 +970,7 @@ void SceneTreeDock::_node_reparent(NodePath p_path,bool p_keep_global_xform) {
//sort by tree order, so re-adding is easy
selection.sort_custom<Node::Comparator>();
- editor_data->get_undo_redo().create_action("Reparent Node");
+ editor_data->get_undo_redo().create_action(TTR("Reparent Node"));
List<Pair<NodePath,NodePath> > path_renames;
@@ -1100,7 +1100,7 @@ void SceneTreeDock::_delete_confirm() {
editor->get_editor_plugins_over()->make_visible(false);
- editor_data->get_undo_redo().create_action("Remove Node(s)");
+ editor_data->get_undo_redo().create_action(TTR("Remove Node(s)"));
bool entire_scene=false;
@@ -1230,7 +1230,7 @@ void SceneTreeDock::_create() {
Node *child=c->cast_to<Node>();
ERR_FAIL_COND(!child);
- editor_data->get_undo_redo().create_action("Create Node");
+ editor_data->get_undo_redo().create_action(TTR("Create Node"));
if (edited_scene) {
@@ -1368,7 +1368,7 @@ void SceneTreeDock::_import_subscene() {
/*
- editor_data->get_undo_redo().create_action("Import Subscene");
+ editor_data->get_undo_redo().create_action(TTR("Import Subscene"));
editor_data->get_undo_redo().add_do_method(parent,"add_child",ss);
//editor_data->get_undo_redo().add_do_method(editor_selection,"clear");
//editor_data->get_undo_redo().add_do_method(editor_selection,"add_node",child);
@@ -1383,8 +1383,8 @@ void SceneTreeDock::_new_scene_from(String p_file) {
List<Node*> selection = editor_selection->get_selected_node_list();
if (selection.size()!=1) {
- accept->get_ok()->set_text("I see..");
- accept->set_text("This operation requires a single selected node.");
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("This operation requires a single selected node."));
accept->popup_centered_minsize();
return;
}
@@ -1401,8 +1401,8 @@ void SceneTreeDock::_new_scene_from(String p_file) {
memdelete(copy);
if (err!=OK) {
- accept->get_ok()->set_text("I see..");
- accept->set_text("Couldn't save new scene. Likely dependencies (instances) couldn't be satisfied.");
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("Couldn't save new scene. Likely dependencies (instances) couldn't be satisfied."));
accept->popup_centered_minsize();
return;
}
@@ -1416,15 +1416,15 @@ void SceneTreeDock::_new_scene_from(String p_file) {
err = ResourceSaver::save(p_file,sdata,flg);
if (err!=OK) {
- accept->get_ok()->set_text("I see..");
- accept->set_text("Error saving scene.");
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("Error saving scene."));
accept->popup_centered_minsize();
return;
}
} else {
- accept->get_ok()->set_text("I see..");
- accept->set_text("Error duplicating scene to save it.");
+ accept->get_ok()->set_text(TTR("I see.."));
+ accept->set_text(TTR("Error duplicating scene to save it."));
accept->popup_centered_minsize();
return;
}
@@ -1478,13 +1478,13 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor,Node *p_scene_root,EditorSelec
tb = memnew( ToolButton );
tb->connect("pressed",this,"_tool_selected",make_binds(TOOL_INSTANCE, false));
- tb->set_tooltip("Instance a scene file as a Node.");
+ tb->set_tooltip(TTR("Instance a scene file as a Node."));
hbc_top->add_child(tb);
tool_buttons[TOOL_INSTANCE]=tb;
tb = memnew( ToolButton );
tb->connect("pressed",this,"_tool_selected",make_binds(TOOL_REPLACE, false));
- tb->set_tooltip("Replace a Node by Another Node Type");
+ tb->set_tooltip(TTR("Replace a Node by Another Node Type"));
hbc_top->add_child(tb);
tool_buttons[TOOL_REPLACE]=tb;
@@ -1492,19 +1492,19 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor,Node *p_scene_root,EditorSelec
tb = memnew( ToolButton );
tb->connect("pressed",this,"_tool_selected",make_binds(TOOL_CONNECT, false));
- tb->set_tooltip("Edit the Node Connections");
+ tb->set_tooltip(TTR("Edit the Node Connections"));
hbc_top->add_child(tb);
tool_buttons[TOOL_CONNECT]=tb;
tb = memnew( ToolButton );
tb->connect("pressed",this,"_tool_selected",make_binds(TOOL_GROUP, false));
- tb->set_tooltip("Edit the Node Groups");
+ tb->set_tooltip(TTR("Edit the Node Groups"));
hbc_top->add_child(tb);
tool_buttons[TOOL_GROUP]=tb;
tb = memnew( ToolButton );
tb->connect("pressed",this,"_tool_selected",make_binds(TOOL_SCRIPT, false));
- tb->set_tooltip("Edit/Create the Node Script");
+ tb->set_tooltip(TTR("Edit/Create the Node Script"));
hbc_top->add_child(tb);
tool_buttons[TOOL_SCRIPT]=tb;
@@ -1546,7 +1546,7 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor,Node *p_scene_root,EditorSelec
tb = memnew( ToolButton );
tb->connect("pressed",this,"_tool_selected",make_binds(TOOL_REPARENT, false));
- tb->set_tooltip("Reparent Selected Node(s)");
+ tb->set_tooltip(TTR("Reparent Selected Node(s)"));
hbc_bottom->add_child(tb);
tool_buttons[TOOL_REPARENT]=tb;
@@ -1554,19 +1554,19 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor,Node *p_scene_root,EditorSelec
tb = memnew( ToolButton );
tb->connect("pressed",this,"_tool_selected",make_binds(TOOL_NEW_SCENE_FROM, false));
- tb->set_tooltip("Create New Scene From Node(s)");
+ tb->set_tooltip(TTR("Create New Scene From Node(s)"));
hbc_bottom->add_child(tb);
tool_buttons[TOOL_NEW_SCENE_FROM]=tb;
tb = memnew( ToolButton );
tb->connect("pressed",this,"_tool_selected",make_binds(TOOL_MULTI_EDIT, false));
- tb->set_tooltip("Multi-Edit Selected Nodes");
+ tb->set_tooltip(TTR("Multi-Edit Selected Nodes"));
hbc_bottom->add_child(tb);
tool_buttons[TOOL_MULTI_EDIT]=tb;
tb = memnew( ToolButton );
tb->connect("pressed",this,"_tool_selected",make_binds(TOOL_ERASE, false));
- tb->set_tooltip("Erase Selected Node(s)");
+ tb->set_tooltip(TTR("Erase Selected Node(s)"));
hbc_bottom->add_child(tb);
tool_buttons[TOOL_ERASE]=tb;
diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp
index c16152ae44..6d13f74e4d 100644
--- a/tools/editor/scene_tree_editor.cpp
+++ b/tools/editor/scene_tree_editor.cpp
@@ -168,13 +168,13 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item,int p_column,int p_id)
Spatial *ci = n->cast_to<Spatial>();
if (!ci->is_visible() && ci->get_parent_spatial() && !ci->get_parent_spatial()->is_visible()) {
- error->set_text("This item cannot be made visible because the parent is hidden. Unhide the parent first.");
+ error->set_text(TTR("This item cannot be made visible because the parent is hidden. Unhide the parent first."));
error->popup_centered_minsize();
return;
}
bool v = !bool(n->call("is_hidden"));
- undo_redo->create_action("Toggle Spatial Visible");
+ undo_redo->create_action(TTR("Toggle Spatial Visible"));
undo_redo->add_do_method(n,"_set_visible_",!v);
undo_redo->add_undo_method(n,"_set_visible_",v);
undo_redo->commit_action();
@@ -182,12 +182,12 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item,int p_column,int p_id)
CanvasItem *ci = n->cast_to<CanvasItem>();
if (!ci->is_visible() && ci->get_parent_item() && !ci->get_parent_item()->is_visible()) {
- error->set_text("This item cannot be made visible because the parent is hidden. Unhide the parent first.");
+ error->set_text(TTR("This item cannot be made visible because the parent is hidden. Unhide the parent first."));
error->popup_centered_minsize();
return;
}
bool v = !bool(n->call("is_hidden"));
- undo_redo->create_action("Toggle CanvasItem Visible");
+ undo_redo->create_action(TTR("Toggle CanvasItem Visible"));
undo_redo->add_do_method(n,v?"hide":"show");
undo_redo->add_undo_method(n,v?"show":"hide");
undo_redo->commit_action();
@@ -278,11 +278,11 @@ void SceneTreeEditor::_add_nodes(Node *p_node,TreeItem *p_parent) {
if (p_node==get_scene_node() && p_node->get_scene_inherited_state().is_valid()) {
item->add_button(0,get_icon("InstanceOptions","EditorIcons"),BUTTON_SUBSCENE);
- item->set_tooltip(0,"Inherits: "+p_node->get_scene_inherited_state()->get_path()+"\nType: "+p_node->get_type());
+ item->set_tooltip(0,TTR("Inherits: ")+p_node->get_scene_inherited_state()->get_path()+"\nType: "+p_node->get_type());
} else if (p_node!=get_scene_node() && p_node->get_filename()!="" && can_open_instance) {
item->add_button(0,get_icon("InstanceOptions","EditorIcons"),BUTTON_SUBSCENE);
- item->set_tooltip(0,"Instance: "+p_node->get_filename()+"\nType: "+p_node->get_type());
+ item->set_tooltip(0,TTR("Instance: ")+p_node->get_filename()+"\nType: "+p_node->get_type());
} else {
item->set_tooltip(0,String(p_node->get_name())+"\nType: "+p_node->get_type());
}
@@ -666,7 +666,7 @@ void SceneTreeEditor::_renamed() {
which->set_metadata(0,n->get_path());
emit_signal("node_renamed");
} else {
- undo_redo->create_action("Rename Node");
+ undo_redo->create_action(TTR("Rename Node"));
emit_signal("node_prerename",n,new_name);
undo_redo->add_do_method(this,"_rename_node",n->get_instance_ID(),new_name);
undo_redo->add_undo_method(this,"_rename_node",n->get_instance_ID(),n->get_name());
@@ -833,7 +833,7 @@ SceneTreeEditor::SceneTreeEditor(bool p_label,bool p_can_rename, bool p_can_open
if (p_label) {
Label *label = memnew( Label );
label->set_pos( Point2(10, 0));
- label->set_text("Scene Tree (Nodes):");
+ label->set_text(TTR("Scene Tree (Nodes):"));
add_child(label);
}
@@ -863,24 +863,24 @@ SceneTreeEditor::SceneTreeEditor(bool p_label,bool p_can_rename, bool p_can_open
blocked=0;
instance_menu = memnew( PopupMenu );
- instance_menu->add_check_item("Editable Children",SCENE_MENU_EDITABLE_CHILDREN);
- instance_menu->add_check_item("Load As Placeholder",SCENE_MENU_USE_PLACEHOLDER);
+ instance_menu->add_check_item(TTR("Editable Children"),SCENE_MENU_EDITABLE_CHILDREN);
+ instance_menu->add_check_item(TTR("Load As Placeholder"),SCENE_MENU_USE_PLACEHOLDER);
instance_menu->add_separator();
- instance_menu->add_item("Open in Editor",SCENE_MENU_OPEN);
+ instance_menu->add_item(TTR("Open in Editor"),SCENE_MENU_OPEN);
instance_menu->connect("item_pressed",this,"_subscene_option");
add_child(instance_menu);
inheritance_menu = memnew( PopupMenu );
- inheritance_menu->add_item("Clear Inheritance",SCENE_MENU_CLEAR_INHERITANCE);
+ inheritance_menu->add_item(TTR("Clear Inheritance"),SCENE_MENU_CLEAR_INHERITANCE);
inheritance_menu->add_separator();
- inheritance_menu->add_item("Open in Editor",SCENE_MENU_OPEN_INHERITED);
+ inheritance_menu->add_item(TTR("Open in Editor"),SCENE_MENU_OPEN_INHERITED);
inheritance_menu->connect("item_pressed",this,"_subscene_option");
add_child(inheritance_menu);
clear_inherit_confirm = memnew( ConfirmationDialog );
- clear_inherit_confirm->set_text("Clear Inheritance? (No Undo!)");
- clear_inherit_confirm->get_ok()->set_text("Clear!");
+ clear_inherit_confirm->set_text(TTR("Clear Inheritance? (No Undo!)"));
+ clear_inherit_confirm->get_ok()->set_text(TTR("Clear!"));
add_child(clear_inherit_confirm);
@@ -946,7 +946,7 @@ void SceneTreeDialog::_bind_methods() {
SceneTreeDialog::SceneTreeDialog() {
- set_title("Select a Node");
+ set_title(TTR("Select a Node"));
tree = memnew( SceneTreeEditor(false,false) );
add_child(tree);
diff --git a/tools/editor/scenes_dock.cpp b/tools/editor/scenes_dock.cpp
index e2b17f5e64..7cb0a094b2 100644
--- a/tools/editor/scenes_dock.cpp
+++ b/tools/editor/scenes_dock.cpp
@@ -123,7 +123,7 @@ void ScenesDock::_update_tree() {
TreeItem *root = tree->create_item();
TreeItem *favorites = tree->create_item(root);
favorites->set_icon(0, get_icon("Favorites","EditorIcons") );
- favorites->set_text(0,"Favorites:");
+ favorites->set_text(0,TTR("Favorites:"));
favorites->set_selectable(0,false);
Vector<String> faves = EditorSettings::get_singleton()->get_favorite_dirs();
for(int i=0;i<faves.size();i++) {
@@ -451,7 +451,7 @@ void ScenesDock::_update_files(bool p_keep_selection) {
img.resize(thumbnail_size,thumbnail_size);
Ref<ImageTexture> resized_folder = Ref<ImageTexture>( memnew( ImageTexture));
resized_folder->create_from_image(img,0);
- Theme::get_default()->set_icon("ResizedFolder","EditorIcons",resized_folder);
+ Theme::get_default()->set_icon(TTR("ResizedFolder"),"EditorIcons",resized_folder);
}
folder_thumbnail = get_icon("ResizedFolder","EditorIcons");
@@ -462,7 +462,7 @@ void ScenesDock::_update_files(bool p_keep_selection) {
img.resize(thumbnail_size,thumbnail_size);
Ref<ImageTexture> resized_file = Ref<ImageTexture>( memnew( ImageTexture));
resized_file->create_from_image(img,0);
- Theme::get_default()->set_icon("ResizedFile","EditorIcons",resized_file);
+ Theme::get_default()->set_icon(TTR("ResizedFile"),"EditorIcons",resized_file);
}
file_thumbnail = get_icon("ResizedFile","EditorIcons");
@@ -715,7 +715,7 @@ void ScenesDock::_find_remaps(EditorFileSystemDirectory *efsd,Map<String,String>
void ScenesDock::_rename_operation(const String& p_to_path) {
if (move_files[0]==p_to_path) {
- EditorNode::get_singleton()->show_warning("Same source and destination files, doing nothing.");
+ EditorNode::get_singleton()->show_warning(TTR("Same source and destination files, doing nothing."));
return;
}
if (FileAccess::exists(p_to_path)) {
@@ -762,7 +762,7 @@ void ScenesDock::_rename_operation(const String& p_to_path) {
void ScenesDock::_move_operation(const String& p_to_path) {
if (p_to_path==path) {
- EditorNode::get_singleton()->show_warning("Same source and destination paths, doing nothing.");
+ EditorNode::get_singleton()->show_warning(TTR("Same source and destination paths, doing nothing."));
return;
}
@@ -772,7 +772,7 @@ void ScenesDock::_move_operation(const String& p_to_path) {
for(int i=0;i<move_dirs.size();i++) {
if (p_to_path.begins_with(move_dirs[i])) {
- EditorNode::get_singleton()->show_warning("Can't move directories to within themselves");
+ EditorNode::get_singleton()->show_warning(TTR("Can't move directories to within themselves"));
return;
}
@@ -876,7 +876,7 @@ void ScenesDock::_file_option(int p_option) {
continue;
if (files->get_item_text(i)=="..") {
- EditorNode::get_singleton()->show_warning("Can't operate on '..'");
+ EditorNode::get_singleton()->show_warning(TTR("Can't operate on '..'"));
return;
}
@@ -895,7 +895,7 @@ void ScenesDock::_file_option(int p_option) {
rename_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE);
rename_dialog->set_current_path(move_files[0]);
rename_dialog->popup_centered_ratio();
- rename_dialog->set_title("Pick New Name and Location For: "+move_files[0].get_file());
+ rename_dialog->set_title(TTR("Pick New Name and Location For: ")+move_files[0].get_file());
} else {
@@ -918,7 +918,7 @@ void ScenesDock::_file_option(int p_option) {
}
if (torem.empty()) {
- EditorNode::get_singleton()->show_warning("No files selected!");
+ EditorNode::get_singleton()->show_warning(TTR("No files selected!"));
break;
}
@@ -1111,21 +1111,21 @@ ScenesDock::ScenesDock(EditorNode *p_editor) {
button_hist_prev = memnew( ToolButton );
toolbar_hbc->add_child(button_hist_prev);
button_hist_prev->set_disabled(true);
- button_hist_prev->set_tooltip("Previous Directory");
+ button_hist_prev->set_tooltip(TTR("Previous Directory"));
button_hist_next = memnew( ToolButton );
toolbar_hbc->add_child(button_hist_next);
button_hist_next->set_disabled(true);
button_hist_prev->set_focus_mode(FOCUS_NONE);
button_hist_next->set_focus_mode(FOCUS_NONE);
- button_hist_next->set_tooltip("Next Directory");
+ button_hist_next->set_tooltip(TTR("Next Directory"));
button_reload = memnew( Button );
button_reload->set_flat(true);
button_reload->connect("pressed",this,"_rescan");
toolbar_hbc->add_child(button_reload);
button_reload->set_focus_mode(FOCUS_NONE);
- button_reload->set_tooltip("Re-Scan Filesystem");
+ button_reload->set_tooltip(TTR("Re-Scan Filesystem"));
toolbar_hbc->add_spacer();
@@ -1134,21 +1134,21 @@ ScenesDock::ScenesDock(EditorNode *p_editor) {
toolbar_hbc->add_child(button_fav_up);
button_fav_up->set_disabled(true);
button_fav_up->connect("pressed",this,"_fav_up_pressed");
- button_fav_up->set_tooltip("Move Favorite Up");
+ button_fav_up->set_tooltip(TTR("Move Favorite Up"));
button_fav_down = memnew( ToolButton );
button_fav_down->set_flat(true);
toolbar_hbc->add_child(button_fav_down);
button_fav_down->set_disabled(true);
button_fav_down->connect("pressed",this,"_fav_down_pressed");
- button_fav_down->set_tooltip("Move Favorite Down");
+ button_fav_down->set_tooltip(TTR("Move Favorite Down"));
button_favorite = memnew( Button );
button_favorite->set_flat(true);
button_favorite->set_toggle_mode(true);
button_favorite->connect("pressed",this,"_favorites_pressed");
toolbar_hbc->add_child(button_favorite);
- button_favorite->set_tooltip("Toggle folder status as Favorite");
+ button_favorite->set_tooltip(TTR("Toggle folder status as Favorite"));
button_favorite->set_focus_mode(FOCUS_NONE);
button_fav_up->set_focus_mode(FOCUS_NONE);
@@ -1170,20 +1170,20 @@ ScenesDock::ScenesDock(EditorNode *p_editor) {
toolbar_hbc->add_child(button_instance);
button_instance->hide();
button_instance->set_focus_mode(FOCUS_NONE);
- button_instance->set_tooltip("Instance the selected scene(s) as child of the selected node.");
+ button_instance->set_tooltip(TTR("Instance the selected scene(s) as child of the selected node."));
file_options = memnew( MenuButton );
toolbar_hbc->add_child(file_options);
- file_options->get_popup()->add_item("Rename or Move",FILE_MOVE);
- file_options->get_popup()->add_item("Delete",FILE_REMOVE);
+ file_options->get_popup()->add_item(TTR("Rename or Move"),FILE_MOVE);
+ file_options->get_popup()->add_item(TTR("Delete"),FILE_REMOVE);
file_options->get_popup()->add_separator();
- file_options->get_popup()->add_item("Edit Dependencies",FILE_DEPENDENCIES);
- file_options->get_popup()->add_item("View Owners",FILE_OWNERS);
- //file_options->get_popup()->add_item("Info",FILE_INFO);
+ file_options->get_popup()->add_item(TTR("Edit Dependencies"),FILE_DEPENDENCIES);
+ file_options->get_popup()->add_item(TTR("View Owners"),FILE_OWNERS);
+ //file_options->get_popup()->add_item(TTR("Info"),FILE_INFO);
file_options->hide();
file_options->set_focus_mode(FOCUS_NONE);
- file_options->set_tooltip("Miscenaneous options related to resources on disk.");
+ file_options->set_tooltip(TTR("Miscenaneous options related to resources on disk."));
tree = memnew( Tree );
@@ -1240,7 +1240,7 @@ ScenesDock::ScenesDock(EditorNode *p_editor) {
move_dialog = memnew( EditorDirDialog );
add_child(move_dialog);
move_dialog->connect("dir_selected",this,"_move_operation");
- move_dialog->get_ok()->set_text("Move");
+ move_dialog->get_ok()->set_text(TTR("Move"));
rename_dialog = memnew( EditorFileDialog );
rename_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE);
diff --git a/tools/editor/script_create_dialog.cpp b/tools/editor/script_create_dialog.cpp
index 34d9204061..8d410f6fa3 100644
--- a/tools/editor/script_create_dialog.cpp
+++ b/tools/editor/script_create_dialog.cpp
@@ -74,22 +74,22 @@ bool ScriptCreateDialog::_validate(const String& p_string) {
void ScriptCreateDialog::_class_name_changed(const String& p_name) {
if (!_validate(parent_name->get_text())) {
- error_label->set_text("Invaild parent class name");
+ error_label->set_text(TTR("Invaild parent class name"));
error_label->add_color_override("font_color",Color(1,0.4,0.0,0.8));
} else if (class_name->is_editable()) {
if (class_name->get_text()=="") {
- error_label->set_text("Valid Chars: a-z A-Z 0-9 _");
+ error_label->set_text(TTR("Valid Chars: a-z A-Z 0-9 _"));
error_label->add_color_override("font_color",Color(1,1,1,0.6));
} else if (!_validate(class_name->get_text())) {
- error_label->set_text("Invalid class name");
+ error_label->set_text(TTR("Invalid class name"));
error_label->add_color_override("font_color",Color(1,0.2,0.2,0.8));
} else {
- error_label->set_text("Valid Name");
+ error_label->set_text(TTR("Valid Name"));
error_label->add_color_override("font_color",Color(0,1.0,0.8,0.8));
}
} else {
- error_label->set_text("N/A");
+ error_label->set_text(TTR("N/A"));
error_label->add_color_override("font_color",Color(0,1.0,0.8,0.8));
}
}
@@ -98,12 +98,12 @@ void ScriptCreateDialog::ok_pressed() {
if (class_name->is_editable() && !_validate(class_name->get_text())) {
- alert->set_text("Class Name is Invalid!");
+ alert->set_text(TTR("Class Name is Invalid!"));
alert->popup_centered_minsize();
return;
}
if (!_validate(parent_name->get_text())) {
- alert->set_text("Parent Class Name is Invalid!");
+ alert->set_text(TTR("Parent Class Name is Invalid!"));
alert->popup_centered_minsize();
return;
@@ -133,7 +133,7 @@ void ScriptCreateDialog::ok_pressed() {
script->set_path(lpath);
if (!path_valid) {
- alert->set_text("Path is Invalid!");
+ alert->set_text(TTR("Path is Invalid!"));
alert->popup_centered_minsize();
return;
@@ -141,7 +141,7 @@ void ScriptCreateDialog::ok_pressed() {
Error err = ResourceSaver::save(lpath,scr,ResourceSaver::FLAG_CHANGE_PATH);
if (err!=OK) {
- alert->set_text("Could not create script in filesystem: "+String(""));
+ alert->set_text(TTR("Could not create script in filesystem: ")+String(""));
alert->popup_centered_minsize();
return;
}
@@ -215,7 +215,7 @@ void ScriptCreateDialog::_path_changed(const String& p_path) {
if (p=="") {
- path_error_label->set_text("Path is Empty");
+ path_error_label->set_text(TTR("Path is Empty"));
path_error_label->add_color_override("font_color",Color(1,0.4,0.0,0.8));
return;
@@ -224,7 +224,7 @@ void ScriptCreateDialog::_path_changed(const String& p_path) {
p = Globals::get_singleton()->localize_path(p);
if (!p.begins_with("res://")) {
- path_error_label->set_text("Path is not local");
+ path_error_label->set_text(TTR("Path is not local"));
path_error_label->add_color_override("font_color",Color(1,0.4,0.0,0.8));
return;
}
@@ -234,7 +234,7 @@ void ScriptCreateDialog::_path_changed(const String& p_path) {
if (d->change_dir(p.get_base_dir())!=OK) {
- path_error_label->set_text("Base Path Invalid");
+ path_error_label->set_text(TTR("Base Path Invalid"));
path_error_label->add_color_override("font_color",Color(1,0.4,0.0,0.8));
memdelete(d);
return;
@@ -249,7 +249,7 @@ void ScriptCreateDialog::_path_changed(const String& p_path) {
if (f->file_exists(p)) {
- path_error_label->set_text("File Exists");
+ path_error_label->set_text(TTR("File Exists"));
path_error_label->add_color_override("font_color",Color(1,0.4,0.0,0.8));
memdelete(f);
return;
@@ -273,13 +273,13 @@ void ScriptCreateDialog::_path_changed(const String& p_path) {
if (!found) {
- path_error_label->set_text("Invalid Extension");
+ path_error_label->set_text(TTR("Invalid Extension"));
path_error_label->add_color_override("font_color",Color(1,0.4,0.0,0.8));
return;
}
- path_error_label->set_text("Path is Valid");
+ path_error_label->set_text(TTR("Path is Valid"));
path_error_label->add_color_override("font_color",Color(0,1.0,0.8,0.8));
path_valid=true;
@@ -315,14 +315,14 @@ ScriptCreateDialog::ScriptCreateDialog() {
error_label->set_text("valid chars: a-z A-Z 0-9 _");
error_label->set_align(Label::ALIGN_CENTER);
vb2->add_child(error_label);
- vb->add_margin_child("Class Name:",vb2);
+ vb->add_margin_child(TTR("Class Name:"),vb2);
parent_name = memnew( LineEdit );
- vb->add_margin_child("Inherits:",parent_name);
+ vb->add_margin_child(TTR("Inherits:"),parent_name);
parent_name->connect("text_changed", this,"_class_name_changed");
language_menu = memnew( OptionButton );
- vb->add_margin_child("Language",language_menu);
+ vb->add_margin_child(TTR("Language"),language_menu);
for(int i=0;i<ScriptServer::get_language_count();i++) {
@@ -350,25 +350,25 @@ ScriptCreateDialog::ScriptCreateDialog() {
path_vb->add_child(hbc);
path_error_label = memnew( Label );
path_vb->add_child( path_error_label );
- path_error_label->set_text("Error!");
+ path_error_label->set_text(TTR("Error!"));
path_error_label->set_align(Label::ALIGN_CENTER);
internal = memnew( CheckButton );
- internal->set_text("Built-In Script");
+ internal->set_text(TTR("Built-In Script"));
vb2->add_child(internal);
internal->connect("pressed",this,"_built_in_pressed");
- vb->add_margin_child("Path:",vb2);
+ vb->add_margin_child(TTR("Path:"),vb2);
set_size(Size2(200,150));
set_hide_on_ok(false);
- set_title("Create Script for Node");
+ set_title(TTR("Create Script for Node"));
file_browse = memnew( EditorFileDialog );
file_browse->connect("file_selected",this,"_file_selected");
add_child(file_browse);
- get_ok()->set_text("Create");
+ get_ok()->set_text(TTR("Create"));
alert = memnew( AcceptDialog );
add_child(alert);
_lang_changed(0);
diff --git a/tools/editor/script_editor_debugger.cpp b/tools/editor/script_editor_debugger.cpp
index 90d162c708..325eadc1e5 100644
--- a/tools/editor/script_editor_debugger.cpp
+++ b/tools/editor/script_editor_debugger.cpp
@@ -279,7 +279,7 @@ void ScriptEditorDebugger::_parse_message(const String& p_msg,const Array& p_dat
it->set_icon(0,get_icon(type,"EditorIcons"));
}
- vmem_total->set_tooltip("Bytes: "+itos(total));
+ vmem_total->set_tooltip(TTR("Bytes: ")+itos(total));
vmem_total->set_text(String::humanize_size(total));
} else if (p_msg=="stack_dump") {
@@ -399,7 +399,7 @@ void ScriptEditorDebugger::_parse_message(const String& p_msg,const Array& p_dat
String time = String("%d:%02d:%02d:%04d").sprintf(vals,&e);
String txt=time+" - "+String(err[8]);
- String tooltip="Type:"+String(warning?"Warning":"Error");
+ String tooltip=TTR("Type:")+String(warning?"Warning":"Error");
tooltip+="\nDescription: "+String(err[8]);
tooltip+="\nTime: "+time;
tooltip+="\nC Error: "+String(err[7]);
@@ -553,13 +553,13 @@ void ScriptEditorDebugger::_notification(int p_what) {
if (error_count!=last_error_count) {
if (error_count==0) {
- error_split->set_name("Errors");
- debugger_button->set_text("Debugger");
+ error_split->set_name(TTR("Errors"));
+ debugger_button->set_text(TTR("Debugger"));
debugger_button->set_icon(Ref<Texture>());
tabs->set_tab_icon(error_split->get_index(),Ref<Texture>());
} else {
- error_split->set_name("Errors ("+itos(error_count)+")");
- debugger_button->set_text("Debugger ("+itos(error_count)+")");
+ error_split->set_name(TTR("Errors (")+itos(error_count)+")");
+ debugger_button->set_text(TTR("Debugger (")+itos(error_count)+")");
debugger_button->set_icon(get_icon("Error","EditorIcons"));
tabs->set_tab_icon(error_split->get_index(),get_icon("Error","EditorIcons"));
}
@@ -584,8 +584,8 @@ void ScriptEditorDebugger::_notification(int p_what) {
dobreak->set_disabled(false);
tabs->set_current_tab(0);
- reason->set_text("Child Process Connected");
- reason->set_tooltip("Child Process Connected");
+ reason->set_text(TTR("Child Process Connected"));
+ reason->set_tooltip(TTR("Child Process Connected"));
scene_tree->clear();
le_set->set_disabled(true);
le_clear->set_disabled(false);
@@ -1151,7 +1151,7 @@ void ScriptEditorDebugger::_error_selected(int p_idx) {
error_stack->add_item(str);
error_stack->set_item_metadata(error_stack->get_item_count()-1,md);
- error_stack->set_item_tooltip(error_stack->get_item_count()-1,"File: "+String(st[i])+"\nLine: "+itos(line));
+ error_stack->set_item_tooltip(error_stack->get_item_count()-1,TTR("File: ")+String(st[i])+"\nLine: "+itos(line));
}
}
@@ -1217,7 +1217,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
VBoxContainer *vbc = memnew( VBoxContainer );
- vbc->set_name("Debugger");
+ vbc->set_name(TTR("Debugger"));
//tabs->add_child(vbc);
Control *dbg=vbc;
@@ -1237,35 +1237,35 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
step = memnew( Button );
hbc->add_child(step);
- step->set_tooltip("Step Into");
+ step->set_tooltip(TTR("Step Into"));
step->connect("pressed",this,"debug_step");
next = memnew( Button );
hbc->add_child(next);
- next->set_tooltip("Step Over");
+ next->set_tooltip(TTR("Step Over"));
next->connect("pressed",this,"debug_next");
hbc->add_child( memnew( VSeparator) );
dobreak = memnew( Button );
hbc->add_child(dobreak);
- dobreak->set_tooltip("Break");
+ dobreak->set_tooltip(TTR("Break"));
dobreak->connect("pressed",this,"debug_break");
docontinue = memnew( Button );
hbc->add_child(docontinue);
- docontinue->set_tooltip("Continue");
+ docontinue->set_tooltip(TTR("Continue"));
docontinue->connect("pressed",this,"debug_continue");
hbc->add_child( memnew( VSeparator) );
back = memnew( Button );
hbc->add_child(back);
- back->set_tooltip("Inspect Previous Instance");
+ back->set_tooltip(TTR("Inspect Previous Instance"));
forward = memnew( Button );
hbc->add_child(forward);
- back->set_tooltip("Inspect Next Instance");
+ back->set_tooltip(TTR("Inspect Next Instance"));
HSplitContainer *sc = memnew( HSplitContainer );
@@ -1275,7 +1275,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
stack_dump = memnew( Tree );
stack_dump->set_columns(1);
stack_dump->set_column_titles_visible(true);
- stack_dump->set_column_title(0,"Stack Frames");
+ stack_dump->set_column_title(0,TTR("Stack Frames"));
stack_dump->set_h_size_flags(SIZE_EXPAND_FILL);
stack_dump->set_hide_root(true);
stack_dump->connect("cell_selected",this,"_stack_dump_frame_selected");
@@ -1284,7 +1284,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
inspector = memnew( PropertyEditor );
inspector->set_h_size_flags(SIZE_EXPAND_FILL);
inspector->hide_top_label();
- inspector->get_scene_tree()->set_column_title(0,"Variable");
+ inspector->get_scene_tree()->set_column_title(0,TTR("Variable"));
inspector->set_capitalize_paths(false);
inspector->set_read_only(true);
sc->add_child(inspector);
@@ -1308,16 +1308,16 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
VBoxContainer *errvb = memnew( VBoxContainer );
errvb->set_h_size_flags(SIZE_EXPAND_FILL);
error_list = memnew( ItemList );
- errvb->add_margin_child("Errors:",error_list,true);
+ errvb->add_margin_child(TTR("Errors:"),error_list,true);
error_split->add_child(errvb);
errvb = memnew( VBoxContainer );
errvb->set_h_size_flags(SIZE_EXPAND_FILL);
error_stack = memnew( ItemList );
- errvb->add_margin_child("Stack Trace (if applies):",error_stack,true);
+ errvb->add_margin_child(TTR("Stack Trace (if applies):"),error_stack,true);
error_split->add_child(errvb);
- error_split->set_name("Errors");
+ error_split->set_name(TTR("Errors"));
tabs->add_child(error_split);
@@ -1325,8 +1325,8 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
perf_monitors = memnew(Tree);
perf_monitors->set_columns(2);
- perf_monitors->set_column_title(0,"Monitor");
- perf_monitors->set_column_title(1,"Value");
+ perf_monitors->set_column_title(0,TTR("Monitor"));
+ perf_monitors->set_column_title(1,TTR("Value"));
perf_monitors->set_column_titles_visible(true);
hsp->add_child(perf_monitors);
perf_monitors->set_select_mode(Tree::SELECT_MULTI);
@@ -1366,10 +1366,10 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
VBoxContainer *vmem_vb = memnew( VBoxContainer );
HBoxContainer *vmem_hb = memnew( HBoxContainer );
- Label *vmlb = memnew(Label("List of Video Memory Usage by Resource: ") );
+ Label *vmlb = memnew(Label(TTR("List of Video Memory Usage by Resource: ")) );
vmlb->set_h_size_flags(SIZE_EXPAND_FILL);
vmem_hb->add_child( vmlb );
- vmem_hb->add_child( memnew(Label("Total: ")) );
+ vmem_hb->add_child( memnew(Label(TTR("Total: "))) );
vmem_total = memnew( LineEdit );
vmem_total->set_editable(false);
vmem_total->set_custom_minimum_size(Size2(100,1));
@@ -1387,46 +1387,46 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
vmmc->set_v_size_flags(SIZE_EXPAND_FILL);
vmem_vb->add_child(vmmc);
- vmem_vb->set_name("Video Mem");
+ vmem_vb->set_name(TTR("Video Mem"));
vmem_tree->set_columns(4);
vmem_tree->set_column_titles_visible(true);
- vmem_tree->set_column_title(0,"Resource Path");
+ vmem_tree->set_column_title(0,TTR("Resource Path"));
vmem_tree->set_column_expand(0,true);
vmem_tree->set_column_expand(1,false);
- vmem_tree->set_column_title(1,"Type");
+ vmem_tree->set_column_title(1,TTR("Type"));
vmem_tree->set_column_min_width(1,100);
vmem_tree->set_column_expand(2,false);
- vmem_tree->set_column_title(2,"Format");
+ vmem_tree->set_column_title(2,TTR("Format"));
vmem_tree->set_column_min_width(2,150);
vmem_tree->set_column_expand(3,false);
- vmem_tree->set_column_title(3,"Usage");
+ vmem_tree->set_column_title(3,TTR("Usage"));
vmem_tree->set_column_min_width(3,80);
vmem_tree->set_hide_root(true);
tabs->add_child(vmem_vb);
info = memnew( HSplitContainer );
- info->set_name("Info");
+ info->set_name(TTR("Info"));
tabs->add_child(info);
VBoxContainer *info_left = memnew( VBoxContainer );
info_left->set_h_size_flags(SIZE_EXPAND_FILL);
info->add_child(info_left);
clicked_ctrl = memnew( LineEdit );
- info_left->add_margin_child("Clicked Control:",clicked_ctrl);
+ info_left->add_margin_child(TTR("Clicked Control:"),clicked_ctrl);
clicked_ctrl_type = memnew( LineEdit );
- info_left->add_margin_child("Clicked Control Type:",clicked_ctrl_type);
+ info_left->add_margin_child(TTR("Clicked Control Type:"),clicked_ctrl_type);
live_edit_root = memnew( LineEdit );
{
HBoxContainer *lehb = memnew( HBoxContainer );
- Label *l = memnew( Label("Live Edit Root:") );
+ Label *l = memnew( Label(TTR("Live Edit Root:")) );
lehb->add_child(l);
l->set_h_size_flags(SIZE_EXPAND_FILL);
- le_set = memnew( Button("Set From Tree") );
+ le_set = memnew( Button(TTR("Set From Tree")) );
lehb->add_child(le_set);
- le_clear = memnew( Button("Clear") );
+ le_clear = memnew( Button(TTR("Clear")) );
lehb->add_child(le_clear);
info_left->add_child(lehb);
MarginContainer *mc = memnew( MarginContainer );
@@ -1441,7 +1441,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
info->add_child(info_right);
HBoxContainer *inforhb = memnew( HBoxContainer );
info_right->add_child(inforhb);
- Label *l2 = memnew( Label("Scene Tree:" ) );
+ Label *l2 = memnew( Label(TTR("Scene Tree:") ) );
l2->set_h_size_flags(SIZE_EXPAND_FILL);
inforhb->add_child( l2 );
Button *refresh = memnew( Button );
diff --git a/tools/editor/settings_config_dialog.cpp b/tools/editor/settings_config_dialog.cpp
index 6b7c2eb9b7..2a871efb18 100644
--- a/tools/editor/settings_config_dialog.cpp
+++ b/tools/editor/settings_config_dialog.cpp
@@ -107,7 +107,7 @@ void EditorSettingsDialog::_bind_methods() {
EditorSettingsDialog::EditorSettingsDialog() {
- set_title("Editor Settings");
+ set_title(TTR("Editor Settings"));
tabs = memnew( TabContainer );
add_child(tabs);
@@ -115,14 +115,14 @@ EditorSettingsDialog::EditorSettingsDialog() {
VBoxContainer *vbc = memnew( VBoxContainer );
tabs->add_child(vbc);
- vbc->set_name("General");
+ vbc->set_name(TTR("General"));
HBoxContainer *hbc = memnew( HBoxContainer );
hbc->set_h_size_flags(Control::SIZE_EXPAND_FILL);
vbc->add_child(hbc);
Label *l = memnew( Label );
- l->set_text("Search: ");
+ l->set_text(TTR("Search: "));
hbc->add_child(l);
search_box = memnew( LineEdit );
@@ -142,20 +142,20 @@ EditorSettingsDialog::EditorSettingsDialog() {
vbc = memnew( VBoxContainer );
tabs->add_child(vbc);
- vbc->set_name("Plugins");
+ vbc->set_name(TTR("Plugins"));
hbc = memnew( HBoxContainer );
vbc->add_child(hbc);
- hbc->add_child( memnew( Label("Plugin List: ")));
+ hbc->add_child( memnew( Label(TTR("Plugin List: "))));
hbc->add_spacer();
//Button *load = memnew( Button );
- //load->set_text("Load..");
+ //load->set_text(TTR("Load.."));
//hbc->add_child(load);
- //get_ok()->set_text("Apply");
+ //get_ok()->set_text(TTR("Apply"));
set_hide_on_ok(true);
- //get_cancel()->set_text("Close");
+ //get_cancel()->set_text(TTR("Close"));
timer = memnew( Timer );
timer->set_wait_time(1.5);
@@ -163,7 +163,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
timer->set_one_shot(true);
add_child(timer);
EditorSettings::get_singleton()->connect("settings_changed",this,"_settings_changed");
- get_ok()->set_text("Close");
+ get_ok()->set_text(TTR("Close"));
updating=false;
diff --git a/tools/editor/spatial_editor_gizmos.cpp b/tools/editor/spatial_editor_gizmos.cpp
index 3414e80482..b7fc722113 100644
--- a/tools/editor/spatial_editor_gizmos.cpp
+++ b/tools/editor/spatial_editor_gizmos.cpp
@@ -731,9 +731,9 @@ Vector3 EditorSpatialGizmo::get_handle_pos(int p_idx) const {
String LightSpatialGizmo::get_handle_name(int p_idx) const {
if (p_idx==0)
- return "Radius";
+ return TTR("Radius");
else
- return "Aperture";
+ return TTR("Aperture");
}
@@ -830,14 +830,14 @@ void LightSpatialGizmo::commit_handle(int p_idx,const Variant& p_restore,bool p_
} else if (p_idx==0) {
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
- ur->create_action("Change Light Radius");
+ ur->create_action(TTR("Change Light Radius"));
ur->add_do_method(light,"set_parameter",Light::PARAM_RADIUS,light->get_parameter(Light::PARAM_RADIUS));
ur->add_undo_method(light,"set_parameter",Light::PARAM_RADIUS,p_restore);
ur->commit_action();
} else if (p_idx==1) {
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
- ur->create_action("Change Light Radius");
+ ur->create_action(TTR("Change Light Radius"));
ur->add_do_method(light,"set_parameter",Light::PARAM_SPOT_ANGLE,light->get_parameter(Light::PARAM_SPOT_ANGLE));
ur->add_undo_method(light,"set_parameter",Light::PARAM_SPOT_ANGLE,p_restore);
ur->commit_action();
@@ -1030,9 +1030,9 @@ LightSpatialGizmo::LightSpatialGizmo(Light* p_light){
String CameraSpatialGizmo::get_handle_name(int p_idx) const {
if (camera->get_projection()==Camera::PROJECTION_PERSPECTIVE) {
- return "FOV";
+ return TTR("FOV");
} else {
- return "Size";
+ return TTR("Size");
}
}
Variant CameraSpatialGizmo::get_handle_value(int p_idx) const{
@@ -1080,7 +1080,7 @@ void CameraSpatialGizmo::commit_handle(int p_idx,const Variant& p_restore,bool p
camera->set("fov",p_restore);
} else {
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
- ur->create_action("Change Camera FOV");
+ ur->create_action(TTR("Change Camera FOV"));
ur->add_do_property(camera,"fov",camera->get_fov());
ur->add_undo_property(camera,"fov",p_restore);
ur->commit_action();
@@ -1093,7 +1093,7 @@ void CameraSpatialGizmo::commit_handle(int p_idx,const Variant& p_restore,bool p
camera->set("size",p_restore);
} else {
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
- ur->create_action("Change Camera Size");
+ ur->create_action(TTR("Change Camera Size"));
ur->add_do_property(camera,"size",camera->get_size());
ur->add_undo_property(camera,"size",p_restore);
ur->commit_action();
@@ -1695,22 +1695,22 @@ String CollisionShapeSpatialGizmo::get_handle_name(int p_idx) const {
if (s->cast_to<SphereShape>()) {
- return "Radius";
+ return TTR("Radius");
}
if (s->cast_to<BoxShape>()) {
- return "Extents";
+ return TTR("Extents");
}
if (s->cast_to<CapsuleShape>()) {
- return p_idx==0?"Radius":"Height";
+ return p_idx==0?TTR("Radius"):"Height";
}
if (s->cast_to<RayShape>()) {
- return "Length";
+ return TTR("Length");
}
return "";
@@ -1838,7 +1838,7 @@ void CollisionShapeSpatialGizmo::commit_handle(int p_idx,const Variant& p_restor
}
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
- ur->create_action("Change Sphere Shape Radius");
+ ur->create_action(TTR("Change Sphere Shape Radius"));
ur->add_do_method(ss.ptr(),"set_radius",ss->get_radius());
ur->add_undo_method(ss.ptr(),"set_radius",p_restore);
ur->commit_action();
@@ -1854,7 +1854,7 @@ void CollisionShapeSpatialGizmo::commit_handle(int p_idx,const Variant& p_restor
}
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
- ur->create_action("Change Box Shape Extents");
+ ur->create_action(TTR("Change Box Shape Extents"));
ur->add_do_method(ss.ptr(),"set_extents",ss->get_extents());
ur->add_undo_method(ss.ptr(),"set_extents",p_restore);
ur->commit_action();
@@ -1873,11 +1873,11 @@ void CollisionShapeSpatialGizmo::commit_handle(int p_idx,const Variant& p_restor
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
if (p_idx==0) {
- ur->create_action("Change Capsule Shape Radius");
+ ur->create_action(TTR("Change Capsule Shape Radius"));
ur->add_do_method(ss.ptr(),"set_radius",ss->get_radius());
ur->add_undo_method(ss.ptr(),"set_radius",p_restore);
} else {
- ur->create_action("Change Capsule Shape Height");
+ ur->create_action(TTR("Change Capsule Shape Height"));
ur->add_do_method(ss.ptr(),"set_height",ss->get_height());
ur->add_undo_method(ss.ptr(),"set_height",p_restore);
@@ -1896,7 +1896,7 @@ void CollisionShapeSpatialGizmo::commit_handle(int p_idx,const Variant& p_restor
}
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
- ur->create_action("Change Ray Shape Length");
+ ur->create_action(TTR("Change Ray Shape Length"));
ur->add_do_method(ss.ptr(),"set_length",ss->get_length());
ur->add_undo_method(ss.ptr(),"set_length",p_restore);
ur->commit_action();
@@ -2243,7 +2243,7 @@ void VisibilityNotifierGizmo::commit_handle(int p_idx,const Variant& p_restore,b
}
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
- ur->create_action("Change Notifier Extents");
+ ur->create_action(TTR("Change Notifier Extents"));
ur->add_do_method(notifier,"set_aabb",notifier->get_aabb());
ur->add_undo_method(notifier,"set_aabb",p_restore);
ur->commit_action();