You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Modified editor strings to be translatable in the future
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user