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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user