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

Add en.json with strings found in code #507

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 144 additions & 0 deletions tagstudio/resources/translations/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
{
"home.base_title": "TagStudio Alpha",
"home.main_window": "Main Window",
"home.include_all_tags": "And (Includes All Tags)",
"home.include_any_tag": "Or (Includes Any Tag)",
"home.thumbnail_size": "Thumbnail Size",
"home.search_entries": "Search Entries",
"home.search": "Search",
"menu.file": "File",
"menu.edit": "Edit",
"menu.tools": "Tools",
"menu.macros": "Macros",
"menu.window": "Window",
"menu.help": "Help",
"tag.new": "New Tag",
"tag.add": "Add Tag",
"tag.library": "Library Tags",
"merge.window_title": "Merging Duplicate Entries",
"merge.merge_dupe_entries": "Merging Duplicate Entries",
"preview.dimensions": "Dimensions",
"preview.recent": "Recent Libraries",
"library.title": "Title",
"library.author": "Author",
"library.Artist": "Artist",
"library.url": "URL",
"library.description": "Description",
"library.notes": "Notes",
"library.tags": "Tags",
"library.content_tags": "Content Tags",
"library.meta_tags": "Meta Tags",
"library.collation": "Collation",
"library.date": "Date",
"library.date_created": "Date Created",
"library.date_modified": "Date Modified",
"library.date_taken": "Date Taken",
"library.date_published": "Date Published",
"library.archived": "Date Archived",
"library.favorite": "Favorite",
"library.book": "Book",
"library.comic": "Comic",
"library.series": "Series",
"library.manga": "Manga",
"library.source": "Source",
"library.date_uploaded": "Date Uploaded",
"library.date_released": "Date Released",
"library.volume": "Volume",
"library.anthology": "Anthology",
"library.magazine": "Magazine",
"library.publisher": "Publisher",
"library.guest_artist": "Guest Artist",
"library.composer": "Composer",
"library.comments": "Comments",
"open_library.no_tagstudio_library_found": "No existing TagStudio library found at '%{path}'. Creating one.",
"open_library.library_creation_return_code": "Library Creation Return Code:",
"open_library.title": "Library",
"dialog.open_create_library": "Open/Create Library",
"splash.open_library": "Opening Library",
"status.save_success": "Library Saved and Closed!",
"status.backup_success": "Library Backup Saved at:",
"status.search_library_query": "Searching Library for",
"status.enumerate_query": "Query:%{query}, Frame: %{i}, Length: %{len(f)}",
"status.number_results_found": "%{len(all_items)} Results Found for \"%{query}\" (%{format_timespan(end_time - start_time)})",
"status.results_found": "Results",
"dialog.save_library": "Save Library",
"dialog.refresh_directories": "Refreshing Directories",
"dialog.scan_directories": "Scanning Directories for New Files...\nPreparing...",
"dialog.scan_directories.new_files": "Scanning Directories for New Files...\n%{x + 1} File%{\"s\" if x + 1 != 1 else \"\"} Searched, %{len(self.lib.files_not_in_library)} New Files Found",
"tooltip.open_library": "Ctrl+O",
"tooltip.save_library": "Ctrl+S",
"progression.running_macros.new_entries": "Running Macros on New Entries",
"progression.running_macros.one_new_entry": "Running Configured Macros on 1/%{len(new_ids)} New Entries",
"progression.running_macros.several_new_entry": "Running Configured Macros on %{x + 1}/%{len(new_ids)} New Entries",
"file_opener.open_file": "Opening file:}",
"file_opener.not_found": "File not found:",
"file_opener.command_not_found": "Could not find %{command_name} on system PATH",
"add_field.add": "Add Field",
"generic.remove_field": "Remove Field",
"generic.file_extension": "File Extensions",
"generic.open_file": "Open file",
"generic.open_file_explorer": "Open file in explorer",
"generic.cancel": "Cancel",
"generic.add": "Add",
"generic.name": "Name",
"generic.shorthand": "Shorthand",
"generic.aliases": "Aliases",
"generic.color": "Color",
"generic.delete": "Delete",
"generic.exclude": "Exclude",
"generic.include": "Include",
"generic.done": "Done",
"generic.open_all": "Open All",
"generic.close_all": "Close All",
"generic.refresh_all": "Refresh_All",
"generic.apply": "Apply",
"generic.mirror": "Mirror",
"generic.search_tags": "Search Tags",
"build_tags.parent_tags": "Parent Tags",
"build_tags.add_parent_tags": "Add Parent Tags",
"delete_unlinked.delete_unlinked": "Delete Unlinked Entries",
"delete_unlinked.confirm": "Are you sure you want to delete the following %{len(self.lib.missing_files)} entries?",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bamowen if the underlying implementation changes (for example from variable self.lib.missing_files to missing_files_count), will it break the translation? If so, then that's quite brittle way how to make these translation string.

In such case it would be better to change the strings in code from f-string to use format() like this:

"Are you (...) {files_count} entries?".format(files_count=len(self.lib.missing_files)), so the translation is not directly coupled to the variable name.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been doing this in #447 as I go through changing the code

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

"delete_unlinked.delete_entries": "Deleting Entries",
"delete_unlinked.deleting_number_entries": "Deleting %{x[0]+1}/{len(self.lib.missing_files)} Unlinked Entries",
"file_extension.add_extension": "Add Extension",
"file_extension.list_mode": "List Mode:",
"fix_dupes.fix_dupes": "Fix Duplicate Files",
"fix_dupes.no_file_selected": "No DupeGuru File Selected",
"fix_dupes.load_file": "Load DupeGuru File",
"fix_dupes.mirror_entries": "Mirror Entries",
"fix_dupes.mirror_description": "Mirror the Entry data across each duplicate match set, combining all data while not removing or duplicating fields. This operation will not delete any files or data.",
"fix_dupes.advice_label": "After mirroring, you're free to use DupeGuru to delete the unwanted files. Afterwards, use TagStudio's \"Fix Unlinked Entries\" feature in the Tools menu in order to delete the unlinked Entries.",
"fix_dupes.open_result_files": "Open DupeGuru Results File",
"fix_dupes.name_filter": "DupeGuru Files (*.dupeguru)",
"fix_dupes.no_file_match": "Duplicate File Matches: N/A",
"fix_dupes.number_file_match": "Duplicate File Matches: %{count}",
"fix_unlinked.fix_unlinked": "Fix Unlinked Entries",
"fix_unlinked.description": "Each library entry is linked to a file in one of your directories. If a file linked to an entry is moved or deleted outside of TagStudio, it is then considered unlinked. Unlinked entries may be automatically relinked via searching your directories, manually relinked by the user, or deleted if desired.",
"fix_unlinked.duplicate_description": "Duplicate entries are defined as multiple entries which point to the same file on disk. Merging these will combine the tags and metadata from all duplicates into a single consolidated entry. These are not to be confused with \"duplicate files\", which are duplicates of your files themselves outside of TagStudio.",
"fix_unlinked.search_and_relink": "Search && Relink",
"fix_unlinked.refresh_dupes": "Refresh Duplicate Entries",
"fix_unlinked.merge_dupes": "Merge Duplicate Entries",
"fix_unlinked.manual_relink": "Manual Relink",
"fix_unlinked.delete_unlinked": "Delete Unlinked Entries",
"fix_unlinked.scan_library.title": "Scanning Library",
"fix_unlinked.scan_library.label": "Scanning Library for Unlinked Entries...",
"folders_to_tags.folders_to_tags": "Converting folders to Tags",
"folders_to_tags.title": "Create Tags From Folders",
"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.",
"mirror_entities.are_you_sure": "Are you sure you want to mirror the following %{len(self.lib.dupe_files)} Entries?",
"mirror_entities.title": "Mirroring Entries",
"mirror_entities.label": "Mirroring 1/%{count} Entries...",
"relink_unlinked.title": "Relinking Entries",
"relink_unlinked.attempt_relink": "Attempting to Relink %{x[0]+1}/%{len(self.lib.missing_files)} Entries, %{self.fixed} Successfully Relinked",
"landing.open_button": "Open/Create Library %{open_shortcut_text}",
"preview_panel.missing_location": "Location is missing",
"preview_panel.update_widgets": "[ENTRY PANEL] UPDATE WIDGETS (%{self.driver.selected})",
"preview_panel.no_items_selected": "No Items Selected",
"preview_panel.confirm_remove": "Are you sure you want to remove this \"%{self.lib.get_field_attr(field, \"name\")}\" field?",
"preview_panel.mixed_data": "Mixed Data",
"preview_panel.edit_name": "Edit",
"preview_panel.unknown_field_type": "Unknown Field Type",
"tag.search_for_tag": "Search for Tag",
"tag.add_search": "Add to Search",
"text_line_edit.unknown_event_type": "unknown event type: %{event}"
}