Bitcoin-Qt: translation fixes in sendcoins #2991

pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:translation_fixes changing 4 files +61 −66
  1. Diapolo commented at 2:54 PM on September 13, 2013: none
    • remove some unneeded translatable strings from sendcoinsentry.ui file and rename some elements for better readability
    • optimize string prorcessing in SendCoinsDialog::on_sendButton_clicked()
    • make all UI labels for secure payments plain text and move the settings to sendcoinsentry.ui file
    • remove unneeded button and default button definiton from warning message boxes
    • remove fixed font-size when sending coins to an address with label and use monospace font for addresses
  2. in src/qt/sendcoinsdialog.cpp:None in 8dfec0bd4a outdated
     113 | @@ -113,7 +114,7 @@ void SendCoinsDialog::on_sendButton_clicked()
     114 |          else
     115 |          {
     116 |              QString merchant = GUIUtil::HtmlEscape(rcp.authenticatedMerchant);
     117 | -            formatted.append(tr("<b>%1</b> to %2").arg(amount, merchant));
     118 | +            formatted.append(QString("<b>%1</b> ").arg(amount) + tr("to") + QString(" %1").arg(merchant));
    


    sipa commented at 3:06 PM on September 13, 2013:

    In other languages it is not necessarily possible to break the string up like this.


    Diapolo commented at 7:15 AM on September 14, 2013:

    @sipa I can rework this, if you want?

    Edit: I'm going to rework it, found some other things that are worth to get changed also :).

  3. BitcoinPullTester commented at 11:23 AM on September 14, 2013: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/2b078e6b6a8e60122bc59f84b4774f774d8a4e39 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  4. Diapolo referenced this in commit 9a4a7d3c6a on Sep 18, 2013
  5. Diapolo commented at 1:33 PM on September 28, 2013: none

    @laanwj This should be looked at before the next translations update, so as you seem to be active today you can perhaps review it :).

  6. laanwj commented at 7:18 AM on September 29, 2013: member

    Why go that far to remove the %1's from the translation strings? Having them in the translation string gives translators more flexibility where in the translation to put the values. In some languages with other word orderings that may be useful. Breaking up the strings means that translators get to translate a lot of small nondescript fragments.

  7. in src/qt/sendcoinsdialog.cpp:None in 696f56d7fe outdated
     115 | -            formatted.append(recipientElement);
     116 |          }
     117 |          else
     118 |          {
     119 | -            QString merchant = GUIUtil::HtmlEscape(rcp.authenticatedMerchant);
     120 | -            formatted.append(tr("<b>%1</b> to %2").arg(amount, merchant));
    


    Diapolo commented at 10:08 AM on September 29, 2013:

    @laanwj I would love to keep this new code, as I really dislike HTML in translation strings and that way it's much cleaner. Anyway I'm fine with reverting the other two changes Total Amount %1 and Invalid payment address %1. Does this make you ACK this pull?


    laanwj commented at 10:37 AM on September 29, 2013:

    If you want to get rid of the HTML, I'd prefer something like

    formatted.append(tr("%1 to %2").arg("<b>"+format(amount)+"</b>", merchant));
    

    This factors out the html without getting rid of the context in the translation string.


    Diapolo commented at 10:41 AM on September 29, 2013:

    Indeed, this makes it a nice translation string without HTML ;).

    Edit: But think of it in this context we would have 2 translatable strings, to and %1 to %2, whereas this patch makes it just to. Still I like your hint for avoiding HTML, just not sure if it makes sense here...


    laanwj commented at 8:02 AM on September 30, 2013:

    Wouldn't it be possible to use tr("%1 to %2") in both cases? That'd get rid of a separate words like "to" as translation string.


    Diapolo commented at 8:55 AM on October 1, 2013:

    Even better, I'll take a look...

    Edit: formatted.append(tr("%1 to %2").arg("<b>"+format(amount)+"</b>", merchant)); causes an error, format was not declared in this scope?

  8. Diapolo commented at 10:26 AM on September 29, 2013: none

    I reverted the changes for Total Amount %1 and Invalid payment address %1.

  9. in src/qt/sendcoinsentry.cpp:None in 8ae5715034 outdated
     157 | @@ -158,13 +158,12 @@ void SendCoinsEntry::setValue(const SendCoinsRecipient &value)
     158 |      ui->addAsLabel->setText(value.label);
     159 |      ui->payAmount->setValue(value.amount);
     160 |  
     161 | -    if (!recipient.authenticatedMerchant.isEmpty())
     162 | +    if (!value.authenticatedMerchant.isEmpty())
    


    laanwj commented at 10:34 AM on September 29, 2013:

    I prefer keeping this as recipient, it's clearer than the overly generic 'value'


    Diapolo commented at 10:37 AM on September 29, 2013:

    Will revert...

  10. Diapolo commented at 1:35 PM on October 1, 2013: none

    Updated, so we now have a tr("%1 to %2") instead of different translatable strings for sendcoins.

  11. Bitcoin-Qt: translation fixes in sendcoins
    - remove some unneeded translatable strings from sendcoinsentry.ui file and
      rename some elements for better readability
    - optimize string prorcessing in SendCoinsDialog::on_sendButton_clicked()
    - make all UI labels for secure payments plain text and move the settings
      to sendcoinsentry.ui file
    - remove unneeded button and default button definiton from warning message
      boxes
    - remove fixed font-size when sending coins to an address with label and
      use monospace font for addresses
    23b48d13f1
  12. Diapolo commented at 1:51 PM on October 1, 2013: none

    Updated to use monospace for addresses and remove the fixed font-size.

  13. laanwj referenced this in commit b63ae2a534 on Oct 1, 2013
  14. laanwj merged this on Oct 1, 2013
  15. laanwj closed this on Oct 1, 2013

  16. Bushstar referenced this in commit fb6f0e04df on Apr 8, 2020
  17. DrahtBot locked this on Sep 8, 2021

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: 2026-04-21 18:16 UTC

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