i18n: Proofreading of all strings

Done to ensure that no important identifiers are translatable,
to fix compound strings using the new vformat() function, and
some general English proofreading here and there.
This commit is contained in:
Rémi Verschelde 2016-05-19 00:08:12 +02:00
parent bc8df8feaa
commit 94c34ff890
66 changed files with 427 additions and 425 deletions

View file

@ -527,7 +527,7 @@ class EditorFontImportDialog : public ConfirmationDialog {
Ref<ResourceImportMetadata> rimd = get_rimd();
if (rimd.is_null()) {
error_dialog->set_text(TTR("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;
}
@ -657,7 +657,7 @@ public:
testhb->add_child(test_color);
vbl->add_spacer();
vbl->add_margin_child(TTR("Test: "),testhb);
vbl->add_margin_child(TTR("Test:")+" ",testhb);
/*
HBoxContainer *upd_hb = memnew( HBoxContainer );
// vbl->add_child(upd_hb);
@ -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(TTR("Path: ")+src_path+"\nIs a Godot font file, please supply a BMFont type file instead.");
EditorNode::get_singleton()->show_warning(TTR("Path:")+" "+src_path+"\n"+TTR("This file is already 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(TTR("Path: ")+src_path+"\nFailed opening as BMFont file.");
EditorNode::get_singleton()->show_warning(TTR("Path:")+" "+src_path+"\n"+TTR("Failed opening as BMFont file."));
return Ref<BitmapFont>();
}
@ -939,7 +939,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
if ( error ) {
FT_Done_FreeType( library );
ERR_EXPLAIN(TTR("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(TTR("Invalid font custom source. "));
ERR_EXPLAIN(TTR("Invalid font custom source."));
ERR_FAIL_COND_V( !fa,Ref<BitmapFont>() );
}

View file

@ -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=TTR("Surface ")+itos(i+1);
name=vformat(TTR("Surface %i"),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=TTR("Surface ")+itos(mesh->get_surface_count()-1);
name=vformat(TTR("Surface %i"),mesh->get_surface_count()-1);
mesh->surface_set_name(mesh->get_surface_count()-1,name);
name="";
surf_tool->clear();

View file

@ -262,7 +262,7 @@ public:
}
if (!save_path->get_text().begins_with("res://")) {
error_dialog->set_text(TTR("Target path must be full resource path."));
error_dialog->set_text(TTR("Target path must be a complete resource path."));
error_dialog->popup_centered_minsize();
return;
}

View file

@ -686,7 +686,7 @@ void EditorSceneImportDialog::_import(bool p_and_open) {
}
if (!save_path->get_text().begins_with("res://")) {
error_dialog->set_text(TTR("Target path must be full resource path."));
error_dialog->set_text(TTR("Target path must be a complete resource path."));
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(TTR("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(TTR("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;
}
@ -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(TTR("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(TTR("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(TTR("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(TTR("Import Img: ")+fname,3+(idx)*100/imagemap.size());
progress.step(TTR("Import Image:")+" "+fname,3+(idx)*100/imagemap.size());
idx++;
if (path==target_path) {
EditorNode::add_io_error(TTR("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(TTR("Couldn't localize path: '")+target_path+"' (already local)");
EditorNode::add_io_error(vformat(TTR("Couldn't localize path: %s (already local)"),target_path));
continue;
}

View file

@ -507,15 +507,15 @@ void EditorSceneImporterFBXConv::_parse_materials(State& state) {
if (tex.is_valid() && texture.has("type")) {
String type=texture["type"];
if (type==TTR("DIFFUSE"))
if (type=="DIFFUSE")
mat->set_texture(FixedMaterial::PARAM_DIFFUSE,tex);
else if (type==TTR("SPECULAR"))
else if (type=="SPECULAR")
mat->set_texture(FixedMaterial::PARAM_SPECULAR,tex);
else if (type==TTR("SHININESS"))
else if (type=="SHININESS")
mat->set_texture(FixedMaterial::PARAM_SPECULAR_EXP,tex);
else if (type=="NORMAL")
mat->set_texture(FixedMaterial::PARAM_NORMAL,tex);
else if (type==TTR("EMISSIVE"))
else if (type=="EMISSIVE")
mat->set_texture(FixedMaterial::PARAM_EMISSION,tex);
}
@ -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==TTR("COLORPACKED")) {
} else if (attr=="COLORPACKED") {
stride+=1; //ignore
} else if (attr==TTR("TANGENT")) {
} else if (attr=="TANGENT") {
exists[Mesh::ARRAY_TANGENT]=true;
ofs[Mesh::ARRAY_TANGENT]=stride;
stride+=3;
} else if (attr==TTR("BINORMAL")) {
} else if (attr=="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(TTR("TEXCOORD"))) {
} else if (attr.begins_with("TEXCOORD")) {
stride+=2;
} else if (attr.begins_with(TTR("BLENDWEIGHT"))) {
int idx=attr.replace(TTR("BLENDWEIGHT"),"").to_int();
} else if (attr.begins_with("BLENDWEIGHT")) {
int idx=attr.replace("BLENDWEIGHT","").to_int();
if (idx==0) {
exists[Mesh::ARRAY_BONES]=true;
ofs[Mesh::ARRAY_BONES]=stride;
@ -799,13 +799,13 @@ void EditorSceneImporterFBXConv::_parse_surfaces(State& state) {
if (part.has("type")) {
String type=part["type"];
if (type==TTR("LINES"))
if (type=="LINES")
pt=Mesh::PRIMITIVE_LINES;
else if (type==TTR("POINTS"))
else if (type=="POINTS")
pt=Mesh::PRIMITIVE_POINTS;
else if (type==TTR("TRIANGLE_STRIP"))
else if (type=="TRIANGLE_STRIP")
pt=Mesh::PRIMITIVE_TRIANGLE_STRIP;
else if (type==TTR("LINE_STRIP"))
else if (type=="LINE_STRIP")
pt=Mesh::PRIMITIVE_LINE_STRIP;
}
@ -1056,7 +1056,7 @@ Error EditorSceneImporterFBXConv::_parse_fbx(State& state,const String& p_path)
}
args.push_back("-o");
args.push_back(TTR("G3DJ"));
args.push_back("G3DJ");
args.push_back(path);
int res;

View file

@ -53,17 +53,17 @@ static const char *flag_names[]={
#if 0 // not used
static const char *flag_short_names[]={
TTR("Stream"),
TTR("FixBorder"),
TTR("AlphBit"),
TTR("ExtComp"),
TTR("NoMipMap"),
TTR("Repeat"),
TTR("Filter"),
TTR("PMAlpha"),
TTR("ToLinear"),
TTR("ToRG"),
TTR("Anisoropic"),
"Stream",
"FixBorder",
"AlphBit",
"ExtComp",
"NoMipMap",
"Repeat",
"Filter",
"PMAlpha",
"ToLinear",
"ToRG",
"Anisoropic",
NULL
};
#endif
@ -343,7 +343,7 @@ void EditorTextureImportDialog::_import() {
}
if (!save_path->get_text().begins_with("res://")) {
error_dialog->set_text(TTR("Target path must be full resource path."));
error_dialog->set_text(TTR("Target path must be a complete resource path."));
error_dialog->popup_centered_minsize();
return;
}
@ -382,7 +382,7 @@ void EditorTextureImportDialog::_import() {
Error err = plugin->import(dst_file,imd);
if (err) {
error_dialog->set_text(TTR("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(TTR("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(TTR("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(TTR("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(TTR("PackedTexture"),&extensions);
// ResourceLoader::get_recognized_extensions_for_type("PackedTexture",&extensions);
file_select->clear_filters();
for(int i=0;i<extensions.size();i++) {
@ -579,7 +579,7 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin*
if (p_atlas) {
size->set_val(2048);
vbc->add_margin_child(TTR("Max Texture size:"),size);
vbc->add_margin_child(TTR("Max Texture Size:"),size);
} else {
size->set_val(256);
vbc->add_margin_child(TTR("Cell Size:"),size);
@ -612,9 +612,9 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin*
save_file_select->set_mode(EditorFileDialog::MODE_SAVE_FILE);
save_file_select->clear_filters();
if (large)
save_file_select->add_filter("*.ltex;Large Texture");
save_file_select->add_filter("*.ltex;"+TTR("Large Texture"));
else
save_file_select->add_filter("*.tex;Base Atlas Texture");
save_file_select->add_filter("*.tex;"+TTR("Base Atlas Texture"));
save_file_select->connect("file_selected", this,"_choose_save_dir");
save_select = memnew( EditorDirDialog );
@ -1057,7 +1057,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
err = ResourceSaver::save(p_path,existing);
if (err!=OK) {
EditorNode::add_io_error(TTR("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",TTR("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(TTR("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(TTR("Couldn't load image: ")+path);
EditorNode::add_io_error(TTR("Couldn't load image:")+" "+path);
return err;
}
@ -1176,7 +1176,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
Size2i dst_size;
EditorAtlas::fit(src_sizes,dst_positions,dst_size);
print_line("size that workeD: "+itos(dst_size.width)+","+itos(dst_size.height));
print_line("size that worked: "+itos(dst_size.width)+","+itos(dst_size.height));
ep.step(TTR("Blitting Images"),sources.size()+2);
@ -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(TTR("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));
@ -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(TTR("Couldn't save converted texture: ")+p_path);
EditorNode::add_io_error(TTR("Couldn't save converted texture:")+" "+p_path);
return err;
}

View file

@ -236,7 +236,7 @@ public:
}
if (!save_path->get_text().begins_with("res://")) {
error_dialog->set_text(TTR("No target path!!"));
error_dialog->set_text(TTR("No target path!"));
error_dialog->popup_centered(Size2(200,100));
}
@ -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(TTR("Couldnt import!"));
error_dialog->set_text(TTR("Couldn't import!"));
error_dialog->popup_centered(Size2(200,100));
} else if (add_to_project->is_pressed()) {