Make various strings translatable

This commit is contained in:
foxydevloper 2021-07-19 15:10:05 -04:00
parent dfc1ec7fb9
commit 42d740d641
11 changed files with 27 additions and 27 deletions

View file

@ -581,7 +581,7 @@ void InputEventConfigurationDialog::set_allowed_input_types(int p_type_masks) {
InputEventConfigurationDialog::InputEventConfigurationDialog() {
allowed_input_types = INPUT_KEY | INPUT_MOUSE_BUTTON | INPUT_JOY_BUTTON | INPUT_JOY_MOTION;
set_title("Event Configuration");
set_title(TTR("Event Configuration"));
set_min_size(Size2i(550 * EDSCALE, 0)); // Min width
VBoxContainer *main_vbox = memnew(VBoxContainer);
@ -595,7 +595,7 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() {
main_vbox->add_child(tab_container);
CenterContainer *cc = memnew(CenterContainer);
cc->set_name("Listen for Input");
cc->set_name(TTR("Listen for Input"));
event_as_text = memnew(Label);
event_as_text->set_align(Label::ALIGN_CENTER);
cc->add_child(event_as_text);
@ -604,7 +604,7 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() {
// List of all input options to manually select from.
VBoxContainer *manual_vbox = memnew(VBoxContainer);
manual_vbox->set_name("Manual Selection");
manual_vbox->set_name(TTR("Manual Selection"));
manual_vbox->set_v_size_flags(Control::SIZE_EXPAND_FILL);
tab_container->add_child(manual_vbox);
@ -632,7 +632,7 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() {
Label *opts_label = memnew(Label);
opts_label->set_theme_type_variation("HeaderSmall");
opts_label->set_text("Additional Options");
opts_label->set_text(TTR("Additional Options"));
additional_options_container->add_child(opts_label);
// Device Selection
@ -641,7 +641,7 @@ InputEventConfigurationDialog::InputEventConfigurationDialog() {
Label *device_label = memnew(Label);
device_label->set_theme_type_variation("HeaderSmall");
device_label->set_text("Device:");
device_label->set_text(TTR("Device:"));
device_container->add_child(device_label);
device_id_option = memnew(OptionButton);

View file

@ -398,22 +398,22 @@ EditorLog::EditorLog() {
vb_right->add_child(memnew(HSeparator));
LogFilter *std_filter = memnew(LogFilter(MSG_TYPE_STD));
std_filter->initialize_button("Toggle visibility of standard output messages.", callable_mp(this, &EditorLog::_set_filter_active));
std_filter->initialize_button(TTR("Toggle visibility of standard output messages."), callable_mp(this, &EditorLog::_set_filter_active));
vb_right->add_child(std_filter->toggle_button);
type_filter_map.insert(MSG_TYPE_STD, std_filter);
LogFilter *error_filter = memnew(LogFilter(MSG_TYPE_ERROR));
error_filter->initialize_button("Toggle visibility of errors.", callable_mp(this, &EditorLog::_set_filter_active));
error_filter->initialize_button(TTR("Toggle visibility of errors."), callable_mp(this, &EditorLog::_set_filter_active));
vb_right->add_child(error_filter->toggle_button);
type_filter_map.insert(MSG_TYPE_ERROR, error_filter);
LogFilter *warning_filter = memnew(LogFilter(MSG_TYPE_WARNING));
warning_filter->initialize_button("Toggle visibility of warnings.", callable_mp(this, &EditorLog::_set_filter_active));
warning_filter->initialize_button(TTR("Toggle visibility of warnings."), callable_mp(this, &EditorLog::_set_filter_active));
vb_right->add_child(warning_filter->toggle_button);
type_filter_map.insert(MSG_TYPE_WARNING, warning_filter);
LogFilter *editor_filter = memnew(LogFilter(MSG_TYPE_EDITOR));
editor_filter->initialize_button("Toggle visibility of editor messages.", callable_mp(this, &EditorLog::_set_filter_active));
editor_filter->initialize_button(TTR("Toggle visibility of editor messages."), callable_mp(this, &EditorLog::_set_filter_active));
vb_right->add_child(editor_filter->toggle_button);
type_filter_map.insert(MSG_TYPE_EDITOR, editor_filter);

View file

@ -79,7 +79,7 @@ void AnimationTreeEditor::_update_path() {
group.instantiate();
Button *b = memnew(Button);
b->set_text("Root");
b->set_text(TTR("Root"));
b->set_toggle_mode(true);
b->set_button_group(group);
b->set_pressed(true);

View file

@ -131,7 +131,7 @@ void GPUParticlesCollisionSDFEditorPlugin::_sdf_save_path_and_bake(const String
if (col_sdf) {
Ref<Image> bake_img = col_sdf->bake();
if (bake_img.is_null()) {
EditorNode::get_singleton()->show_warning("Bake Error.");
EditorNode::get_singleton()->show_warning(TTR("Bake Error."));
return;
}

View file

@ -86,7 +86,7 @@ InputEventConfigContainer::InputEventConfigContainer() {
mc->add_child(hb);
open_config_button = memnew(Button);
open_config_button->set_text("Configure");
open_config_button->set_text(TTR("Configure"));
open_config_button->connect("pressed", callable_mp(this, &InputEventConfigContainer::_configure_pressed));
hb->add_child(open_config_button);

View file

@ -6248,7 +6248,7 @@ void Node3DEditor::_add_sun_to_scene(bool p_already_added_environment) {
ERR_FAIL_COND(!base);
Node *new_sun = preview_sun->duplicate();
undo_redo->create_action("Add Preview Sun to Scene");
undo_redo->create_action(TTR("Add Preview Sun to Scene"));
undo_redo->add_do_method(base, "add_child", new_sun);
// Move to the beginning of the scene tree since more "global" nodes
// generally look better when placed at the top.
@ -6278,7 +6278,7 @@ void Node3DEditor::_add_environment_to_scene(bool p_already_added_sun) {
WorldEnvironment *new_env = memnew(WorldEnvironment);
new_env->set_environment(preview_environment->get_environment()->duplicate(true));
undo_redo->create_action("Add Preview Environment to Scene");
undo_redo->create_action(TTR("Add Preview Environment to Scene"));
undo_redo->add_do_method(base, "add_child", new_env);
// Move to the beginning of the scene tree since more "global" nodes
// generally look better when placed at the top.

View file

@ -521,7 +521,7 @@ Sprite2DEditor::Sprite2DEditor() {
debug_uv_dialog = memnew(ConfirmationDialog);
debug_uv_dialog->get_ok_button()->set_text(TTR("Create Mesh2D"));
debug_uv_dialog->set_title("Mesh 2D Preview");
debug_uv_dialog->set_title(TTR("Mesh 2D Preview"));
VBoxContainer *vb = memnew(VBoxContainer);
debug_uv_dialog->add_child(vb);
ScrollContainer *scroll = memnew(ScrollContainer);

View file

@ -1050,7 +1050,7 @@ void TileDataDefaultEditor::_notification(int p_what) {
TileDataDefaultEditor::TileDataDefaultEditor() {
label = memnew(Label);
label->set_text("Painting:");
label->set_text(TTR("Painting:"));
add_child(label);
toolbar->add_child(memnew(VSeparator));

View file

@ -164,7 +164,7 @@ void VersionControlEditorPlugin::_refresh_stage_area() {
_refresh_file_diff();
}
}
commit_status->set_text("New changes detected");
commit_status->set_text(TTR("New changes detected"));
}
} else {
WARN_PRINT("No VCS addon is initialized. Select a Version Control Addon from Project menu.");
@ -270,9 +270,9 @@ void VersionControlEditorPlugin::_clear_file_diff() {
void VersionControlEditorPlugin::_update_stage_status() {
String status;
if (staged_files_count == 1) {
status = "Stage contains 1 file";
status = TTR("Stage contains 1 file");
} else {
status = "Stage contains " + String::num_int64(staged_files_count) + " files";
status = vformat(TTR("Stage contains %d files"), staged_files_count);
}
commit_status->set_text(status);
}
@ -280,9 +280,9 @@ void VersionControlEditorPlugin::_update_stage_status() {
void VersionControlEditorPlugin::_update_commit_status() {
String status;
if (staged_files_count == 1) {
status = "Committed 1 file";
status = TTR("Committed 1 file");
} else {
status = "Committed " + String::num_int64(staged_files_count) + " files ";
status = vformat(TTR("Committed %d files"), staged_files_count);
}
commit_status->set_text(status);
staged_files_count = 0;

View file

@ -1153,7 +1153,7 @@ ProjectExportDialog::ProjectExportDialog() {
enc_directory = memnew(CheckButton);
enc_directory->connect("toggled", callable_mp(this, &ProjectExportDialog::_enc_directory_changed));
enc_directory->set_text("Encrypt Index (File Names and Info)");
enc_directory->set_text(TTR("Encrypt Index (File Names and Info)"));
sec_vb->add_child(enc_directory);
enc_in_filters = memnew(LineEdit);
@ -1219,7 +1219,7 @@ ProjectExportDialog::ProjectExportDialog() {
export_all_dialog = memnew(ConfirmationDialog);
add_child(export_all_dialog);
export_all_dialog->set_title("Export All");
export_all_dialog->set_title(TTR("Export All"));
export_all_dialog->set_text(TTR("Choose an export mode:"));
export_all_dialog->get_ok_button()->hide();
export_all_dialog->add_button(TTR("Debug"), true, "debug");
@ -1253,7 +1253,7 @@ ProjectExportDialog::ProjectExportDialog() {
export_error2->set_text(" - " + TTR("Export templates for this platform are missing:") + " ");
error_dialog = memnew(AcceptDialog);
error_dialog->set_title("Error");
error_dialog->set_title(TTR("Error"));
error_dialog->set_text(TTR("Export templates for this platform are missing/corrupted:") + " ");
main_vb->add_child(error_dialog);
error_dialog->hide();

View file

@ -84,7 +84,7 @@ protected:
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
undo_redo->create_action("Set Shader Global Variable");
undo_redo->create_action(TTR("Set Shader Global Variable"));
undo_redo->add_do_method(RS::get_singleton(), "global_variable_set", p_name, p_value);
undo_redo->add_undo_method(RS::get_singleton(), "global_variable_set", p_name, existing);
RS::GlobalVariableType type = RS::get_singleton()->global_variable_get_type(p_name);
@ -395,7 +395,7 @@ void ShaderGlobalsEditor::_variable_added() {
Variant value = create_var(RS::GlobalVariableType(variable_type->get_selected()));
undo_redo->create_action("Add Shader Global Variable");
undo_redo->create_action(TTR("Add Shader Global Variable"));
undo_redo->add_do_method(RS::get_singleton(), "global_variable_add", var, RS::GlobalVariableType(variable_type->get_selected()), value);
undo_redo->add_undo_method(RS::get_singleton(), "global_variable_remove", var);
Dictionary gv;
@ -413,7 +413,7 @@ void ShaderGlobalsEditor::_variable_deleted(const String &p_variable) {
print_line("deleted " + p_variable);
UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo();
undo_redo->create_action("Add Shader Global Variable");
undo_redo->create_action(TTR("Add Shader Global Variable"));
undo_redo->add_do_method(RS::get_singleton(), "global_variable_remove", p_variable);
undo_redo->add_undo_method(RS::get_singleton(), "global_variable_add", p_variable, RS::get_singleton()->global_variable_get_type(p_variable), RS::get_singleton()->global_variable_get(p_variable));