Browse Source

Add translations and fixes to 1.9 master

Added translations, fixes to syntax errors and other minor fixes for
text strings.

Tested all changes. I hope not to break anyhting…

I was unsurem, but the menu bar on the Lite GUI dissapeared. Looking at
the commits on master, it seems that it wasn't me.
283
rdymac 12 years ago
parent
commit
10be6e7609
  1. 8
      app.fil
  2. 6
      gui/gui_classic/installwizard.py
  3. 4
      gui/gui_classic/lite_window.py
  4. 36
      gui/gui_classic/main_window.py
  5. 28
      gui/gui_classic/transaction_dialog.py
  6. 2
      lib/version.py
  7. 2
      plugins/labels.py

8
app.fil

@ -2,6 +2,14 @@ gui/gui_gtk.py
gui/gui_classic/main_window.py
gui/gui_classic/lite_window.py
gui/gui_classic/history_widget.py
gui/gui_classic/installwizard.py
gui/gui_classic/network_dialog.py
gui/gui_classic/password_dialog.py
gui/gui_classic/qt_util.py
gui/gui_classic/receiving_widget.py
gui/gui_classic/seed_dialog.py
gui/gui_classic/transaction_dialog.py
gui/gui_classic/version_getter.py
plugins/aliases.py
plugins/pointofsale.py
plugins/labels.py

6
gui/gui_classic/installwizard.py

@ -30,7 +30,7 @@ class InstallWizard(QDialog):
grid = QGridLayout()
grid.setSpacing(5)
msg = _("Wallet file not found.")+"\n"+_("Do you want to create a new wallet, or to restore an existing one?")
msg = _("Wallet file not found.")+"\n\n"+_("Do you want to create a new wallet, or to restore an existing one?"+"\n")
label = QLabel(msg)
label.setWordWrap(True)
grid.addWidget(label, 0, 0)
@ -76,7 +76,7 @@ class InstallWizard(QDialog):
return
if r != wallet.seed:
QMessageBox.warning(None, _('Error'), 'incorrect seed', 'OK')
QMessageBox.warning(None, _('Error'), _('Incorrect seed'), _('OK'))
return False
else:
return True
@ -89,7 +89,7 @@ class InstallWizard(QDialog):
vbox = QVBoxLayout(self)
if is_restore:
msg = _("Please enter your wallet seed." + ' ')
msg += _("Your seed can be entered as a sequence of words, or as a hexadecimal string."+ '\n')
msg += _("Your seed can be entered as a sequence of words, or as a hexadecimal string."+ ' \n')
else:
msg = _("Your seed is important!") \
+ "\n" + _("To make sure that you have properly saved your seed, please retype it here." + ' ')

4
gui/gui_classic/lite_window.py

@ -131,7 +131,7 @@ def csv_transaction(wallet):
QMessageBox.information(None,"CSV Export created", "Your CSV export has been successfully created.")
except (IOError, os.error), reason:
export_error_label = _("Electrum was unable to produce a transaction export.")
QMessageBox.critical(None,"Unable to create csv", export_error_label + "\n" + str(reason))
QMessageBox.critical(None,_("Unable to create csv"), export_error_label + "\n" + str(reason))
@ -710,7 +710,7 @@ class MiniActuator:
w = QDialog()
w.resize(200, 70)
w.setWindowTitle('Electrum')
l = QLabel('Sending transaction, please wait.')
l = QLabel(_('Sending transaction, please wait.'))
vbox = QVBoxLayout()
vbox.addWidget(l)
w.setLayout(vbox)

36
gui/gui_classic/main_window.py

@ -424,8 +424,8 @@ class ElectrumWindow(QMainWindow):
if(v > 0):
total_amount += v
self.notify("%s new transactions received. Total amount received in the new transactions %s %s" \
% (tx_amount, self.format_amount(total_amount), self.base_unit()))
self.notify(_("%(txs)s new transactions received. Total amount received in the new transactions %(amount)s %(unit)s") \
% { 'txs' : tx_amount, 'amount' : self.format_amount(total_amount), 'unit' : self.base_unit()})
self.network.interface.pending_transactions_for_notifications = []
else:
@ -434,7 +434,7 @@ class ElectrumWindow(QMainWindow):
self.network.interface.pending_transactions_for_notifications.remove(tx)
is_relevant, is_mine, v, fee = self.wallet.get_tx_value(tx)
if(v > 0):
self.notify("New transaction received. %s %s" % (self.format_amount(v), self.base_unit()))
self.notify(_("New transaction received. %(amount)s %(unit)s") % { 'amount' : self.format_amount(v), 'unit' : self.base_unit()})
def notify(self, message):
self.tray.showMessage("Electrum", message, QSystemTrayIcon.Information, 20000)
@ -458,7 +458,7 @@ class ElectrumWindow(QMainWindow):
try:
self.plugins.append( p.Plugin(self, name) )
except:
print_msg("Error:cannot initialize plugin",p)
print_msg(_("Error: cannot initialize plugin"),p)
traceback.print_exc(file=sys.stdout)
@ -684,7 +684,7 @@ class ElectrumWindow(QMainWindow):
try:
time_str = datetime.datetime.fromtimestamp( timestamp).isoformat(' ')[:-3]
except:
time_str = "unknown"
time_str = _("unknown")
if conf == -1:
time_str = 'unverified'
@ -876,7 +876,7 @@ class ElectrumWindow(QMainWindow):
confirm_amount = self.config.get('confirm_amount', 100000000)
if amount >= confirm_amount:
if not self.question("send %s to %s?"%(self.format_amount(amount) + ' '+ self.base_unit(), to_address)):
if not self.question(_("send %(amount)s to %(address)s?")%{ 'amount' : self.format_amount(amount) + ' '+ self.base_unit(), 'address' : to_address}):
return
self.send_tx(to_address, amount, fee, label)
@ -951,7 +951,7 @@ class ElectrumWindow(QMainWindow):
self.set_frozen(self.payto_e,True)
self.set_frozen(self.amount_e,True)
self.set_frozen(self.message_e,True)
self.payto_sig.setText( ' The bitcoin URI was signed by ' + identity )
self.payto_sig.setText( ' '+_('The bitcoin URI was signed by')+' ' + identity )
else:
self.payto_sig.setVisible(False)
@ -1192,7 +1192,7 @@ class ElectrumWindow(QMainWindow):
for is_change in ([0,1] if self.expert_mode else [0]):
if self.expert_mode:
name = "Receiving" if not is_change else "Change"
name = _("Receiving") if not is_change else _("Change")
seq_item = QTreeWidgetItem( [ name, '', '', '', ''] )
account_item.addChild(seq_item)
if not is_change: seq_item.setExpanded(True)
@ -1435,7 +1435,7 @@ class ElectrumWindow(QMainWindow):
def show_qrcode(self, data, title = "QR code"):
def show_qrcode(self, data, title = _("QR code")):
if not data: return
d = QDialog(self)
d.setModal(1)
@ -1490,7 +1490,7 @@ class ElectrumWindow(QMainWindow):
except BaseException, e:
self.show_message(str(e))
return
QMessageBox.information(self, _('Private key'), 'Address'+ ': ' + address + '\n\n' + _('Private key') + ': ' + '\n'.join(pk_list), _('OK'))
QMessageBox.information(self, _('Private key'), _('Address')+ ': ' + address + '\n\n' + _('Private key') + ': ' + '\n'.join(pk_list), _('OK'))
@protected
@ -1642,7 +1642,7 @@ class ElectrumWindow(QMainWindow):
except:
pass
QMessageBox.critical(None, "Unable to parse transaction", _("Electrum was unable to parse your transaction"))
QMessageBox.critical(None, _("Unable to parse transaction"), _("Electrum was unable to parse your transaction"))
@ -1654,7 +1654,7 @@ class ElectrumWindow(QMainWindow):
with open(fileName, "r") as f:
file_content = f.read()
except (ValueError, IOError, os.error), reason:
QMessageBox.critical(None,"Unable to read file or no transaction found", _("Electrum was unable to open your transaction file") + "\n" + str(reason))
QMessageBox.critical(None, _("Unable to read file or no transaction found"), _("Electrum was unable to open your transaction file") + "\n" + str(reason))
return self.tx_from_text(file_content)
@ -1685,7 +1685,7 @@ class ElectrumWindow(QMainWindow):
amount = int(100000000*amount)
outputs.append((address, amount))
except (ValueError, IOError, os.error), reason:
QMessageBox.critical(None,"Unable to read file or no transaction found", _("Electrum was unable to open your transaction file") + "\n" + str(reason))
QMessageBox.critical(None, _("Unable to read file or no transaction found"), _("Electrum was unable to open your transaction file") + "\n" + str(reason))
return
try:
@ -1705,7 +1705,7 @@ class ElectrumWindow(QMainWindow):
csvReader = csv.reader(f)
self.do_process_from_csvReader(csvReader)
except (ValueError, IOError, os.error), reason:
QMessageBox.critical(None,"Unable to read file or no transaction found", _("Electrum was unable to open your transaction file") + "\n" + str(reason))
QMessageBox.critical(None, _("Unable to read file or no transaction found"), _("Electrum was unable to open your transaction file") + "\n" + str(reason))
return
def do_process_from_csv_text(self):
@ -1740,7 +1740,7 @@ class ElectrumWindow(QMainWindow):
except (IOError, os.error), reason:
export_error_label = _("Electrum was unable to produce a private key-export.")
QMessageBox.critical(None,"Unable to create csv", export_error_label + "\n" + str(reason))
QMessageBox.critical(None, _("Unable to create csv"), export_error_label + "\n" + str(reason))
except BaseException, e:
self.show_message(str(e))
@ -1768,9 +1768,9 @@ class ElectrumWindow(QMainWindow):
if fileName:
with open(fileName, 'w+') as f:
json.dump(labels, f)
QMessageBox.information(None, "Labels exported", _("Your labels where exported to")+" '%s'" % str(fileName))
QMessageBox.information(None, _("Labels exported"), _("Your labels where exported to")+" '%s'" % str(fileName))
except (IOError, os.error), reason:
QMessageBox.critical(None, "Unable to export labels", _("Electrum was unable to export your labels.")+"\n" + str(reason))
QMessageBox.critical(None, _("Unable to export labels"), _("Electrum was unable to export your labels.")+"\n" + str(reason))
def do_export_history(self):
@ -1939,7 +1939,7 @@ class ElectrumWindow(QMainWindow):
grid_plugins.addWidget(EnterButton(_('Settings'), p.settings_dialog), i, 1)
grid_plugins.addWidget(HelpButton(p.description()), i, 2)
except:
print_msg("Error: cannot display plugin", p)
print_msg(_("Error: cannot display plugin"), p)
traceback.print_exc(file=sys.stdout)
grid_plugins.setRowStretch(i+1,1)

28
gui/gui_classic/transaction_dialog.py

@ -46,13 +46,13 @@ class TxDialog(QDialog):
QDialog.__init__(self)
self.setMinimumWidth(600)
self.setWindowTitle(_('Transaction'))
self.setWindowTitle(_("Transaction"))
self.setModal(1)
vbox = QVBoxLayout()
self.setLayout(vbox)
vbox.addWidget(QLabel("Transaction ID:"))
vbox.addWidget(QLabel(_("Transaction ID:")))
self.tx_hash_e = QLineEdit()
self.tx_hash_e.setReadOnly(True)
vbox.addWidget(self.tx_hash_e)
@ -119,7 +119,7 @@ class TxDialog(QDialog):
is_relevant, is_mine, v, fee = self.wallet.get_tx_value(self.tx)
if self.tx.is_complete:
status = "Status: Signed"
status = _("Status: Signed")
self.sign_button.hide()
if tx_hash in self.wallet.transactions.keys():
@ -128,14 +128,14 @@ class TxDialog(QDialog):
time_str = datetime.datetime.fromtimestamp(timestamp).isoformat(' ')[:-3]
else:
time_str = 'pending'
status = "Status: %d confirmations"%conf
status = _("Status: %d confirmations")%conf
self.broadcast_button.hide()
else:
time_str = None
conf = 0
self.broadcast_button.show()
else:
status = "Status: Unsigned"
status = _("Status: Unsigned")
time_str = None
self.sign_button.show()
self.broadcast_button.hide()
@ -144,7 +144,7 @@ class TxDialog(QDialog):
self.status_label.setText(status)
if time_str is not None:
self.date_label.setText("Date: %s"%time_str)
self.date_label.setText(_("Date: %s")%time_str)
self.date_label.show()
else:
self.date_label.hide()
@ -152,15 +152,15 @@ class TxDialog(QDialog):
if is_relevant:
if is_mine:
if fee is not None:
self.amount_label.setText("Amount sent: %s"% self.parent.format_amount(v-fee) + ' ' + self.parent.base_unit())
self.fee_label.setText("Transaction fee: %s"% self.parent.format_amount(fee) + ' ' + self.parent.base_unit())
self.amount_label.setText(_("Amount sent:")+' %s'% self.parent.format_amount(v-fee) + ' ' + self.parent.base_unit())
self.fee_label.setText(_("Transaction fee:")+' %s'% self.parent.format_amount(fee) + ' ' + self.parent.base_unit())
else:
self.amount_label.setText("Amount sent: %s"% self.parent.format_amount(v) + ' ' + self.parent.base_unit())
self.fee_label.setText("Transaction fee: unknown")
self.amount_label.setText(_("Amount sent:")+' %s'% self.parent.format_amount(v) + ' ' + self.parent.base_unit())
self.fee_label.setText(_("Transaction fee: unknown"))
else:
self.amount_label.setText("Amount received: %s"% self.parent.format_amount(v) + ' ' + self.parent.base_unit())
self.amount_label.setText(_("Amount received:")+' %s'% self.parent.format_amount(v) + ' ' + self.parent.base_unit())
else:
self.amount_label.setText("Transaction unrelated to your wallet")
self.amount_label.setText(_("Transaction unrelated to your wallet"))
def exec_menu(self, position,l):
@ -197,11 +197,11 @@ class TxDialog(QDialog):
def broadcast(self):
result, result_message = self.wallet.sendtx( self.tx )
if result:
self.show_message("Transaction successfully sent: %s" % (result_message))
self.show_message(_("Transaction successfully sent:")+' %s' % (result_message))
if dialog:
dialog.done(0)
else:
self.show_message("There was a problem sending your transaction:\n %s" % (result_message))
self.show_message(_("There was a problem sending your transaction:") + '\n %s' % (result_message))
def show_message(self, msg):
QMessageBox.information(self, _('Message'), msg, _('OK'))

2
lib/version.py

@ -1,4 +1,4 @@
ELECTRUM_VERSION = "1.9" # version of the client package
PROTOCOL_VERSION = '0.6' # protocol version requested
SEED_VERSION = 5 # bump this every time the seed generation is modified
TRANSLATION_ID = 4101 # version of the wiki page
TRANSLATION_ID = 4118 # version of the wiki page

2
plugins/labels.py

@ -28,7 +28,7 @@ class Plugin(BasePlugin):
return _('Label Sync')
def description(self):
return '%s\n\n%s%s%s' % (_("This plugin can sync your labels across multiple Electrum installs by using a remote database to save your data. Labels, transactions and addresses are all sent and stored encrypted on the remote server. This code might increase the load of your wallet with a few microseconds as it will sync labels on each startup."), _("To get started visit"), " http://labelectrum.herokuapp.com/", _(" to sign up for an account."))
return '%s\n\n%s%s%s' % (_("This plugin can sync your labels across multiple Electrum installs by using a remote database to save your data. Labels, transactions and addresses are all sent and stored encrypted on the remote server. This code might increase the load of your wallet with a few microseconds as it will sync labels on each startup."), _("To get started visit"), " http://labelectrum.herokuapp.com/ ", _(" to sign up for an account."))
def version(self):
return "0.2.1"

Loading…
Cancel
Save