build: Use XLIFF file to provide more context to Transifex translators #21694

pull hebasto wants to merge 4 commits into bitcoin:master from hebasto:210415-xliff changing 8 files +6355 −318
  1. hebasto commented at 12:28 pm on April 15, 2021: member

    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

  2. fanquake added the label Build system on Apr 15, 2021
  3. hebasto commented at 12:29 pm on April 15, 2021: member
    Hoping on “22.0” milestone assigned to this PR :)
  4. in .gitignore:60 in d7f7d90801 outdated
    55@@ -56,6 +56,8 @@ src/qt/bitcoin-qt.creator
    56 src/qt/bitcoin-qt.creator.user
    57 src/qt/bitcoin-qt.files
    58 src/qt/bitcoin-qt.includes
    59+# An intermediate XLIFF translation file.
    60+src/qt/locale/bitcoin_es.xlf
    


    laanwj commented at 12:49 pm on April 15, 2021:
    s/es/en/ ?

    hebasto commented at 12:56 pm on April 15, 2021:
    Thanks! Fixed :facepalm:
  5. laanwj added this to the milestone 22.0 on Apr 15, 2021
  6. hebasto force-pushed on Apr 15, 2021
  7. DrahtBot commented at 7:30 pm on April 15, 2021: contributor

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #21420 (build, qt: No longer need to patch translation.pro by hebasto)

    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.

  8. hebasto force-pushed on Apr 16, 2021
  9. hebasto commented at 8:32 am on April 17, 2021: member
    CI is green now :)
  10. MarcoFalke added the label Needs gitian build on Apr 17, 2021
  11. MarcoFalke added the label Needs Guix build on Apr 17, 2021
  12. DrahtBot commented at 10:43 pm on April 18, 2021: contributor

    Gitian builds

    File commit 0dd7b234895b02bfc512ae83bd77b581c861d6e9(master) commit b26162556fe6acf79bf635ec147c8207a4861d0d(master and this pull)
    *-aarch64-linux-gnu-debug.tar.gz ab2c23caf86b0a85... b08da43780b99555...
    *-aarch64-linux-gnu.tar.gz 5cebfcc46be023c4... c2c318bcec80ce0f...
    *-arm-linux-gnueabihf-debug.tar.gz 90b0b16aca876b32... 49cf4422bf117438...
    *-arm-linux-gnueabihf.tar.gz c750e63cb56b0b30... 84c797c443a77dd9...
    *-osx-unsigned.dmg 02781d5d06b770f5... 3f7675b5da92332b...
    *-osx64.tar.gz 4c14b91de03fcaf0... 61034d964cbe792b...
    *-powerpc64-linux-gnu-debug.tar.gz 3563031ad26a97e4... eee76db985211b3e...
    *-powerpc64-linux-gnu.tar.gz dce70d000932486f... caf60d166e480915...
    *-powerpc64le-linux-gnu-debug.tar.gz b03d67f0294c1482... 6e7f3702a421abef...
    *-powerpc64le-linux-gnu.tar.gz 5d2d82da598bb2bf... 6652af1c943f71fa...
    *-riscv64-linux-gnu-debug.tar.gz c6d9818eb544f339... 6035078613b86297...
    *-riscv64-linux-gnu.tar.gz 0c73d8281fe6c534... 64b71b7162c9984f...
    *-win64-debug.zip 124c7f0b29775e81... 790abaa4656f5fe1...
    *-win64-setup-unsigned.exe 1d3ac5fa8b7ec7e3... 17e21d7671569bf7...
    *-win64.zip 1543663462236fae... de84b0dfdad83874...
    *-x86_64-linux-gnu-debug.tar.gz 4374826a7b13fc85... 5a735298af630f37...
    *-x86_64-linux-gnu.tar.gz 3abc445e53056b3a... 7dd5b5d6b870c6d9...
    *.tar.gz 30f6495725fc36fd... 4dfa41af16ef4b29...
    bitcoin-core-linux-22-res.yml 5face52e7d5d59ea... 88aef4e09a1bf4f1...
    bitcoin-core-osx-22-res.yml 1fdb209e797b9a0d... f9bc96c8f199a237...
    bitcoin-core-win-22-res.yml f67f2e971d911c9a... 3ff23c3ac45fa717...
    linux-build.log dcd229b621775505... 86f606eb55a769e7...
    osx-build.log 7574d2f4e5054181... 1506a6704ab04d91...
    win-build.log 00f2ffeb88433a49... 9a240638a66e679d...
    bitcoin-core-linux-22-res.yml.diff eeb3fc3f007b475b...
    bitcoin-core-osx-22-res.yml.diff 11e25cd3c2b0640c...
    bitcoin-core-win-22-res.yml.diff 685344d175a3203b...
    linux-build.log.diff 2ac2e70fd3b7e974...
    osx-build.log.diff 02916cfc86be2925...
    win-build.log.diff 7dfc3d3072dd5ec3...
  13. DrahtBot removed the label Needs gitian build on Apr 18, 2021
  14. hebasto commented at 7:43 am on April 19, 2021: member

    Guix builds:

     0$ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
     14aacdb5fc0138a0587939be1f9c47bbd90e8d5f58d26ff632b3d3e0eab56a323  guix-build-347a45d40c0d/output/aarch64-linux-gnu/bitcoin-347a45d40c0d-aarch64-linux-gnu-debug.tar.gz
     232ba44b565442555f61bbcadef67f9321ad62937be802459aed1e89ada0b54eb  guix-build-347a45d40c0d/output/aarch64-linux-gnu/bitcoin-347a45d40c0d-aarch64-linux-gnu.tar.gz
     3874df98fa3e5cfc1b9be6b1838c7bb35496652e7d000d65fa313a92fca459174  guix-build-347a45d40c0d/output/arm-linux-gnueabihf/bitcoin-347a45d40c0d-arm-linux-gnueabihf-debug.tar.gz
     42958150120f71dfe7f8f342e5d5fda8adb50467f01e22b0587f7b16a91de125c  guix-build-347a45d40c0d/output/arm-linux-gnueabihf/bitcoin-347a45d40c0d-arm-linux-gnueabihf.tar.gz
     587646c550c3b32df071464f608c86b468edb2b227321147fc1085c9dda17f518  guix-build-347a45d40c0d/output/dist-archive/bitcoin-347a45d40c0d.tar.gz
     604da2a653141d61501b19596f96240abee2f89367e730cc3bcf201bb61975cff  guix-build-347a45d40c0d/output/powerpc64-linux-gnu/bitcoin-347a45d40c0d-powerpc64-linux-gnu-debug.tar.gz
     7c8948317ee27408c7e7817c075b0559419990f1ecc06d8c88829cfd67034c048  guix-build-347a45d40c0d/output/powerpc64-linux-gnu/bitcoin-347a45d40c0d-powerpc64-linux-gnu.tar.gz
     8f0e4a519299e72a7d2feee069a709d5dda4dbbb669ea84b131a1d2b479963d30  guix-build-347a45d40c0d/output/powerpc64le-linux-gnu/bitcoin-347a45d40c0d-powerpc64le-linux-gnu-debug.tar.gz
     9f9db97a01e7b153882b5ca8b89ae51862424414c7645f1f1413b1f9d6fa0fcad  guix-build-347a45d40c0d/output/powerpc64le-linux-gnu/bitcoin-347a45d40c0d-powerpc64le-linux-gnu.tar.gz
    10a7c99c2045c5a12277a49c1aa08a5fd8f55252f2db9661d364c1b41e0afd8c12  guix-build-347a45d40c0d/output/riscv64-linux-gnu/bitcoin-347a45d40c0d-riscv64-linux-gnu-debug.tar.gz
    1125d35e70ceeccd5ae3a1d1ab389b27192e6ebe217d5960f2e9a622787a5bf762  guix-build-347a45d40c0d/output/riscv64-linux-gnu/bitcoin-347a45d40c0d-riscv64-linux-gnu.tar.gz
    125b2483d05f4fd393cf6ed5882001fc420dcf1add27200c171059dd2bb8ec2a27  guix-build-347a45d40c0d/output/x86_64-apple-darwin18/bitcoin-347a45d40c0d-osx-unsigned.dmg
    13534c838a6112ac87f9288aea585cf05f5a5450b58de74a4ad9388a14a4b56019  guix-build-347a45d40c0d/output/x86_64-apple-darwin18/bitcoin-347a45d40c0d-osx-unsigned.tar.gz
    142506ffbc585f637d3b0587f9cee737e15df83bdaaca1d8f2373dcf21f55179cc  guix-build-347a45d40c0d/output/x86_64-apple-darwin18/bitcoin-347a45d40c0d-osx64.tar.gz
    155d773c27ae724623a9a14538bddc23acbec9df49bef61306c943ba4c561fc70e  guix-build-347a45d40c0d/output/x86_64-linux-gnu/bitcoin-347a45d40c0d-x86_64-linux-gnu-debug.tar.gz
    16bc83d9f50b2d6d7c9dfc190cf62b22e1e6b152718edb2392e4f03b64e2fd01ac  guix-build-347a45d40c0d/output/x86_64-linux-gnu/bitcoin-347a45d40c0d-x86_64-linux-gnu.tar.gz
    175048bc3cedb9454967213a7d9298672f0fc35ebe2097cbd21312d533542b8f9c  guix-build-347a45d40c0d/output/x86_64-w64-mingw32/bitcoin-347a45d40c0d-win-unsigned.tar.gz
    18414ce9df468cc0668e63f8ef6e2277f93481bb068423bb0ba073b713d455aa67  guix-build-347a45d40c0d/output/x86_64-w64-mingw32/bitcoin-347a45d40c0d-win64-debug.zip
    19bc364ddd8445d01fcc98759c8233a6243c0216505e68260d4316ce3d8be346e7  guix-build-347a45d40c0d/output/x86_64-w64-mingw32/bitcoin-347a45d40c0d-win64-setup-unsigned.exe
    2025b1f4390d2d937e38f1b44f6238202ddb6403b5e80c2474eef2f7eef94f83db  guix-build-347a45d40c0d/output/x86_64-w64-mingw32/bitcoin-347a45d40c0d-win64.zip
    

    Gitian builds:

    • Linux
     0Generating report
     17f6b9251d2a7f0991c91eb96b21466b9798ab6f715871c485f239ea2abff186e  bitcoin-347a45d40c0d-aarch64-linux-gnu-debug.tar.gz
     2513a2b47811a0f896700fca152b139eba3c7da9c36993609d64ecbe3ecf4cba7  bitcoin-347a45d40c0d-aarch64-linux-gnu.tar.gz
     314ff66645b7bce2675dbba932b67003a80891c14078820bdee2293ede8ce7ef0  bitcoin-347a45d40c0d-arm-linux-gnueabihf-debug.tar.gz
     43fcd16876a712c291639d096f5e2b6dea908955754177d2a3680b1067ac1047f  bitcoin-347a45d40c0d-arm-linux-gnueabihf.tar.gz
     5398dab46c26041c77ff7e767bd0fb3f3f2f059b74995ce5f063b1297af20327d  bitcoin-347a45d40c0d-powerpc64-linux-gnu-debug.tar.gz
     6c041f14cfaf63ffd4fe753ad323eb1efd64e7fc4fc9ba7a2a208407380bb0d6e  bitcoin-347a45d40c0d-powerpc64-linux-gnu.tar.gz
     7dc270956eba3c52b481a6a8cae9fd3250d3b460ae648938e3f32ac53c532da0c  bitcoin-347a45d40c0d-powerpc64le-linux-gnu-debug.tar.gz
     8889142ea3376f5429996771ed1de5a9ac4eba5f595f976ab877841903439a751  bitcoin-347a45d40c0d-powerpc64le-linux-gnu.tar.gz
     993cf2e3fd95064cced38db94dc388d50e1a5cd603e70a4a97bb71f3155282a1b  bitcoin-347a45d40c0d-riscv64-linux-gnu-debug.tar.gz
    1020413deb68c29eec0f8e07e117dde4a973986ee43025125b498518f718ad09a0  bitcoin-347a45d40c0d-riscv64-linux-gnu.tar.gz
    113e01f68cfb4c12008b54eee253ce022df28d844d347a3f7382bb2509e09cd092  bitcoin-347a45d40c0d-x86_64-linux-gnu-debug.tar.gz
    120ac8dc6d92a46d70de9a6f295075b1fa5c2ee6da7631238049e7a00d10fd6857  bitcoin-347a45d40c0d-x86_64-linux-gnu.tar.gz
    1387646c550c3b32df071464f608c86b468edb2b227321147fc1085c9dda17f518  src/bitcoin-347a45d40c0d.tar.gz
    14e4da41bd5eed8c447cd53a64f0c516d53e8aa7551a7df6c1c8ed3fef53c4f6ad  bitcoin-core-linux-22-res.yml
    15Done.
    
    • Windows
    0Generating report
    17c9ffd0c4afd4fc93a265ab77c8df6793c7e3a9d63d2ff106ce106131fed6784  bitcoin-347a45d40c0d-win-unsigned.tar.gz
    2298991c5a0b7be19a00d61e8382c90b710de3fc100f06f880c3c7781ecb1ad15  bitcoin-347a45d40c0d-win64-debug.zip
    3016aabe2d3d78a1e791f8b6d24c9592aa44b52b5a1934d5aaa8d19a81ebde1b5  bitcoin-347a45d40c0d-win64-setup-unsigned.exe
    4b29b0ca9e31bd0066eff36bb920d0699e62a97134af838002ffc7de5dc57199a  bitcoin-347a45d40c0d-win64.zip
    587646c550c3b32df071464f608c86b468edb2b227321147fc1085c9dda17f518  src/bitcoin-347a45d40c0d.tar.gz
    6420519f953cf33ad2a6eb64f57284bc3bafc4c4d2d5898206e86890e969341a1  bitcoin-core-win-22-res.yml
    7Done.
    
    • macOS
    0Generating report
    1f05f7feaef1ee495de27ba80d673ca63d91b812f617436c759102c46e9b42be9  bitcoin-347a45d40c0d-osx-unsigned.dmg
    2f3c966da3ab7516f736bc5471bcf20ee9530fb8d37b3ab05e86b4a93597e88cb  bitcoin-347a45d40c0d-osx-unsigned.tar.gz
    3ce3ad3701fe2fbc54f31e5b095f9fe6a1e038c3d84467c4a4d0e7252ef067c76  bitcoin-347a45d40c0d-osx64.tar.gz
    487646c550c3b32df071464f608c86b468edb2b227321147fc1085c9dda17f518  src/bitcoin-347a45d40c0d.tar.gz
    52809ec177a540dcd4531ad81ce45b3ed2b4d39ff37f901646f0a411a5dbd1de5  bitcoin-core-osx-22-res.yml
    6Done.
    
  15. ysangkok commented at 8:12 pm on April 19, 2021: none
    I verified that make -C src translate produces an XML file with an extracomment with the error message in the comment. I verified that build-unix.md suggests the package that includes lrelease. And I verified that the configure script errors if --with-gui is specified and qttools5-dev-tools is not installed on Ubuntu 20.04.2 LTS
  16. in .gitignore:60 in 347a45d40c outdated
    55@@ -56,6 +56,8 @@ src/qt/bitcoin-qt.creator
    56 src/qt/bitcoin-qt.creator.user
    57 src/qt/bitcoin-qt.files
    58 src/qt/bitcoin-qt.includes
    59+# An intermediate XLIFF translation file.
    60+src/qt/locale/bitcoin_en.xlf
    


    laanwj commented at 9:07 am on April 20, 2021:
    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.

    hebasto commented at 12:57 pm on April 20, 2021:
    Thanks! Updated.
  17. build: Use XLIFF file to provide more context to Transifex translators
    Details: https://docs.transifex.com/formats/xliff
    2045e4cdd2
  18. build: Add Qt lconvert tool to depends f959b75e8c
  19. qt [experimental]: Add a translation comment and a disambiguation string
    The goal is to see the way the Transifex presents the added items to
    translators using an intermediate XLIFF translation file.
    99686b6519
  20. Add bitcoin_en.xlf intermediate translation file to the repo
    As the bitcoin_en.xlf file is created by the `make -C src translate`
    command, other translation-related files are also updated.
    35d52397e7
  21. hebasto force-pushed on Apr 20, 2021
  22. hebasto commented at 1:04 pm on April 20, 2021: member

    Updated 347a45d40c0dcad2a2286495e661cfffa7af329b -> 35d52397e72f3ab96a7797148666b501d50b445d (pr21694.04 -> pr21694.05, diff):

    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.

  23. hebasto commented at 1:17 pm on April 20, 2021: member
    The pr description is updated with an example of a translatable string presentation in the bitcoin_en.xlf file.
  24. laanwj commented at 1:36 pm on April 20, 2021: member
    ACK 35d52397e72f3ab96a7797148666b501d50b445d Checked that the same src/qt/locale/bitcoin_en.xlf is generated locally.
  25. laanwj merged this on Apr 20, 2021
  26. laanwj closed this on Apr 20, 2021

  27. hebasto deleted the branch on Apr 20, 2021
  28. sidhujag referenced this in commit 4b2403200a on Apr 20, 2021
  29. hebasto commented at 7:44 pm on April 21, 2021: member
    The actual results are presented in https://github.com/bitcoin-core/gui/issues/287.
  30. MarcoFalke removed the label Needs Guix build on May 5, 2021
  31. hebasto referenced this in commit b789914f17 on May 27, 2021
  32. sidhujag referenced this in commit 3714308fff on May 27, 2021
  33. laanwj referenced this in commit a5edd191be on Feb 4, 2022
  34. kwvg referenced this in commit 2a0f183820 on Feb 17, 2022
  35. kwvg referenced this in commit 8b00eeb412 on Feb 18, 2022
  36. kwvg referenced this in commit 7e07ad6aef on Apr 25, 2022
  37. kwvg referenced this in commit 83706eccf3 on Apr 25, 2022
  38. kwvg referenced this in commit a0d5de028d on Apr 26, 2022
  39. kwvg referenced this in commit 65f779489d on Apr 26, 2022
  40. kwvg referenced this in commit 98f3700a49 on Jun 10, 2022
  41. kwvg referenced this in commit 2028fc9a25 on Jun 11, 2022
  42. kwvg referenced this in commit 26fa69bdfd on Jun 11, 2022
  43. PastaPastaPasta referenced this in commit 6c0a63360f on Jul 13, 2022
  44. bitcoin locked this on Aug 16, 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-11-17 09:12 UTC

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