-
Notifications
You must be signed in to change notification settings - Fork 37.7k
build: Follow Transifex docs to prepare XLIFF source #22151
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
Conversation
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.
ACK ee3322d
I get an empty diff, as per PR instruction.
The main change here, going by the docs and the changes to the makefile
, is that our source file will no longer contain <Target>
. So the diff shows, many lines like below:
- <file original="../askpassphrasedialog.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <file original="../askpassphrasedialog.cpp" datatype="cpp" source-language="en"><body>
...
- <target xml:space="preserve"></target>
This is correct, going by the Transifex Doc:
... the translation file contains < Target > references, whereas a source file does not
I think this can be broken up into two commits, as I've done on this branch: https://github.com/jarolrod/bitcoin/tree/22151-alt
@@ -360,7 +360,9 @@ translate: $(srcdir)/qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCO | |||
@test -n $(LUPDATE) || echo "lupdate is required for updating translations" | |||
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LUPDATE) -no-obsolete -I $(srcdir) -locations relative $^ -ts $(srcdir)/qt/locale/bitcoin_en.ts | |||
@test -n $(LCONVERT) || echo "lconvert is required for updating translations" | |||
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LCONVERT) -o $(srcdir)/qt/locale/bitcoin_en.xlf -i $(srcdir)/qt/locale/bitcoin_en.ts | |||
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LCONVERT) -drop-translations -o $(srcdir)/qt/locale/bitcoin_en.xlf -i $(srcdir)/qt/locale/bitcoin_en.ts | |||
@$(SED) -i.old -e 's|source-language="en" target-language="en"|source-language="en"|' -e '/<target xml:space="preserve"><\/target>/d' $(srcdir)/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.
I'm surprised that custom processing with sed
is needed here, that there isn't one command to do what we want to do here (extract translations), it shouldn't be a rare thing but something every project needs to do?
What will the effect of these changes to the |
I don't know for sure (it is out of my personal experience, and it is not documented by Transifex). Expecting the following:
|
So it might be better to wait until after the 22.0 release to do this? Or is it required to make bitcoin-core/bitcoin-maintainer-tools#103 (and thus translations updates) work? |
No, it is not required. But it could change the internal Transifex machinery behavior in a way that would make additional post-processing in bitcoin-core/bitcoin-maintainer-tools#103 unneeded (that is only my guess).
Sure, it is the safest option. |
I guess it could go in now. Needs rebase though. |
Rebased ee3322d -> c284633 (pr22151.01 -> pr22151.02).
Done 🐅 |
GUIX hashes:
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
c284633
to
985d85e
Compare
Update c284633 -> 985d85e (pr22151.02 -> pr22151.03):
|
ACK 985d85e |
c515829 qt: Update translation source file (Hennadii Stepanov) Pull request description: As the part of the v23.0 [release process](bitcoin/bitcoin#22969) this PR updates translation source file, `src/qt/locale/bitcoin_en.xlf`. The following changes are reflected in this PR: - small string changes from #509 - internal technical details from bitcoin/bitcoin#22151 ACKs for top commit: laanwj: ACK c515829 Tree-SHA512: 2cf08f5b356dca25f99b0342645db5253eab0854796cf44fa52f8a6cf28f6d3f973e21589e0f9d3fef40a1b21b3f0aee00c9ca0897109a1967f9ef3320dd508f
This PR is a #21694 follow up.
From the Transifex docs:
This PR makes the
qt/locale/bitcoin_en.xlf
source file according to the docs.