build: Follow Transifex docs to prepare XLIFF source #22151

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:210604-xliff changing 1 files +5 −1
  1. hebasto commented at 4:18 pm on June 4, 2021: member

    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.

  2. DrahtBot added the label Build system on Jun 4, 2021
  3. DrahtBot added the label GUI on Jun 4, 2021
  4. jarolrod commented at 6:11 pm on June 6, 2021: member

    ACK ee3322d87fd6527b5f0c240965eef531d1d15bff

    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:

    0-  <file original="../askpassphrasedialog.cpp" datatype="cpp" source-language="en" target-language="en"><body>
    1+  <file original="../askpassphrasedialog.cpp" datatype="cpp" source-language="en"><body>
    2...
    3
    4-  <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 (508263ff75bbc70b1d3e2edf30663c7b80596a2d)
      • Applies the changes to make file to prepare the XLIFF source file according to the Transifex docs
    2. qt: translations update (ce6d62b9ce0f52bab0628b4b736b34bdbc57fd1f)
      • Actually apply the translation update
  5. in src/Makefile.qt.include:369 in ee3322d87f outdated
    359@@ -360,7 +360,9 @@ translate: $(srcdir)/qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCO
    360 	@test -n $(LUPDATE) || echo "lupdate is required for updating translations"
    361 	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LUPDATE) -no-obsolete -I $(srcdir) -locations relative $^ -ts $(srcdir)/qt/locale/bitcoin_en.ts
    362 	@test -n $(LCONVERT) || echo "lconvert is required for updating translations"
    363-	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LCONVERT) -o $(srcdir)/qt/locale/bitcoin_en.xlf -i $(srcdir)/qt/locale/bitcoin_en.ts
    364+	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LCONVERT) -drop-translations -o $(srcdir)/qt/locale/bitcoin_en.xlf -i $(srcdir)/qt/locale/bitcoin_en.ts
    365+	@$(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
    


    laanwj commented at 7:37 am on June 7, 2021:
    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?
  6. laanwj commented at 1:08 pm on June 7, 2021: member
    What will the effect of these changes to the xlf to translators? Do all the messages go back to untranslated or unreviewed?
  7. hebasto commented at 1:14 pm on June 7, 2021: member

    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”
  8. laanwj commented at 1:46 pm on June 7, 2021: member
    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?
  9. hebasto commented at 1:50 pm on June 7, 2021: member

    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.

  10. DrahtBot added the label Needs rebase on Jul 1, 2021
  11. laanwj commented at 3:06 pm on August 18, 2021: member
    I guess it could go in now. Needs rebase though.
  12. laanwj added this to the milestone 23.0 on Aug 18, 2021
  13. hebasto force-pushed on Aug 24, 2021
  14. hebasto commented at 9:54 am on August 24, 2021: member

    Rebased ee3322d87fd6527b5f0c240965eef531d1d15bff -> c2846331ff663035e3d1edd4885bf58f3e80ecb3 (pr22151.01 -> pr22151.02). @laanwj

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

    Done :tiger2:

  15. DrahtBot removed the label Needs rebase on Aug 24, 2021
  16. jarolrod commented at 10:59 pm on August 24, 2021: member

    GUIX hashes:

     0find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
     1
     260ec573b837f7f4e2f86a0147642ceafe5d0098b1719f6dc8da4dde51b70d31b  guix-build-c2846331ff66/output/aarch64-linux-gnu/SHA256SUMS.part
     376a92d76baaa6c88ac103d0b5e08615c2adf649f7c52921152e399776db559ca  guix-build-c2846331ff66/output/aarch64-linux-gnu/bitcoin-c2846331ff66-aarch64-linux-gnu-debug.tar.gz
     49562fb1ff9d07bb62355b6f23a19ce467a2940891a9a5fe6cfa07bae7a740022  guix-build-c2846331ff66/output/aarch64-linux-gnu/bitcoin-c2846331ff66-aarch64-linux-gnu.tar.gz
     5094a5d9caac372532d69da3e7aad93d9aba7740acb7eb4124344ca7cfd34491c  guix-build-c2846331ff66/output/arm-linux-gnueabihf/SHA256SUMS.part
     6df1653c9a1527bf935757baad8bec2fc5a068ba136addf9ca25e4d6a3fd06e42  guix-build-c2846331ff66/output/arm-linux-gnueabihf/bitcoin-c2846331ff66-arm-linux-gnueabihf-debug.tar.gz
     70a604e1545eaf8a1cee1eb035bcd5616d6cc5142700d79f6c5f8d2cddcd82d91  guix-build-c2846331ff66/output/arm-linux-gnueabihf/bitcoin-c2846331ff66-arm-linux-gnueabihf.tar.gz
     81c60f5fc53ad5d6a5e39745da4db814495a361a6767c01f6e041fc8fdde0b44d  guix-build-c2846331ff66/output/dist-archive/bitcoin-c2846331ff66.tar.gz
     93cbaeec9984f78d4167b22063f26264fe99aaac00cc7c0a461b59444b2d87bf6  guix-build-c2846331ff66/output/powerpc64-linux-gnu/SHA256SUMS.part
    103f367dd25416da342a908957547ac7f44c10aa81286d763fd315b68d143a943d  guix-build-c2846331ff66/output/powerpc64-linux-gnu/bitcoin-c2846331ff66-powerpc64-linux-gnu-debug.tar.gz
    11af58382ba5d2b52c97873ae67cf295c124211d8d4ac80b2a876c317bc438ac2a  guix-build-c2846331ff66/output/powerpc64-linux-gnu/bitcoin-c2846331ff66-powerpc64-linux-gnu.tar.gz
    12c2f9deb91b22ae92e9afaff8428d65bc0cc04818afc6d02b3ac963666fc8ee3c  guix-build-c2846331ff66/output/powerpc64le-linux-gnu/SHA256SUMS.part
    13132f48cb63d633141b58f28688cd1dd90d83d2266134a17ea51481b22bf6cd1c  guix-build-c2846331ff66/output/powerpc64le-linux-gnu/bitcoin-c2846331ff66-powerpc64le-linux-gnu-debug.tar.gz
    144fa9f70045217e26b09884f0e66a9cac0f1cfa96b1e677224840e3201ab7a973  guix-build-c2846331ff66/output/powerpc64le-linux-gnu/bitcoin-c2846331ff66-powerpc64le-linux-gnu.tar.gz
    15437a2c25ad833a8c12f963c6e46388cb396d23a009ca736ef48f2445abf4e94b  guix-build-c2846331ff66/output/riscv64-linux-gnu/SHA256SUMS.part
    167aeafbc1ef0591891ad32fbd3c609059c45aaa67aa21203f83559f090338425a  guix-build-c2846331ff66/output/riscv64-linux-gnu/bitcoin-c2846331ff66-riscv64-linux-gnu-debug.tar.gz
    1701dc893c72260a2a5bf47d2e839026fe0a28b3edd6bf5c347cbb035ab1c20fe5  guix-build-c2846331ff66/output/riscv64-linux-gnu/bitcoin-c2846331ff66-riscv64-linux-gnu.tar.gz
    182ee78aa08218b55a1155879557b1008dc086f278c3c76dfac23765c69169378b  guix-build-c2846331ff66/output/x86_64-apple-darwin18/SHA256SUMS.part
    194999c644266d343388a6fcf5093145659587cfb2fe168457af95861d96ad28d8  guix-build-c2846331ff66/output/x86_64-apple-darwin18/bitcoin-c2846331ff66-osx-unsigned.dmg
    204b61dc119966212327ffedcefe704a8f27269b6b8e6731e340479e4d99a6bbc6  guix-build-c2846331ff66/output/x86_64-apple-darwin18/bitcoin-c2846331ff66-osx-unsigned.tar.gz
    212170c55e4e6cb9d37f382ea7c23a8066d66ae95e7642595cf985aa2b8313184a  guix-build-c2846331ff66/output/x86_64-apple-darwin18/bitcoin-c2846331ff66-osx64.tar.gz
    2219943256e81ea24c4700974c0be9ba33f7841135c9b840881e1e6c39cb19edd5  guix-build-c2846331ff66/output/x86_64-linux-gnu/SHA256SUMS.part
    235dca32234ec68b2155c292bae66e1a6d074740d76cb7879ac8578aeaeccdcd59  guix-build-c2846331ff66/output/x86_64-linux-gnu/bitcoin-c2846331ff66-x86_64-linux-gnu-debug.tar.gz
    2449deaddcc733d755c36e55f372a9efd496fd1683115ea2307599d24745f6ff39  guix-build-c2846331ff66/output/x86_64-linux-gnu/bitcoin-c2846331ff66-x86_64-linux-gnu.tar.gz
    25ad7a6cef85414ddf3fa3afbd345df582b81dd87337ff2abd7c71681be0c9170b  guix-build-c2846331ff66/output/x86_64-w64-mingw32/SHA256SUMS.part
    26acf75d9c9e4b60981cf50b90787e67b51768569618bc3b92b01dce6c5031df1c  guix-build-c2846331ff66/output/x86_64-w64-mingw32/bitcoin-c2846331ff66-win-unsigned.tar.gz
    27fc17ed0b813c8d3f6deb0b7e0778868e113986547371174a331661f56b042e36  guix-build-c2846331ff66/output/x86_64-w64-mingw32/bitcoin-c2846331ff66-win64-debug.zip
    2876e42cb7c5e27808e6e42e40966bcff6e46b67ddddecd8ddaf7d8b9da0af6ebe  guix-build-c2846331ff66/output/x86_64-w64-mingw32/bitcoin-c2846331ff66-win64-setup-unsigned.exe
    29ebde8fdf5d86e7016201050ed7ea91edc8bafe0f06ced064275b177546c9fd9b  guix-build-c2846331ff66/output/x86_64-w64-mingw32/bitcoin-c2846331ff66-win64.zip
    
  17. DrahtBot commented at 1:56 pm on November 17, 2021: member

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

    Conflicts

    No conflicts as of last run.

  18. Follow Transifex docs to prepare XLIFF source 985d85e9a8
  19. hebasto force-pushed on Nov 21, 2021
  20. hebasto commented at 7:41 pm on November 21, 2021: member

    Update c2846331ff663035e3d1edd4885bf58f3e80ecb3 -> 985d85e9a8d3dd6e52fef27f76b49c5aa4b34f30 (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
  21. laanwj commented at 12:43 pm on February 4, 2022: member
    ACK 985d85e9a8d3dd6e52fef27f76b49c5aa4b34f30
  22. laanwj merged this on Feb 4, 2022
  23. laanwj closed this on Feb 4, 2022

  24. hebasto deleted the branch on Feb 4, 2022
  25. sidhujag referenced this in commit 6f083751bc on Feb 6, 2022
  26. laanwj referenced this in commit c44e734dca on Feb 22, 2022
  27. DrahtBot locked this on Feb 4, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-09-28 22:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me