From 54e0be41e83b4ac66a609662da3c57dc669c9608 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Sat, 23 Jun 2012 13:30:58 +0200 Subject: [PATCH] format messages for localization --- lib/gui_qt.py | 26 +++++++++++++++++--------- 1 files changed, 17 insertions(+), 9 deletions(-) diff --git a/lib/gui_qt.py b/lib/gui_qt.py index a94c457..23b658c 100644 --- a/lib/gui_qt.py +++ b/lib/gui_qt.py @@ -436,7 +436,7 @@ class ElectrumWindow(QMainWindow): self.payto_e = QLineEdit() grid.addWidget(QLabel(_('Pay to')), 1, 0) grid.addWidget(self.payto_e, 1, 1, 1, 3) - grid.addWidget(HelpButton(_('Recipient of the funds.\n\nYou may enter a Bitcoin address, a label from your list of contacts (a list of completions will be proposed), or an alias (email-like address that forwards to a Bitcoin address)')), 1, 4) + grid.addWidget(HelpButton(_('Recipient of the funds.') + '\n\n' + _('You may enter a Bitcoin address, a label from your list of contacts (a list of completions will be proposed), or an alias (email-like address that forwards to a Bitcoin address)')), 1, 4) completer = QCompleter() completer.setCaseSensitivity(False) @@ -446,18 +446,23 @@ class ElectrumWindow(QMainWindow): self.message_e = QLineEdit() grid.addWidget(QLabel(_('Description')), 2, 0) grid.addWidget(self.message_e, 2, 1, 1, 3) - grid.addWidget(HelpButton(_('Description of the transaction (not mandatory).\n\nThe description is not sent to the recipient of the funds. It is stored in your wallet file, and displayed in the \'History\' tab.')), 2, 4) + grid.addWidget(HelpButton(_('Description of the transaction (not mandatory).') + '\n\n' + _('The description is not sent to the recipient of the funds. It is stored in your wallet file, and displayed in the \'History\' tab.')), 2, 4) self.amount_e = QLineEdit() grid.addWidget(QLabel(_('Amount')), 3, 0) grid.addWidget(self.amount_e, 3, 1, 1, 2) - grid.addWidget(HelpButton(_('Amount to be sent.\n\nThe amount will be displayed in red if you do not have enough funds in your wallet. Note that if you have frozen some of your addresses, the available funds will be lower than your total balance.')), 3, 3) + grid.addWidget(HelpButton( + _('Amount to be sent.') + '\n\n' \ + + _('The amount will be displayed in red if you do not have enough funds in your wallet. Note that if you have frozen some of your addresses, the available funds will be lower than your total balance.')), 3, 3) self.fee_e = QLineEdit() grid.addWidget(QLabel(_('Fee')), 4, 0) grid.addWidget(self.fee_e, 4, 1, 1, 2) - grid.addWidget(HelpButton(_('Bitcoin transactions are in general not free. A transaction fee is paid by the sender of the funds.\n\nThe amount of fee can be decided freely by the sender. However, transactions with low fees take more time to be processed.\n\nA suggested fee is automatically added to this field. You may override it. The suggested fee increases with the size of the transaction.')), 4, 3) - + grid.addWidget(HelpButton( + _('Bitcoin transactions are in general not free. A transaction fee is paid by the sender of the funds.') + '\n\n'\ + + _('The amount of fee can be decided freely by the sender. However, transactions with low fees take more time to be processed.') + '\n\n'\ + + _('A suggested fee is automatically added to this field. You may override it. The suggested fee increases with the size of the transaction.')), 4, 3) + b = EnterButton(_("Send"), self.do_send) grid.addWidget(b, 6, 1) @@ -1177,13 +1182,16 @@ class ElectrumWindow(QMainWindow): fee_e.setText("%s"% str( Decimal( self.wallet.fee)/100000000 ) ) grid.addWidget(QLabel(_('Transaction fee')), 2, 0) grid.addWidget(fee_e, 2, 1) - grid.addWidget(HelpButton(_('Fee per transaction input. Transactions involving multiple inputs tend to require a higher fee. Recommended value: 0.001')), 2, 2) + msg = _('Fee per transaction input. Transactions involving multiple inputs tend to require a higher fee.') + ' ' \ + + _('Recommended value') + ': 0.001' + grid.addWidget(HelpButton(msg, 2, 2)) fee_e.textChanged.connect(lambda: numbify(fee_e,False)) nz_e = QLineEdit() nz_e.setText("%d"% self.wallet.num_zeros) grid.addWidget(QLabel(_('Display zeros')), 3, 0) - grid.addWidget(HelpButton(_('Number of zeros displayed after the decimal point. For example, if this is set to 2, "1." will be displayed as "1.00"')), 3, 2) + msg = _('Number of zeros displayed after the decimal point. For example, if this is set to 2, "1." will be displayed as "1.00"') + grid.addWidget(HelpButton(msg), 3, 2) grid.addWidget(nz_e, 3, 1) nz_e.textChanged.connect(lambda: numbify(nz_e,True)) @@ -1200,9 +1208,9 @@ class ElectrumWindow(QMainWindow): msg = _('The gap limit is the maximal number of contiguous unused addresses in your sequence of receiving addresses.') + '\n' \ + _('You may increase it if you need more receiving addresses.') + '\n\n' \ - + _('Your current gap limit is: ') + '%d'%self.wallet.gap_limit + '\n' \ + + _('Your current gap limit is') + ': %d'%self.wallet.gap_limit + '\n' \ + _('Given the current status of your address sequence, the minimum gap limit you can use is: ') + '%d'%self.wallet.min_acceptable_gap() + '\n\n' \ - + _('Warning:') + ' ' \ + + _('Warning') + ': ' \ + _('The gap limit parameter must be provided in order to recover your wallet from seed.') + ' ' \ + _('Do not modify it if you do not understand what you are doing, or if you expect to recover your wallet without knowing it!') + '\n\n' gap_e = QLineEdit() -- 1.7.1