-
Notifications
You must be signed in to change notification settings - Fork 36.4k
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
build: Use XLIFF file to provide more context to Transifex translators #21694
Conversation
Hoping on "22.0" milestone assigned to this PR :) |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
CI is green now :) |
Guix builds:
Gitian builds:
|
I verified that |
.gitignore
Outdated
@@ -56,6 +56,8 @@ src/qt/bitcoin-qt.creator | |||
src/qt/bitcoin-qt.creator.user | |||
src/qt/bitcoin-qt.files | |||
src/qt/bitcoin-qt.includes | |||
# An intermediate XLIFF translation file. | |||
src/qt/locale/bitcoin_en.xlf |
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.
Transifex auto-updates from the branch. If you want transifex to pick this file up instead of the .ts
it needs to be checked in, not added to .gitignore
.
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.
Thanks! Updated.
The goal is to see the way the Transifex presents the added items to translators using an intermediate XLIFF translation file.
As the bitcoin_en.xlf file is created by the `make -C src translate` command, other translation-related files are also updated.
Updated 347a45d -> 35d5239 (pr21694.04 -> pr21694.05, diff):
|
The pr description is updated with an example of a translatable string presentation in the |
ACK 35d5239 |
The actual results are presented in bitcoin-core/gui#287. |
…lator comments 8b77133 qt: Replace disambiguation strings with translator comments (Hennadii Stepanov) Pull request description: Since #21694 is merged, translator comments is the right way to pass context to translators. This PR fixes changes were made: - in #220 before #21694 - in #21694 on testing purpose - in #125 Closes #288. ACKs for top commit: jarolrod: ACK 8b77133 Tree-SHA512: 466ade35f4969a41fbf3196780b1ae9fa810bab5d2f09077f8631604636cc63b24a901c719f6b5797366d2aa307993d0aa419ce35200c8d0a741a3d81cad3e6b
…lator comments 8b77133 qt: Replace disambiguation strings with translator comments (Hennadii Stepanov) Pull request description: Since bitcoin#21694 is merged, translator comments is the right way to pass context to translators. This PR fixes changes were made: - in #220 before bitcoin#21694 - in bitcoin#21694 on testing purpose - in #125 Closes #288. ACKs for top commit: jarolrod: ACK 8b77133 Tree-SHA512: 466ade35f4969a41fbf3196780b1ae9fa810bab5d2f09077f8631604636cc63b24a901c719f6b5797366d2aa307993d0aa419ce35200c8d0a741a3d81cad3e6b
985d85e Follow Transifex docs to prepare XLIFF source (Hennadii Stepanov) Pull request description: This PR is a #21694 follow up. From the Transifex [docs](https://docs.transifex.com/formats/xliff#how-to-distinguish-between-a-source-file-and-a-translation-file): > A source file is different than a translation file. The translation file contains \<Target> references, whereas a source file does not. This PR makes the `qt/locale/bitcoin_en.xlf` source file according to the docs. ACKs for top commit: laanwj: ACK 985d85e Tree-SHA512: 537ef78f39a12f094b17fc902c5b59c7ae4d27e5fa35fbf6b33386843e4521236dac3275ba26ff2d1c435e53e8942284644d5de67b0b3543cec96cbcd4351607
…sifex translators Excludes 35d5239
…sifex translators Excludes 35d5239
…sifex translators Excludes 35d5239
…sifex translators Excludes 35d5239
…sifex translators Excludes 35d5239
…sifex translators Excludes 35d5239
backport: bitcoin#21694 (Use XLIFF file to provide more context to Transifex)
Currently, only a class name is provided to the Transifex translators as a context. Neither
disambiguation
parameter of thetr()
function nor translator comments, being included as XML elements to*.ts
translation files, are not parsed by the Transifex due to its limited support of such files.This PR makes possible to provide all of the context details via an intermediate XLIFF translation file.
With this PR
make -C src translate
produces thesrc/qt/locale/bitcoin_en.xlf
file which must be provided to the Transifex as a translation source instead ofsrc/qt/locale/bitcoin_en.ts
.Closes #21465.
An example translatable string with additional
<context>
and<note>
XML elements:bitcoin/src/qt/locale/bitcoin_en.xlf
Lines 126 to 132 in 35d5239