From ba43c4269a83c19162dfbff35fbb2af6e7689bac Mon Sep 17 00:00:00 2001 From: Jann Stute Date: Tue, 24 Dec 2024 14:23:16 +0100 Subject: [PATCH] fix: various review feedback --- tagstudio/resources/translations/en.json | 12 ++++-------- tagstudio/src/qt/modals/tag_database.py | 2 +- tagstudio/src/qt/platform_strings.py | 6 +++--- tagstudio/src/qt/ts_qt.py | 3 +-- tagstudio/src/qt/widgets/video_player.py | 2 +- 5 files changed, 10 insertions(+), 15 deletions(-) diff --git a/tagstudio/resources/translations/en.json b/tagstudio/resources/translations/en.json index 71fdfb6a..d0c3a899 100644 --- a/tagstudio/resources/translations/en.json +++ b/tagstudio/resources/translations/en.json @@ -50,12 +50,9 @@ "file.not_found": "File Not Found", "file.open_file_with": "Open file with", "file.open_file": "Open file", - "file.open_file.windows": "Open file in Explorer", - "file.open_file.macos": "Open file in Finder", - "file.open_file.other": "Open file in file explorer", - "file.open_location.generic": "Show file in explorer", + "file.open_location.generic": "Show file in file explorer", "file.open_location.mac": "Reveal in Finder", - "file.open_location.windows": "Show in File Explorer", + "file.open_location.windows": "Show in Explorer", "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.", @@ -131,7 +128,6 @@ "menu.file.refresh_directories": "&Refresh Directories", "menu.file": "&File", "menu.help": "&Help", - "menu.macros.autofill": "Autofill", "menu.macros.folders_to_tags": "Folders to Tags", "menu.macros": "&Macros", "menu.select": "Select", @@ -172,6 +168,7 @@ "tag.search_for_tag": "Search for Tag", "tag.shorthand": "Shorthand", "tag.tag_name_required": "Tag Name (Required)", + "tag.confirm_delete": "Are you sure you want to delete the tag \"{tag_name}\"?", "view.size.0": "Mini", "view.size.1": "Small", "view.size.2": "Medium", @@ -180,7 +177,6 @@ "window.title.error": "Error", "window.title.open_create_library": "Open/Create Library", "window.message.error_opening_library": "Error opening library.", - "tag_database.confirmation": "Are you sure you want to delete the tag \"{tag_name}\"?", "drop_import.title": "Conflicting File(s)", "drop_import.decription": "The following files have filenames already exist in the library", "drop_import.progress.label.initial": "Importing New Files...", @@ -190,7 +186,7 @@ "drop_import.duplicates_choice.singular": "The following file has a filename that already exists in the library.", "drop_import.duplicates_choice.plural": "The following {count} files have filenames that already exist in the library.", "landing.open_create_library": "Open/Create Library {shortcut}", - "video_player.autoplay": "Autoplay", + "media_player.autoplay": "Autoplay", "json_migration.title": "Save Format Migration: \"{path}\"", "json_migration.info.description": "Library save files created with TagStudio versions 9.4 and below will need to be migrated to the new v9.5+ format.

What you need to know:

", "json_migration.title.old_lib": "

v9.4 Library

", diff --git a/tagstudio/src/qt/modals/tag_database.py b/tagstudio/src/qt/modals/tag_database.py index 3e24a6c9..b1fbde8e 100644 --- a/tagstudio/src/qt/modals/tag_database.py +++ b/tagstudio/src/qt/modals/tag_database.py @@ -137,7 +137,7 @@ class TagDatabasePanel(PanelWidget): message_box = QMessageBox() Translations.translate_with_setter(message_box.setWindowTitle, "tag.remove") - Translations.translate_qobject(message_box, "tag_database.confirmation", tag_name=tag.name) + Translations.translate_qobject(message_box, "tag.confirm_delete", tag_name=tag.name) message_box.setStandardButtons(QMessageBox.Ok | QMessageBox.Cancel) # type: ignore message_box.setIcon(QMessageBox.Question) # type: ignore diff --git a/tagstudio/src/qt/platform_strings.py b/tagstudio/src/qt/platform_strings.py index ae2339dd..0c586cb4 100644 --- a/tagstudio/src/qt/platform_strings.py +++ b/tagstudio/src/qt/platform_strings.py @@ -10,9 +10,9 @@ from .translations import Translations class PlatformStrings: - open_file_str: str = Translations["file.open_file.other"] + open_file_str: str = Translations["file.open_location.generic"] if platform.system() == "Windows": - open_file_str = Translations["file.open_file.windows"] + open_file_str = Translations["file.open_location.windows"] elif platform.system() == "Darwin": - open_file_str = Translations["file.open_file.macos"] + open_file_str = Translations["file.open_location.mac"] diff --git a/tagstudio/src/qt/ts_qt.py b/tagstudio/src/qt/ts_qt.py index 530eda3f..880f9aaa 100644 --- a/tagstudio/src/qt/ts_qt.py +++ b/tagstudio/src/qt/ts_qt.py @@ -438,8 +438,7 @@ class QtDriver(DriverMixin, QObject): # tools_menu.addAction(create_collage_action) # Macros Menu ========================================================== - self.autofill_action = QAction(menu_bar) - Translations.translate_qobject(self.autofill_action, "menu.macros.autofill") + self.autofill_action = QAction("Autofill", menu_bar) self.autofill_action.triggered.connect( lambda: ( self.run_macros(MacroID.AUTOFILL, self.selected), diff --git a/tagstudio/src/qt/widgets/video_player.py b/tagstudio/src/qt/widgets/video_player.py index 187140e9..b1d4be34 100644 --- a/tagstudio/src/qt/widgets/video_player.py +++ b/tagstudio/src/qt/widgets/video_player.py @@ -118,7 +118,7 @@ class VideoPlayer(QGraphicsView): self.setContextMenuPolicy(Qt.ContextMenuPolicy.ActionsContextMenu) self.opener = FileOpenerHelper(filepath=self.filepath) autoplay_action = QAction(self) - Translations.translate_qobject(autoplay_action, "video_player.autoplay") + Translations.translate_qobject(autoplay_action, "media_player.autoplay") autoplay_action.setCheckable(True) self.addAction(autoplay_action) autoplay_action.setChecked(