-
Notifications
You must be signed in to change notification settings - Fork 120
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
i18n: Add custom translation file and doc #3569
Conversation
This allows loading custom translation files for the main UI (.json) and adds a doc explaining the translation process for communitity members.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see this! Just a few nits for community_translations.md
(not commenting on other files).
|
||
Load the following files, all located in the checked out copy of the repository, in the `app/i18n/translations` subdir: | ||
|
||
- `previous_original.json` (this file contains the original strings of the _previous_ Decrediton version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not clear from this doc how this file is involved. But I haven't checked translator.html
, perhaps it is explained there. If so, ignore this comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used to determine source strings that changed between releases (hypothetical example, app.title
changed from Decrediton
to Here's Decrediton
).
There aren't really "explanations" in the translator file (it's pretty rough for the moment) but it shouldn't really matter as long as the translator loads the file.
@matheusd which commit does |
On this PR it came from (IIRC) 1.5.0. previous_original is meant to be the original from the previous version of the software, such that the translator UI can figure out strings which changed across versions and present those for review. For example, if the string |
Yeah it's great to have this diffing for context. I just wondered shouldn't translators compare strings in |
To avoid churning, the We still have a couple of major PRs to go in (the ones related to DEX), so that's why they're still referring to the old version. Once those DEX PRs are in, I'll send a PR that updates In other words, This is still largely a hold over from the old translation flow, where it didn't make sense to always keep original.json in sync to the source code. We can evaluate whether it's useful to have some way of always regenerating |
This allows loading custom translation files for the main UI (.json) and adds a doc explaining the translation process for communitity members.
A development build with the ability to import the custom translation files is available below. Preview the doc for community translators.
Warning: Ideally only use those binaries on a VM to ensure it doesn't mess around on your existing install.
https://github.com/matheusd/decred-weekly-builds/releases/tag/v20211013150209