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

[Upstream] build: Use XLIFF file to provide more context to Transifex translators #511

Merged
merged 4 commits into from
Jun 30, 2023

Conversation

lyricidal
Copy link

Currently, only a class name is provided to the Transifex translators as a context. Neither disambiguation parameter of the tr() 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 the src/qt/locale/bitcoin_en.xlf file which must be provided to the Transifex as a translation source instead of src/qt/locale/bitcoin_en.ts.

Closes #21465.

An example translatable string with additional <context> and <note> XML elements:

https://github.com/bitcoin/bitcoin/blob/35d52397e72f3ab96a7797148666b501d50b445d/src/qt/locale/bitcoin_en.xlf#L126-L132

from bitcoin/bitcoin#21694

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.
@lyricidal lyricidal added the Upstream Upstream backports/fixes label Jun 30, 2023
@lyricidal lyricidal merged commit 50bec6b into develop Jun 30, 2023
@lyricidal lyricidal deleted the upstream-xliff branch June 30, 2023 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Upstream Upstream backports/fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants