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

Conversation

Bamowen
Copy link
Contributor

@Bamowen Bamowen commented Sep 16, 2024

This file compiles all strings found in the code in one json.
Surely I've missed some, but this should be a good enough start for the translation effort.

@CyanVoxel CyanVoxel added Type: Refactor Code that needs to be restructured or cleaned up Type: Translation Translates or improves translation capabilities and removed Type: Refactor Code that needs to be restructured or cleaned up labels Sep 16, 2024
@Bamowen Bamowen mentioned this pull request Sep 17, 2024
@CyanVoxel CyanVoxel added the Status: Mergeable The code is ready to be merged label Sep 19, 2024
This removes any string tokens for unused/unfinished features, internally facing code, and log outputs.
@CyanVoxel CyanVoxel merged commit 4cd70d2 into TagStudioDev:main Sep 23, 2024
5 checks passed
@CyanVoxel CyanVoxel removed the Status: Mergeable The code is ready to be merged label Sep 23, 2024
"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

seakrueger pushed a commit to seakrueger/TagStudio that referenced this pull request Sep 28, 2024
* Add en.json with strings found in code

* remove unused, internal, and logging strings

This removes any string tokens for unused/unfinished features, internally facing code, and log outputs.

---------

Co-authored-by: Travis Abendshien <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Translation Translates or improves translation capabilities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants