Skip to content

Commit 055c23b

Browse files
committed
Add mnemonics to New Tag window
1 parent 4e61a7e commit 055c23b

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

tagstudio/resources/translations/en.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
"ignore_list.add_extension": "&Add Extension",
129129
"ignore_list.mode.exclude": "Exclude",
130130
"ignore_list.mode.include": "Include",
131-
"ignore_list.mode.label": "List Mode:",
131+
"ignore_list.mode.label": "&List Mode:",
132132
"ignore_list.title": "File Extensions",
133133
"json_migration.checking_for_parity": "Checking for Parity...",
134134
"json_migration.creating_database_tables": "Creating SQL Database Tables...",
@@ -248,25 +248,28 @@
248248
"tag_manager.title": "Library Tags",
249249
"tag.add_to_search": "Add to Search",
250250
"tag.add.plural": "Add Tags",
251-
"tag.add": "&Add Tag",
252-
"tag.aliases": "Aliases",
251+
"tag.add": "Add Tag",
252+
"tag.add.button": "&Add Tag",
253+
"tag.aliases": "&Aliases",
254+
"tag.alias.new": "N&ew Alias",
253255
"tag.all_tags": "All Tags",
254256
"tag.choose_color": "Choose Tag Color",
255-
"tag.color": "Color",
257+
"tag.color": "&Color",
256258
"tag.confirm_delete": "Are you sure you want to delete the tag \"{tag_name}\"?",
257259
"tag.create_add": "Create && Add \"{query}\"",
258260
"tag.create": "&Create Tag",
259261
"tag.disambiguation.tooltip": "Use this tag for disambiguation",
260262
"tag.edit": "Edit Tag",
261-
"tag.is_category": "Is Category",
262-
"tag.name": "Name",
263+
"tag.is_category": "&Is Category",
264+
"tag.name": "&Name",
263265
"tag.new": "New Tag",
264266
"tag.parent_tags.add": "Add Parent Tag(s)",
267+
"tag.parent_tags.add.button": "A&dd Parent Tag(s)",
265268
"tag.parent_tags.description": "This tag can be treated as a substitute for any of these Parent Tags in searches.",
266-
"tag.parent_tags": "Parent Tags",
269+
"tag.parent_tags": "&Parent Tags",
267270
"tag.remove": "Remove Tag",
268271
"tag.search_for_tag": "Search for Tag",
269-
"tag.shorthand": "Shorthand",
272+
"tag.shorthand": "&Shorthand",
270273
"tag.tag_name_required": "Tag Name (Required)",
271274
"tag.view_limit": "&View Limit:",
272275
"trash.context.ambiguous": "Move file(s) to {trash_term}",

tagstudio/src/qt/modals/build_tag.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ def __init__(self, library: Library, tag: Tag | None = None):
8989
self.name_title = QLabel(Translations["tag.name"])
9090
self.name_layout.addWidget(self.name_title)
9191
self.name_field = QLineEdit()
92+
self.name_title.setBuddy(self.name_field)
9293
self.name_field.setFixedHeight(24)
9394
self.name_field.textChanged.connect(self.on_name_changed)
9495
self.name_field.setPlaceholderText(Translations["tag.tag_name_required"])
@@ -104,6 +105,7 @@ def __init__(self, library: Library, tag: Tag | None = None):
104105
self.shorthand_title = QLabel(Translations["tag.shorthand"])
105106
self.shorthand_layout.addWidget(self.shorthand_title)
106107
self.shorthand_field = QLineEdit()
108+
self.shorthand_title.setBuddy(self.shorthand_field)
107109
self.shorthand_layout.addWidget(self.shorthand_field)
108110

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

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

127130
self.aliases_add_button = QPushButton()
128-
self.aliases_add_button.setText("+")
131+
self.aliases_add_button.setText(Translations["tag.alias.new"])
129132
self.aliases_add_button.clicked.connect(self.add_alias_callback)
130133

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

145148
self.scroll_contents = QWidget()
146149
self.parent_tags_scroll_layout = QVBoxLayout(self.scroll_contents)
150+
self.parent_tags_title.setBuddy(self.scroll_contents)
147151
self.parent_tags_scroll_layout.setContentsMargins(6, 6, 6, 0)
148152
self.parent_tags_scroll_layout.setAlignment(Qt.AlignmentFlag.AlignTop)
149153

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

158162
self.parent_tags_add_button = QPushButton()
159163
self.parent_tags_add_button.setCursor(Qt.CursorShape.PointingHandCursor)
160-
self.parent_tags_add_button.setText("+")
164+
self.parent_tags_add_button.setText(Translations["tag.parent_tags.add.button"])
161165
self.parent_tags_layout.addWidget(self.parent_tags_add_button)
162166

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

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

214220
primary_color = QColor(get_tag_color(ColorType.PRIMARY, TagColorEnum.DEFAULT))

0 commit comments

Comments
 (0)