Make RPC console welcome message translation-friendly #331

pull hebasto wants to merge 1 commits into bitcoin-core:master from hebasto:210515-welcome changing 1 files +23 −17
  1. hebasto commented at 12:06 pm on May 15, 2021: member
    The best practice is do not split a translatable multi-line message into single lines. This helps translators to follow the context.
  2. hebasto added the label Translations on May 15, 2021
  3. in src/qt/rpcconsole.cpp:815 in b00aaf6134 outdated
    824+        /*: RPC console welcome message.
    825+            Placeholders %5 and %6 are style tags for the warning content. */
    826+        tr("Welcome to the %1 RPC console.\n"
    827+           "Use up and down arrows to navigate history, and %2 to clear screen.\n"
    828+           "Type %3 for an overview of available commands.\n"
    829+           "For more information on using this console type %4.\n"
    


    jarolrod commented at 2:39 pm on May 15, 2021:
    0           "For more information on using this console, type %4.\n"
    

    While here, we could improve the grammar by adding in a comma


    hebasto commented at 3:06 pm on May 15, 2021:
    Thanks! Updated.
  4. in src/qt/rpcconsole.cpp:820 in b00aaf6134 outdated
    819-                        "<br><span class=\"secwarning\"><br>" +
    820-                        tr("WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramifications of a command.") +
    821-                        "</span>"),
    822-                        true);
    823+    static const QString welcome_message =
    824+        /*: RPC console welcome message.
    


    jarolrod commented at 2:44 pm on May 15, 2021:

    Any reason to make this multi-line? Could just be:

    0//: RPC console welcome message. Placeholders %5 and %6 are style tags for the warning content
    

    jarolrod commented at 6:48 pm on May 15, 2021:
    Now that this message is longer, it’s appropriate that it is multiline
  5. in src/qt/rpcconsole.cpp:811 in b00aaf6134 outdated
    820-                        tr("WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramifications of a command.") +
    821-                        "</span>"),
    822-                        true);
    823+    static const QString welcome_message =
    824+        /*: RPC console welcome message.
    825+            Placeholders %5 and %6 are style tags for the warning content. */
    


    jarolrod commented at 2:47 pm on May 15, 2021:
    Maybe we should expand upon this. args %1,%2,%3,%4 are written space-separated. This sets the precedent that these arguments are either followed or preceded with space. We should make it explicitly clear that %5 and %6 are not space separated from the rest of the text in this translator comment.

    hebasto commented at 3:06 pm on May 15, 2021:
    Thanks! Updated.
  6. jarolrod commented at 2:47 pm on May 15, 2021: member
    Concept ACK
  7. hebasto force-pushed on May 15, 2021
  8. hebasto commented at 3:03 pm on May 15, 2021: member

    Updated b00aaf6134daefd16a1ff5804a8cb45f6f223392 -> a596381c7244157d15063a1c590a993045ab5179 (pr331.01 -> pr331.02, diff):

  9. jarolrod commented at 8:36 pm on May 15, 2021: member
    ACK a596381c7244157d15063a1c590a993045ab5179
  10. hebasto force-pushed on May 19, 2021
  11. hebasto commented at 7:28 pm on May 19, 2021: member

    Updated a596381c7244157d15063a1c590a993045ab5179 -> 67bef11e57f12ceacd3810008914c33b37c3c5bf (pr331.02 -> pr331.03, diff):


    Seeing no reason to use QString optimization tricks as the welcome_message is static now.

  12. jarolrod commented at 7:10 pm on May 20, 2021: member
    re-ACK 67bef11e57f12ceacd3810008914c33b37c3c5bf
  13. DrahtBot added the label Needs rebase on May 20, 2021
  14. qt: Make RPC console welcome message translation-friendly 0f3d955a38
  15. hebasto force-pushed on May 20, 2021
  16. hebasto commented at 8:49 pm on May 20, 2021: member
    Rebased 67bef11e57f12ceacd3810008914c33b37c3c5bf -> 0f3d955a38fe59a4e8cc4bf9f4442e6e1fd8bcbb (pr331.03 -> pr331.04) due to the conflict with #281.
  17. DrahtBot removed the label Needs rebase on May 20, 2021
  18. jarolrod commented at 8:30 pm on May 21, 2021: member

    re-ACK 0f3d955a38fe59a4e8cc4bf9f4442e6e1fd8bcbb

    Screenshots to show that there is no change in the presentation of the welcome message (% new comma for grammar):

    Master PR (0f3d955)
  19. hebasto commented at 12:10 pm on May 29, 2021: member
    @goums @Talkless Do you mind reviewing this PR?
  20. hebasto requested review from jonatack on May 29, 2021
  21. hebasto merged this on May 31, 2021
  22. hebasto closed this on May 31, 2021

  23. hebasto deleted the branch on May 31, 2021
  24. sidhujag referenced this in commit df929d8c85 on Jun 1, 2021
  25. gwillen referenced this in commit 7f5524363f on Jun 1, 2022
  26. bitcoin-core locked this on Aug 16, 2022


hebasto jarolrod


jonatack

Labels
Translations


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-12-03 17:20 UTC

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