Skip to content

Commit

Permalink
Merge pull request godotengine#102049 from timothyqiu/editor-i18n
Browse files Browse the repository at this point in the history
Fix several i18n issues in editor
  • Loading branch information
Repiteo committed Jan 27, 2025
2 parents 69c5b03 + 4c4f29a commit c019f3d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion editor/code_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1911,7 +1911,9 @@ CodeTextEditor::CodeTextEditor() {
zoom_button->set_flat(true);
zoom_button->set_v_size_flags(SIZE_EXPAND | SIZE_SHRINK_CENTER);
zoom_button->set_tooltip_text(
TTR("Zoom factor") + "\n" + vformat(TTR("%sMouse wheel, %s/%s: Finetune\n%s: Reset"), keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL), ED_GET_SHORTCUT("script_editor/zoom_in")->get_as_text(), ED_GET_SHORTCUT("script_editor/zoom_out")->get_as_text(), ED_GET_SHORTCUT("script_editor/reset_zoom")->get_as_text()));
TTR("Zoom factor") + "\n" +
// TRANSLATORS: The placeholders are keyboard shortcuts. The first one is in the form of "Ctrl+"/"Cmd+".
vformat(TTR("%sMouse wheel, %s/%s: Finetune\n%s: Reset"), keycode_get_string((Key)KeyModifierMask::CMD_OR_CTRL), ED_GET_SHORTCUT("script_editor/zoom_in")->get_as_text(), ED_GET_SHORTCUT("script_editor/zoom_out")->get_as_text(), ED_GET_SHORTCUT("script_editor/reset_zoom")->get_as_text()));
zoom_button->set_text("100 %");

PopupMenu *zoom_menu = zoom_button->get_popup();
Expand Down
2 changes: 1 addition & 1 deletion editor/editor_properties_array_dict.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ void EditorPropertyArray::update_property() {
} else {
edit->set_text_alignment(HORIZONTAL_ALIGNMENT_CENTER);
edit->set_button_icon(Ref<Texture2D>());
edit->set_text(vformat(TTR("%s (size %s)"), array_type_name, itos(size)));
edit->set_text(vformat(TTR("%s (size %d)"), array_type_name, size));
}

bool unfolded = get_edited_object()->editor_is_section_unfolded(get_edited_property());
Expand Down
1 change: 1 addition & 0 deletions editor/editor_settings_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ TreeItem *EditorSettingsDialog::_create_shortcut_treeitem(TreeItem *p_parent, co

TreeItem *event_item = shortcuts->create_item(shortcut_item);

// TRANSLATORS: This is the label for the main input event of a shortcut.
event_item->set_text(0, shortcut_item->get_child_count() == 1 ? TTRC("Primary") : "");
event_item->set_text(1, ie->as_text());
event_item->set_auto_translate_mode(1, AUTO_TRANSLATE_MODE_DISABLED);
Expand Down
1 change: 1 addition & 0 deletions editor/filesystem_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ void FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory
file_item->set_icon(0, _get_tree_item_icon(!file_info.import_broken, file_info.type, file_info.icon_path));
if (da->is_link(file_metadata)) {
file_item->set_icon_overlay(0, get_editor_theme_icon(SNAME("LinkOverlay")));
// TRANSLATORS: This is a tooltip for a file that is a symbolic link to another file.
file_item->set_tooltip_text(0, vformat(TTR("Link to: %s"), da->read_link(file_metadata)));
}
file_item->set_icon_max_width(0, icon_size);
Expand Down
2 changes: 1 addition & 1 deletion platform/android/export/export_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3529,7 +3529,7 @@ Error EditorExportPlatformAndroid::export_project_helper(const Ref<EditorExportP
src_apk = find_export_template("android_release.apk");
}
if (src_apk.is_empty()) {
add_message(EXPORT_MESSAGE_ERROR, TTR("Export"), vformat(TTR("%s export template not found: \"%s\"."), (p_debug ? "Debug" : "Release"), src_apk));
add_message(EXPORT_MESSAGE_ERROR, TTR("Export"), vformat(p_debug ? TTR("Debug export template not found: \"%s\".") : TTR("Release export template not found: \"%s\"."), src_apk));
return ERR_FILE_NOT_FOUND;
}
}
Expand Down

0 comments on commit c019f3d

Please sign in to comment.