Skip to content

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Jun 4, 2021

This PR is a #21694 follow up.

From the Transifex docs:

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.

Copy link
Member

@jarolrod jarolrod left a 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

  1. build: prepare XLIFF source according to Transifex docs (508263f)
    • Applies the changes to make file to prepare the XLIFF source file according to the Transifex docs
  2. qt: translations update (ce6d62b)
    • Actually apply the translation update

@@ -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
Copy link
Member

@laanwj laanwj Jun 7, 2021

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?

@laanwj
Copy link
Member

laanwj commented Jun 7, 2021

What will the effect of these changes to the xlf to translators? Do all the messages go back to untranslated or unreviewed?

@hebasto
Copy link
Member Author

hebasto commented Jun 7, 2021

What will the effect of these changes to the xlf to translators? Do all the messages go back to untranslated or unreviewed?

I don't know for sure (it is out of my personal experience, and it is not documented by Transifex).

Expecting the following:

  • the "Translated" status will not be changed
  • the "Reviewed" status will be set to "No"

@laanwj
Copy link
Member

laanwj commented Jun 7, 2021

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?

@hebasto
Copy link
Member Author

hebasto commented Jun 7, 2021

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).

So it might be better to wait until after the 22.0 release to do this?

Sure, it is the safest option.

@laanwj
Copy link
Member

laanwj commented Aug 18, 2021

I guess it could go in now. Needs rebase though.

@laanwj laanwj added this to the 23.0 milestone Aug 18, 2021
@hebasto
Copy link
Member Author

hebasto commented Aug 24, 2021

Rebased ee3322d -> c284633 (pr22151.01 -> pr22151.02).

@laanwj

I guess it could go in now. Needs rebase though.

Done 🐅

@jarolrod
Copy link
Member

GUIX hashes:

find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum

60ec573b837f7f4e2f86a0147642ceafe5d0098b1719f6dc8da4dde51b70d31b  guix-build-c2846331ff66/output/aarch64-linux-gnu/SHA256SUMS.part
76a92d76baaa6c88ac103d0b5e08615c2adf649f7c52921152e399776db559ca  guix-build-c2846331ff66/output/aarch64-linux-gnu/bitcoin-c2846331ff66-aarch64-linux-gnu-debug.tar.gz
9562fb1ff9d07bb62355b6f23a19ce467a2940891a9a5fe6cfa07bae7a740022  guix-build-c2846331ff66/output/aarch64-linux-gnu/bitcoin-c2846331ff66-aarch64-linux-gnu.tar.gz
094a5d9caac372532d69da3e7aad93d9aba7740acb7eb4124344ca7cfd34491c  guix-build-c2846331ff66/output/arm-linux-gnueabihf/SHA256SUMS.part
df1653c9a1527bf935757baad8bec2fc5a068ba136addf9ca25e4d6a3fd06e42  guix-build-c2846331ff66/output/arm-linux-gnueabihf/bitcoin-c2846331ff66-arm-linux-gnueabihf-debug.tar.gz
0a604e1545eaf8a1cee1eb035bcd5616d6cc5142700d79f6c5f8d2cddcd82d91  guix-build-c2846331ff66/output/arm-linux-gnueabihf/bitcoin-c2846331ff66-arm-linux-gnueabihf.tar.gz
1c60f5fc53ad5d6a5e39745da4db814495a361a6767c01f6e041fc8fdde0b44d  guix-build-c2846331ff66/output/dist-archive/bitcoin-c2846331ff66.tar.gz
3cbaeec9984f78d4167b22063f26264fe99aaac00cc7c0a461b59444b2d87bf6  guix-build-c2846331ff66/output/powerpc64-linux-gnu/SHA256SUMS.part
3f367dd25416da342a908957547ac7f44c10aa81286d763fd315b68d143a943d  guix-build-c2846331ff66/output/powerpc64-linux-gnu/bitcoin-c2846331ff66-powerpc64-linux-gnu-debug.tar.gz
af58382ba5d2b52c97873ae67cf295c124211d8d4ac80b2a876c317bc438ac2a  guix-build-c2846331ff66/output/powerpc64-linux-gnu/bitcoin-c2846331ff66-powerpc64-linux-gnu.tar.gz
c2f9deb91b22ae92e9afaff8428d65bc0cc04818afc6d02b3ac963666fc8ee3c  guix-build-c2846331ff66/output/powerpc64le-linux-gnu/SHA256SUMS.part
132f48cb63d633141b58f28688cd1dd90d83d2266134a17ea51481b22bf6cd1c  guix-build-c2846331ff66/output/powerpc64le-linux-gnu/bitcoin-c2846331ff66-powerpc64le-linux-gnu-debug.tar.gz
4fa9f70045217e26b09884f0e66a9cac0f1cfa96b1e677224840e3201ab7a973  guix-build-c2846331ff66/output/powerpc64le-linux-gnu/bitcoin-c2846331ff66-powerpc64le-linux-gnu.tar.gz
437a2c25ad833a8c12f963c6e46388cb396d23a009ca736ef48f2445abf4e94b  guix-build-c2846331ff66/output/riscv64-linux-gnu/SHA256SUMS.part
7aeafbc1ef0591891ad32fbd3c609059c45aaa67aa21203f83559f090338425a  guix-build-c2846331ff66/output/riscv64-linux-gnu/bitcoin-c2846331ff66-riscv64-linux-gnu-debug.tar.gz
01dc893c72260a2a5bf47d2e839026fe0a28b3edd6bf5c347cbb035ab1c20fe5  guix-build-c2846331ff66/output/riscv64-linux-gnu/bitcoin-c2846331ff66-riscv64-linux-gnu.tar.gz
2ee78aa08218b55a1155879557b1008dc086f278c3c76dfac23765c69169378b  guix-build-c2846331ff66/output/x86_64-apple-darwin18/SHA256SUMS.part
4999c644266d343388a6fcf5093145659587cfb2fe168457af95861d96ad28d8  guix-build-c2846331ff66/output/x86_64-apple-darwin18/bitcoin-c2846331ff66-osx-unsigned.dmg
4b61dc119966212327ffedcefe704a8f27269b6b8e6731e340479e4d99a6bbc6  guix-build-c2846331ff66/output/x86_64-apple-darwin18/bitcoin-c2846331ff66-osx-unsigned.tar.gz
2170c55e4e6cb9d37f382ea7c23a8066d66ae95e7642595cf985aa2b8313184a  guix-build-c2846331ff66/output/x86_64-apple-darwin18/bitcoin-c2846331ff66-osx64.tar.gz
19943256e81ea24c4700974c0be9ba33f7841135c9b840881e1e6c39cb19edd5  guix-build-c2846331ff66/output/x86_64-linux-gnu/SHA256SUMS.part
5dca32234ec68b2155c292bae66e1a6d074740d76cb7879ac8578aeaeccdcd59  guix-build-c2846331ff66/output/x86_64-linux-gnu/bitcoin-c2846331ff66-x86_64-linux-gnu-debug.tar.gz
49deaddcc733d755c36e55f372a9efd496fd1683115ea2307599d24745f6ff39  guix-build-c2846331ff66/output/x86_64-linux-gnu/bitcoin-c2846331ff66-x86_64-linux-gnu.tar.gz
ad7a6cef85414ddf3fa3afbd345df582b81dd87337ff2abd7c71681be0c9170b  guix-build-c2846331ff66/output/x86_64-w64-mingw32/SHA256SUMS.part
acf75d9c9e4b60981cf50b90787e67b51768569618bc3b92b01dce6c5031df1c  guix-build-c2846331ff66/output/x86_64-w64-mingw32/bitcoin-c2846331ff66-win-unsigned.tar.gz
fc17ed0b813c8d3f6deb0b7e0778868e113986547371174a331661f56b042e36  guix-build-c2846331ff66/output/x86_64-w64-mingw32/bitcoin-c2846331ff66-win64-debug.zip
76e42cb7c5e27808e6e42e40966bcff6e46b67ddddecd8ddaf7d8b9da0af6ebe  guix-build-c2846331ff66/output/x86_64-w64-mingw32/bitcoin-c2846331ff66-win64-setup-unsigned.exe
ebde8fdf5d86e7016201050ed7ea91edc8bafe0f06ced064275b177546c9fd9b  guix-build-c2846331ff66/output/x86_64-w64-mingw32/bitcoin-c2846331ff66-win64.zip

@DrahtBot DrahtBot mentioned this pull request Nov 17, 2021
@DrahtBot
Copy link
Contributor

DrahtBot commented Nov 17, 2021

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

No conflicts as of last run.

@hebasto
Copy link
Member Author

hebasto commented Nov 21, 2021

Update c284633 -> 985d85e (pr22151.02 -> pr22151.03):

  • rebased
  • diff is limited to src/Makefile.qt.include, i.e., make -C src translate is not applied within this PR now
  • a comment added

@laanwj
Copy link
Member

laanwj commented Feb 4, 2022

ACK 985d85e

@laanwj laanwj merged commit a5edd19 into bitcoin:master Feb 4, 2022
@hebasto hebasto deleted the 210604-xliff branch February 4, 2022 14:26
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Feb 6, 2022
laanwj added a commit to bitcoin-core/gui that referenced this pull request Feb 22, 2022
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
@bitcoin bitcoin locked and limited conversation to collaborators Feb 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants