Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: better align access keys with the guidelines #843

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
113 changes: 60 additions & 53 deletions tagstudio/resources/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"drop_import.progress.label.singular": "Importing New Files...\n1 File imported.{suffix}",
"drop_import.progress.window_title": "Import Files",
"drop_import.title": "Conflicting File(s)",
"edit.color_manager": "Manage Tag Colors",
"edit.color_manager": "Manage Tag C&olors",
"edit.tag_manager": "Manage Tags",
"entries.duplicate.merge.label": "Merging Duplicate Entries...",
"entries.duplicate.merge": "Merge Duplicate Entries",
Expand All @@ -38,7 +38,7 @@
"entries.running.dialog.new_entries": "Adding {total} New File Entries...",
"entries.running.dialog.title": "Adding New File Entries",
"entries.tags": "Tags",
"entries.unlinked.delete_alt": "De&lete Unlinked Entries",
"entries.unlinked.delete_alt": "&Delete Unlinked Entries",
"entries.unlinked.delete.confirm": "Are you sure you want to delete the following {count} entries?",
"entries.unlinked.delete.deleting_count": "Deleting {idx}/{count} Unlinked Entries",
"entries.unlinked.delete.deleting": "Deleting Entries",
Expand Down Expand Up @@ -78,10 +78,10 @@
"file.open_location.generic": "Show file in file explorer",
"file.open_location.mac": "Reveal in Finder",
"file.open_location.windows": "Show in File Explorer",
"folders_to_tags.close_all": "Close All",
"folders_to_tags.close_all": "&Close All",
"folders_to_tags.converting": "Converting folders to Tags",
"folders_to_tags.description": "Creates tags based on your folder structure and applies them to your entries.\n The structure below shows all the tags that will be created and what entries they will be applied to.",
"folders_to_tags.open_all": "Open All",
"folders_to_tags.open_all": "&Open All",
"folders_to_tags.title": "Create Tags From Folders",
"about.title": "About TagStudio",
"about.content": "<p>TagStudio is a photo & file organization application with an underlying tag-based system that focuses on giving freedom and flexibility to the user. No proprietary programs or formats, no sea of sidecar files, and no complete upheaval of your filesystem structure.</p>License: GPLv3<br>Config path: {config_path}<br>FFmpeg: {ffmpeg}<br>FFprobe: {ffprobe}<p><a href=\"https://github.com/TagStudioDev/TagStudio\">GitHub</a> | <a href=\"https://docs.tagstud.io\">Documentation</a> | <a href=\"https://discord.com/invite/hRNnVKhF2G\">Discord</a></p>",
Expand All @@ -96,7 +96,7 @@
"generic.cut": "Cut",
"generic.delete_alt": "&Delete",
"generic.delete": "Delete",
"generic.done_alt": "&Done",
"generic.done_alt": "Done",
"generic.done": "Done",
"generic.edit_alt": "&Edit",
"generic.edit": "Edit",
Expand All @@ -111,24 +111,27 @@
"generic.rename_alt": "&Rename",
"generic.rename": "Rename",
"generic.reset": "Reset",
"generic.save": "Save",
"generic.save": "&Save",
"generic.skip_alt": "&Skip",
"generic.skip": "Skip",
"help.visit_github": "Visit GitHub Repository",
"home.search_entries": "Search Entries",
"home.search_library": "Search Library",
"home.search_tags": "Search Tags",
"home.search": "Search",
"home.thumbnail_size.extra_large": "Extra Large Thumbnails",
"home.thumbnail_size.large": "Large Thumbnails",
"home.thumbnail_size.medium": "Medium Thumbnails",
"home.thumbnail_size.mini": "Mini Thumbnails",
"home.thumbnail_size.small": "Small Thumbnails",
"home.sorting_mode": "&Sort By:",
"home.sorting_direction": "&Order:",
"home.thumbnail_size.extra_large": "Extra Large",
"home.thumbnail_size.large": "Large",
"home.thumbnail_size.medium": "Medium",
"home.thumbnail_size.mini": "Mini",
"home.thumbnail_size.small": "Small",
"home.thumbnail_size": "Thumbnail Size",
"home.thumbnail_size_label": "T&humbnail Size:",
"ignore_list.add_extension": "&Add Extension",
"ignore_list.mode.exclude": "Exclude",
"ignore_list.mode.include": "Include",
"ignore_list.mode.label": "List Mode:",
"ignore_list.mode.label": "&List Mode:",
"ignore_list.title": "File Extensions",
"json_migration.checking_for_parity": "Checking for Parity...",
"json_migration.creating_database_tables": "Creating SQL Database Tables...",
Expand Down Expand Up @@ -157,12 +160,13 @@
"json_migration.title.new_lib": "<h2>v9.5+ Library</h2>",
"json_migration.title.old_lib": "<h2>v9.4 Library</h2>",
"json_migration.title": "Save Format Migration: \"{path}\"",
"landing.open_create_library": "Open/Create Library {shortcut}",
"landing.open_create_library": "&Open/Create Library {shortcut}",
"library_object.name_required": "Name (Required)",
"library_object.name": "Name",
"library_object.slug_required": "ID Slug (Required)",
"library_object.slug": "ID Slug",
"library.field.add": "Add Field",
"library.field.add.button": "A&dd Field",
"library.field.confirm_remove": "Are you sure you want to remove this \"{name}\" field?",
"library.field.mixed_data": "Mixed Data",
"library.field.remove": "Remove Field",
Expand All @@ -176,52 +180,52 @@
"macros.running.dialog.new_entries": "Running Configured Macros on {count}/{total} New File Entries...",
"macros.running.dialog.title": "Running Macros on New Entries",
"media_player.autoplay": "Autoplay",
"menu.delete_selected_files_ambiguous": "Move File(s) to {trash_term}",
"menu.delete_selected_files_plural": "Move Files to {trash_term}",
"menu.delete_selected_files_singular": "Move File to {trash_term}",
"menu.edit.ignore_list": "Ignore Files and Folders",
"menu.edit.manage_file_extensions": "Manage File Extensions",
"menu.edit.manage_tags": "Manage Tags",
"menu.edit.new_tag": "New &Tag",
"menu.edit": "Edit",
"menu.file.clear_recent_libraries": "Clear Recent",
"menu.delete_selected_files_ambiguous": "&Move File(s) to {trash_term}",
"menu.delete_selected_files_plural": "&Move Files to {trash_term}",
"menu.delete_selected_files_singular": "&Move File to {trash_term}",
"menu.edit.ignore_list": "&Ignore Files and Folders",
"menu.edit.manage_file_extensions": "Manage &File Extensions",
"menu.edit.manage_tags": "Manage &Tags",
"menu.edit.new_tag": "&New Tag",
"menu.edit": "&Edit",
"menu.file.clear_recent_libraries": "&Clear Recent",
"menu.file.close_library": "&Close Library",
"menu.file.new_library": "New Library",
"menu.file.new_library": "&New Library",
"menu.file.open_create_library": "&Open/Create Library",
"menu.file.open_library": "Open Library",
"menu.file.open_recent_library": "Open Recent",
"menu.file.refresh_directories": "&Refresh Directories",
"menu.file.save_backup": "&Save Library Backup",
"menu.file.save_library": "Save Library",
"menu.file.open_library": "&Open Library",
"menu.file.open_recent_library": "Open &Recent",
"menu.file.refresh_directories": "Refresh &Directories",
"menu.file.save_backup": "Save &Library Backup",
"menu.file.save_library": "&Save Library",
"menu.file": "&File",
"menu.help.about": "About",
"menu.help.about": "&About",
"menu.help": "&Help",
"menu.macros.folders_to_tags": "Folders to Tags",
"menu.macros.folders_to_tags": "&Folders to Tags",
"menu.macros": "&Macros",
"menu.select": "Select",
"menu.settings": "Settings...",
"menu.tools.fix_duplicate_files": "Fix Duplicate &Files",
"menu.select": "&Select",
"menu.settings": "&Settings...",
"menu.tools.fix_duplicate_files": "Fix &Duplicate Files",
"menu.tools.fix_unlinked_entries": "Fix &Unlinked Entries",
"menu.tools": "&Tools",
"menu.view": "&View",
"menu.window": "Window",
"menu.window": "&Window",
"namespace.create.description_color": "Tag colors use namespaces as color palette groups. All custom colors must be under a namespace group first.",
"namespace.create.description": "Namespaces are used by TagStudio to separate groups of items such as tags and colors in a way that makes them easy to export and share. Namespaces starting with \"tagstudio\" are reserved by TagStudio for internal use.",
"namespace.create.title": "Create Namespace",
"namespace.new.button": "New Namespace",
"namespace.new.prompt": "Create a New Namespace to Start Adding Custom Colors!",
"namespace.new.button": "&New Namespace",
"namespace.new.prompt": "&Create a New Namespace to Start Adding Custom Colors!",
"preview.multiple_selection": "<b>{count}</b> Items Selected",
"preview.no_selection": "No Items Selected",
"select.add_tag_to_selected": "Add Tag to Selected",
"select.all": "Select All",
"select.clear": "Clear Selection",
"edit.copy_fields": "Copy Fields",
"edit.paste_fields": "Paste Fields",
"settings.clear_thumb_cache.title": "Clear Thumbnail Cache",
"settings.language": "Language",
"settings.open_library_on_start": "Open Library on Start",
"select.add_tag_to_selected": "A&dd Tag to Selected",
"select.all": "Select &All",
"select.clear": "Clear &Selection",
"edit.copy_fields": "&Copy Fields",
"edit.paste_fields": "&Paste Fields",
"settings.clear_thumb_cache.title": "&Clear Thumbnail Cache",
"settings.language": "&Language",
"settings.open_library_on_start": "Op&en Library on Start",
"settings.restart_required": "Please restart TagStudio for changes to take effect.",
"settings.show_filenames_in_grid": "Show Filenames in Grid",
"settings.show_filenames_in_grid": "&Show Filenames in Grid",
"settings.show_recent_libraries": "Show Recent Libraries",
"settings.title": "Settings",
"sorting.direction.ascending": "Ascending",
Expand All @@ -248,26 +252,29 @@
"tag.add_to_search": "Add to Search",
"tag.add.plural": "Add Tags",
"tag.add": "Add Tag",
"tag.aliases": "Aliases",
"tag.add.button": "&Add Tag",
"tag.aliases": "&Aliases",
"tag.alias.new": "N&ew Alias",
"tag.all_tags": "All Tags",
"tag.choose_color": "Choose Tag Color",
"tag.color": "Color",
"tag.color": "&Color",
"tag.confirm_delete": "Are you sure you want to delete the tag \"{tag_name}\"?",
"tag.create_add": "Create && Add \"{query}\"",
"tag.create": "Create Tag",
"tag.create": "&Create Tag",
"tag.disambiguation.tooltip": "Use this tag for disambiguation",
"tag.edit": "Edit Tag",
"tag.is_category": "Is Category",
"tag.name": "Name",
"tag.is_category": "&Is Category",
"tag.name": "&Name",
"tag.new": "New Tag",
"tag.parent_tags.add": "Add Parent Tag(s)",
"tag.parent_tags.add.button": "A&dd Parent Tag(s)",
"tag.parent_tags.description": "This tag can be treated as a substitute for any of these Parent Tags in searches.",
"tag.parent_tags": "Parent Tags",
"tag.parent_tags": "&Parent Tags",
"tag.remove": "Remove Tag",
"tag.search_for_tag": "Search for Tag",
"tag.shorthand": "Shorthand",
"tag.shorthand": "&Shorthand",
"tag.tag_name_required": "Tag Name (Required)",
"tag.view_limit": "View Limit:",
"tag.view_limit": "&View Limit:",
"trash.context.ambiguous": "Move file(s) to {trash_term}",
"trash.context.plural": "Move files to {trash_term}",
"trash.context.singular": "Move file to {trash_term}",
Expand Down
11 changes: 10 additions & 1 deletion tagstudio/src/qt/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
QHBoxLayout, QVBoxLayout, QLayout, QLineEdit, QMainWindow,
QPushButton, QScrollArea, QSizePolicy,
QStatusBar, QWidget, QSplitter, QCheckBox,
QSpacerItem, QCompleter)
QSpacerItem, QCompleter, QLabel)
from src.qt.pagination import Pagination
from src.qt.widgets.landing import LandingWidget

Expand Down Expand Up @@ -63,15 +63,22 @@ def setupUi(self, MainWindow):
self.horizontalLayout_3.addItem(spacerItem)

# Sorting Dropdowns
self.sorting_mode_label = QLabel(Translations["home.sorting_mode"])
self.sorting_mode_combobox = QComboBox(self.centralwidget)
self.sorting_mode_combobox.setObjectName(u"sortingModeComboBox")
self.horizontalLayout_3.addWidget(self.sorting_mode_label)
self.horizontalLayout_3.addWidget(self.sorting_mode_combobox)
self.sorting_mode_label.setBuddy(self.sorting_mode_combobox)

self.sorting_direction_label = QLabel(Translations["home.sorting_direction"])
self.sorting_direction_combobox = QComboBox(self.centralwidget)
self.sorting_direction_combobox.setObjectName(u"sortingDirectionCombobox")
self.horizontalLayout_3.addWidget(self.sorting_direction_label)
self.horizontalLayout_3.addWidget(self.sorting_direction_combobox)
self.sorting_direction_label.setBuddy(self.sorting_direction_combobox)

# Thumbnail Size placeholder
self.thumb_size_label = QLabel(Translations["home.thumbnail_size_label"])
self.thumb_size_combobox = QComboBox(self.centralwidget)
self.thumb_size_combobox.setObjectName(u"thumbSizeComboBox")
self.thumb_size_combobox.setPlaceholderText(Translations["home.thumbnail_size"])
Expand All @@ -84,7 +91,9 @@ def setupUi(self, MainWindow):
self.thumb_size_combobox.setSizePolicy(sizePolicy)
self.thumb_size_combobox.setMinimumWidth(128)
self.thumb_size_combobox.setMaximumWidth(352)
self.horizontalLayout_3.addWidget(self.thumb_size_label)
self.horizontalLayout_3.addWidget(self.thumb_size_combobox)
self.thumb_size_label.setBuddy(self.thumb_size_combobox)
self.gridLayout.addLayout(self.horizontalLayout_3, 5, 0, 1, 1)

self.splitter = QSplitter()
Expand Down
10 changes: 8 additions & 2 deletions tagstudio/src/qt/modals/build_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def __init__(self, library: Library, tag: Tag | None = None):
self.name_title = QLabel(Translations["tag.name"])
self.name_layout.addWidget(self.name_title)
self.name_field = QLineEdit()
self.name_title.setBuddy(self.name_field)
self.name_field.setFixedHeight(24)
self.name_field.textChanged.connect(self.on_name_changed)
self.name_field.setPlaceholderText(Translations["tag.tag_name_required"])
Expand All @@ -104,6 +105,7 @@ def __init__(self, library: Library, tag: Tag | None = None):
self.shorthand_title = QLabel(Translations["tag.shorthand"])
self.shorthand_layout.addWidget(self.shorthand_title)
self.shorthand_field = QLineEdit()
self.shorthand_title.setBuddy(self.shorthand_field)
self.shorthand_layout.addWidget(self.shorthand_field)

# Aliases --------------------------------------------------------------
Expand All @@ -117,6 +119,7 @@ def __init__(self, library: Library, tag: Tag | None = None):
self.aliases_layout.addWidget(self.aliases_title)

self.aliases_table = QTableWidget(0, 2)
self.aliases_title.setBuddy(self.aliases_table)
self.aliases_table.horizontalHeader().setVisible(False)
self.aliases_table.verticalHeader().setVisible(False)
self.aliases_table.horizontalHeader().setStretchLastSection(True)
Expand All @@ -125,7 +128,7 @@ def __init__(self, library: Library, tag: Tag | None = None):
self.aliases_table.setFocusPolicy(Qt.FocusPolicy.NoFocus)

self.aliases_add_button = QPushButton()
self.aliases_add_button.setText("+")
self.aliases_add_button.setText(Translations["tag.alias.new"])
self.aliases_add_button.clicked.connect(self.add_alias_callback)

# Parent Tags ----------------------------------------------------------
Expand All @@ -144,6 +147,7 @@ def __init__(self, library: Library, tag: Tag | None = None):

self.scroll_contents = QWidget()
self.parent_tags_scroll_layout = QVBoxLayout(self.scroll_contents)
self.parent_tags_title.setBuddy(self.scroll_contents)
self.parent_tags_scroll_layout.setContentsMargins(6, 6, 6, 0)
self.parent_tags_scroll_layout.setAlignment(Qt.AlignmentFlag.AlignTop)

Expand All @@ -157,7 +161,7 @@ def __init__(self, library: Library, tag: Tag | None = None):

self.parent_tags_add_button = QPushButton()
self.parent_tags_add_button.setCursor(Qt.CursorShape.PointingHandCursor)
self.parent_tags_add_button.setText("+")
self.parent_tags_add_button.setText(Translations["tag.parent_tags.add.button"])
self.parent_tags_layout.addWidget(self.parent_tags_add_button)

exclude_ids: list[int] = list()
Expand Down Expand Up @@ -199,6 +203,7 @@ def __init__(self, library: Library, tag: Tag | None = None):
)
self.color_button.button.clicked.connect(self.choose_color_modal.show)
self.color_layout.addWidget(self.color_button)
self.color_title.setBuddy(self.color_button)

# Category -------------------------------------------------------------
self.cat_widget = QWidget()
Expand All @@ -209,6 +214,7 @@ def __init__(self, library: Library, tag: Tag | None = None):
self.cat_layout.setAlignment(Qt.AlignmentFlag.AlignLeft)
self.cat_title = QLabel(Translations["tag.is_category"])
self.cat_checkbox = QCheckBox()
self.cat_title.setBuddy(self.cat_checkbox)
self.cat_checkbox.setFixedSize(22, 22)

primary_color = QColor(get_tag_color(ColorType.PRIMARY, TagColorEnum.DEFAULT))
Expand Down
1 change: 1 addition & 0 deletions tagstudio/src/qt/modals/file_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def __init__(self, library: "Library"):
self.mode_layout.setSpacing(12)
self.mode_label = QLabel(Translations["ignore_list.mode.label"])
self.mode_combobox = QComboBox()
self.mode_label.setBuddy(self.mode_combobox)
self.mode_combobox.setEditable(False)
self.mode_combobox.addItem("")
self.mode_combobox.addItem("")
Expand Down
1 change: 1 addition & 0 deletions tagstudio/src/qt/modals/settings_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def __init__(self, driver):
"Turkish": "tr",
}
self.language_combobox = QComboBox()
language_label.setBuddy(self.language_combobox);
self.language_combobox.addItems(list(self.languages.keys()))
current_lang: str = str(
driver.settings.value(SettingItems.LANGUAGE, defaultValue="en", type=str)
Expand Down
1 change: 1 addition & 0 deletions tagstudio/src/qt/modals/tag_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def __init__(
self.limit_layout.addWidget(self.limit_title)

self.limit_combobox = QComboBox()
self.limit_title.setBuddy(self.limit_combobox)
self.limit_combobox.setEditable(False)
self.limit_combobox.addItems([str(x) for x in TagSearchPanel._limit_items])
self.limit_combobox.setCurrentIndex(TagSearchPanel._default_limit_idx)
Expand Down
4 changes: 2 additions & 2 deletions tagstudio/src/qt/ts_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1768,10 +1768,10 @@ def update_recent_lib_menu(self):
settings.endGroup()

# Create actions for each library
for library_key in libs_sorted:
for index, library_key in enumerate(libs_sorted):
path = Path(library_key[1][0])
action = QAction(self.open_recent_library_menu)
action.setText(str(path))
action.setText(f"&{index + 1}: {str(path)}")
action.triggered.connect(lambda checked=False, p=path: self.open_library(p))
actions.append(action)

Expand Down
4 changes: 2 additions & 2 deletions tagstudio/src/qt/widgets/preview_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ def __init__(self, library: Library, driver: "QtDriver"):
add_buttons_layout.setContentsMargins(0, 0, 0, 0)
add_buttons_layout.setSpacing(6)

self.add_tag_button = QPushButton(Translations["tag.add"])
self.add_tag_button = QPushButton(Translations["tag.add.button"])
self.add_tag_button.setEnabled(False)
self.add_tag_button.setCursor(Qt.CursorShape.PointingHandCursor)
self.add_tag_button.setMinimumHeight(28)
self.add_tag_button.setStyleSheet(PreviewPanel.button_style)

self.add_field_button = QPushButton(Translations["library.field.add"])
self.add_field_button = QPushButton(Translations["library.field.add.button"])
self.add_field_button.setEnabled(False)
self.add_field_button.setCursor(Qt.CursorShape.PointingHandCursor)
self.add_field_button.setMinimumHeight(28)
Expand Down
Loading