Do not translate file extensions #220

pull hebasto wants to merge 1 commits into bitcoin-core:master from hebasto:210223-fileext changing 6 files +8 −6
  1. hebasto commented at 3:30 pm on February 23, 2021: member
    File extensions are untranslatable by their nature.
  2. jarolrod commented at 6:20 pm on February 23, 2021: member

    ACK 6af0a9a9e59b17e6b8491bc9715b67b5310e599e

    Nice catch, this will help prevent any unintended translations

  3. jonatack commented at 7:44 pm on February 23, 2021: contributor

    Tested ACK 6af0a9a9e59b17e6b8491bc9715b67b5310e599e

    Two questions: (a) does this change require translators to update every language? (b) Testing this patch, I don’t see the file extensions in the dialogs. I then built master and I don’t see the extensions there either :thinking: (checked in default and in French)

    0src/qt/locale/bitcoin_fr.ts:1574:        <source>Partially Signed Transaction (Binary) (*.psbt)</source>
    1src/qt/locale/bitcoin_fr.ts:1575:        <translation>Transaction signée partiellement (fichier binaire) (*.psbt)</translation>
    2src/qt/locale/bitcoin_fr.ts:2557:        <source>Partially Signed Transaction (Binary) (*.psbt)</source>
    3src/qt/locale/bitcoin_fr.ts:2558:        <translation>Transaction signée partiellement (fichier binaire) (*.psbt)</translation>
    4src/qt/locale/bitcoin_fr.ts:3496:        <source>Partially Signed Transaction (*.psbt)</source>
    5src/qt/locale/bitcoin_fr.ts:3497:        <translation>Transaction signée partiellement (*.psbt)</translation>
    
  4. hebasto commented at 8:04 pm on February 23, 2021: member

    (a) does this change require translators to update every language?

    Yes. I’d say that each translator updates her language :)

    (b) Testing this patch, I don’t see the file extensions in the dialogs. I then built master and I don’t see the extensions there either thinking (checked in default and in French)

    See GUIUtil::getSaveFileName implementation.

  5. in src/qt/addressbookpage.cpp:300 in 6af0a9a9e5 outdated
    297+    QString filename = GUIUtil::getSaveFileName(
    298+        this,
    299         tr("Export Address List"), QString(),
    300-        tr("Comma separated file (*.csv)"), nullptr);
    301+        // TODO: Replace QStringLiteral with QLatin1String when Qt minimum version >= 5.10.
    302+        tr("Comma separated file (%1)").arg(QStringLiteral("*.csv")), nullptr);
    


    luke-jr commented at 5:12 pm on February 24, 2021:

    IIRC the parenthesis format is also special, to trigger the dialog filtering files shown. So perhaps this should be:

    0        tr("Comma separated file", "Translated name of CSV file format") + QStringLiteral(" (*.csv)"), nullptr);
    

    hebasto commented at 8:44 pm on February 24, 2021:
    Thank you! Updated.
  6. luke-jr changes_requested
  7. hebasto force-pushed on Feb 24, 2021
  8. hebasto commented at 8:44 pm on February 24, 2021: member

    Updated 6af0a9a9e59b17e6b8491bc9715b67b5310e599e -> 5fe0ff342b76c4557450a43f27bdd99e48a3e966 (pr220.01 -> pr220.02, diff):

  9. in src/qt/psbtoperationsdialog.cpp:144 in 5fe0ff342b outdated
    140@@ -141,7 +141,7 @@ void PSBTOperationsDialog::saveTransaction() {
    141     filename_suggestion.append(".psbt");
    142     QString filename = GUIUtil::getSaveFileName(this,
    143         tr("Save Transaction Data"), filename_suggestion,
    144-        tr("Partially Signed Transaction (Binary) (*.psbt)"), &selected_filter);
    145+        tr("Partially Signed Transaction (Binary)") + QLatin1String(" (*.psbt)"), &selected_filter);
    


    luke-jr commented at 10:18 pm on February 24, 2021:
    Annotate the tr here and later too?

    luke-jr commented at 11:18 pm on February 24, 2021:
    0        tr("Partially Signed Transaction (Binary)", "Name of binary PSBT file format") + QLatin1String(" (*.psbt)"), &selected_filter);
    

    hebasto commented at 11:53 am on February 25, 2021:
    Thanks! Done.
  10. hebasto commented at 11:03 pm on February 24, 2021: member

    Could you suggest a good variant of annotation?

    On Thu, 25 Feb 2021 at 00:18 Luke Dashjr notifications@github.com wrote:

    @luke-jr commented on this pull request.

    In src/qt/psbtoperationsdialog.cpp https://github.com/bitcoin-core/gui/pull/220#discussion_r582345696:

    @@ -141,7 +141,7 @@ void PSBTOperationsDialog::saveTransaction() { filename_suggestion.append(".psbt"); QString filename = GUIUtil::getSaveFileName(this, tr(“Save Transaction Data”), filename_suggestion,

    •    tr("Partially Signed Transaction (Binary) (*.psbt)"), &selected_filter);
      
    •    tr("Partially Signed Transaction (Binary)") + QLatin1String(" (*.psbt)"), &selected_filter);
      

    Annotate the tr here and later too?

    — You are receiving this because you authored the thread.

    Reply to this email directly, view it on GitHub https://github.com/bitcoin-core/gui/pull/220#pullrequestreview-597986728, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH3PXPWTEF7VBYA6M57P7L3TAV3MDANCNFSM4YCWAUUA .

    – Hennadii Stepanov

  11. hebasto renamed this:
    qt: Do not translate file extensions
    Do not translate file extensions
    on Feb 25, 2021
  12. hebasto force-pushed on Feb 25, 2021
  13. hebasto commented at 11:53 am on February 25, 2021: member

    Updated 5fe0ff342b76c4557450a43f27bdd99e48a3e966 -> d4ed848e00cc0232cae234f0361b54bb7375fe2f (pr220.02 -> pr220.03, diff):

  14. jonatack commented at 12:01 pm on February 25, 2021: contributor

    re-ACK d4ed848e00cc0232cae234f0361b54bb7375fe2f

    (IDK if the “Wallet Data” ts string should be annotated as well or if it’s self-evident.)

  15. in src/qt/walletview.cpp:276 in d4ed848e00 outdated
    272@@ -273,7 +273,7 @@ void WalletView::backupWallet()
    273 {
    274     QString filename = GUIUtil::getSaveFileName(this,
    275         tr("Backup Wallet"), QString(),
    276-        tr("Wallet Data (*.dat)"), nullptr);
    277+        tr("Wallet Data") + QLatin1String(" (*.dat)"), nullptr);
    


    luke-jr commented at 6:07 pm on February 25, 2021:

    Also needs annotation…

    (If you were asked to translate “Wallet Data” with no context, would you know what it was referring to? XD)


    hebasto commented at 6:57 pm on March 6, 2021:
  16. Talkless commented at 6:40 pm on March 4, 2021: none
    Concept ACK. I agree to @luke-jr that one annotation is missing.
  17. qt: Do not translate file extensions 88df300f20
  18. hebasto force-pushed on Mar 6, 2021
  19. hebasto commented at 6:56 pm on March 6, 2021: member

    Updated d4ed848e00cc0232cae234f0361b54bb7375fe2f -> 88df300f20da02060694cfe643e1c882efaa306c (pr220.03 -> pr220.04, diff).

    Now each of changed translation has own disambiguation string.

  20. Talkless approved
  21. Talkless commented at 2:41 pm on March 7, 2021: none
    tACK 88df300f20da02060694cfe643e1c882efaa306c, tested on Debian Sid with Qt 5.15.2. Tested all filters except for .psbt.
  22. jarolrod commented at 6:50 pm on March 7, 2021: member

    re-ACK 88df300f20da02060694cfe643e1c882efaa306c

    when to use and how to place disambiguation strings is another thing to add to the Qt dev notes

  23. hebasto commented at 8:03 pm on March 14, 2021: member

    @luke-jr @laanwj

    Some things appear unclear to me.

    1. Does the non-default disambiguation argument, which is passed to the tr function, is visible to translators on transifex?

    2. What are other options to make designated notes to translators on transifex? Do “Translator Comments” work in such a manner?


    In the meantime, converting this pr to a draft.

  24. hebasto marked this as a draft on Mar 14, 2021
  25. laanwj commented at 11:20 am on March 16, 2021: member

    Concept and code review ACK 88df300f20da02060694cfe643e1c882efaa306c

    Does the non-default disambiguation argument, which is passed to the tr function, is visible to translators on transifex? What are other options to make designated notes to translators on transifex? Do “Translator Comments” work in such a manner?

    I think those are great questions. I do not know the answer though. Maybe @wtogami knows who can weigh in—from what i remember he knows some people at Transifex.

  26. hebasto commented at 11:31 am on March 16, 2021: member

    Even if disambiguation arguments won’t actually help translators, they won’t hurt.

    As already many ACKs are collected, reverted back from “Draft” to “Ready for review”.

  27. hebasto marked this as ready for review on Mar 16, 2021
  28. laanwj commented at 12:06 pm on March 16, 2021: member

    At least the comment makes it into the xml, that’s one part of it being picked up

    0     <message>
    1         <location line="+1"/>
    2-        <source>Comma separated file (*.csv)</source>
    3+        <source>Comma separated file</source>
    4+        <comment>Name of CSV file format</comment>
    5         <translation type="unfinished"></translation>
    6     </message>
    
  29. laanwj merged this on Mar 16, 2021
  30. laanwj closed this on Mar 16, 2021

  31. hebasto deleted the branch on Mar 16, 2021
  32. hebasto added the label Translations on Apr 25, 2021
  33. hebasto referenced this in commit b789914f17 on May 27, 2021
  34. bitcoin-core locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/gui. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-23 07:20 UTC

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