From 2a431c9f02e15e5676982f506f4dd92de30f2ce8 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Thu, 24 Mar 2016 10:46:26 +0100 Subject: [PATCH] Translation updates - add missing files into translation definition - refresh english strings - change context for "networkstatus" --- src/bitmessageqt/networkstatus.py | 22 +++--- src/translations/bitmessage.pro | 3 + src/translations/bitmessage_en.ts | 107 ++++++++++++++++++++++++++++-- 3 files changed, 114 insertions(+), 18 deletions(-) diff --git a/src/bitmessageqt/networkstatus.py b/src/bitmessageqt/networkstatus.py index cadff96a..b51714d6 100644 --- a/src/bitmessageqt/networkstatus.py +++ b/src/bitmessageqt/networkstatus.py @@ -11,7 +11,7 @@ class NetworkStatus(QtGui.QWidget): super(NetworkStatus, self).__init__(parent) widgets.load('networkstatus.ui', self) - self.labelStartupTime.setText(_translate("MainWindow", "Since startup on %1").arg( + self.labelStartupTime.setText(_translate("networkstatus", "Since startup on %1").arg( l10n.formatTimestamp())) self.UISignalThread = UISignaler.get() @@ -43,19 +43,19 @@ class NetworkStatus(QtGui.QWidget): return "%4.0f KB" % num def updateNumberOfMessagesProcessed(self): - self.labelSyncStatus.setText(_translate("MainWindow", "Objects to be synced: %1").arg(str(sum(shared.numberOfObjectsThatWeHaveYetToGetPerPeer.itervalues())))) + self.labelSyncStatus.setText(_translate("networkstatus", "Objects to be synced: %1").arg(str(sum(shared.numberOfObjectsThatWeHaveYetToGetPerPeer.itervalues())))) self.labelMessageCount.setText(_translate( - "MainWindow", "Processed %1 person-to-person messages.").arg(str(shared.numberOfMessagesProcessed))) + "networkstatus", "Processed %1 person-to-person messages.").arg(str(shared.numberOfMessagesProcessed))) def updateNumberOfBroadcastsProcessed(self): - self.labelSyncStatus.setText(_translate("MainWindow", "Objects to be synced: %1").arg(str(sum(shared.numberOfObjectsThatWeHaveYetToGetPerPeer.itervalues())))) + self.labelSyncStatus.setText(_translate("networkstatus", "Objects to be synced: %1").arg(str(sum(shared.numberOfObjectsThatWeHaveYetToGetPerPeer.itervalues())))) self.labelBroadcastCount.setText(_translate( - "MainWindow", "Processed %1 broadcast messages.").arg(str(shared.numberOfBroadcastsProcessed))) + "networkstatus", "Processed %1 broadcast messages.").arg(str(shared.numberOfBroadcastsProcessed))) def updateNumberOfPubkeysProcessed(self): - self.labelSyncStatus.setText(_translate("MainWindow", "Objects to be synced: %1").arg(str(sum(shared.numberOfObjectsThatWeHaveYetToGetPerPeer.itervalues())))) + self.labelSyncStatus.setText(_translate("networkstatus", "Objects to be synced: %1").arg(str(sum(shared.numberOfObjectsThatWeHaveYetToGetPerPeer.itervalues())))) self.labelPubkeyCount.setText(_translate( - "MainWindow", "Processed %1 public keys.").arg(str(shared.numberOfPubkeysProcessed))) + "networkstatus", "Processed %1 public keys.").arg(str(shared.numberOfPubkeysProcessed))) def updateNumberOfBytes(self): """ @@ -63,9 +63,9 @@ class NetworkStatus(QtGui.QWidget): sent and received by 2. """ self.labelBytesRecvCount.setText(_translate( - "MainWindow", "Down: %1/s Total: %2").arg(self.formatByteRate(shared.numberOfBytesReceived/2), self.formatBytes(self.totalNumberOfBytesReceived))) + "networkstatus", "Down: %1/s Total: %2").arg(self.formatByteRate(shared.numberOfBytesReceived/2), self.formatBytes(self.totalNumberOfBytesReceived))) self.labelBytesSentCount.setText(_translate( - "MainWindow", "Up: %1/s Total: %2").arg(self.formatByteRate(shared.numberOfBytesSent/2), self.formatBytes(self.totalNumberOfBytesSent))) + "networkstatus", "Up: %1/s Total: %2").arg(self.formatByteRate(shared.numberOfBytesSent/2), self.formatBytes(self.totalNumberOfBytesSent))) self.totalNumberOfBytesReceived += shared.numberOfBytesReceived self.totalNumberOfBytesSent += shared.numberOfBytesSent shared.numberOfBytesReceived = 0 @@ -112,7 +112,7 @@ class NetworkStatus(QtGui.QWidget): self.tableWidgetConnectionCount.setItem(0,1,newItem) totalNumberOfConnectionsFromAllStreams += connectionCount""" self.labelTotalConnections.setText(_translate( - "MainWindow", "Total Connections: %1").arg(str(len(shared.connectedHostsList)))) + "networkstatus", "Total Connections: %1").arg(str(len(shared.connectedHostsList)))) if len(shared.connectedHostsList) > 0 and shared.statusIconColor == 'red': # FYI: The 'singlelistener' thread sets the icon color to green when it receives an incoming connection, meaning that the user's firewall is configured correctly. self.window().setStatusIcon('yellow') elif len(shared.connectedHostsList) == 0: @@ -121,6 +121,6 @@ class NetworkStatus(QtGui.QWidget): # timer driven def runEveryTwoSeconds(self): self.labelLookupsPerSecond.setText(_translate( - "MainWindow", "Inventory lookups per second: %1").arg(str(shared.numberOfInventoryLookupsPerformed/2))) + "networkstatus", "Inventory lookups per second: %1").arg(str(shared.numberOfInventoryLookupsPerformed/2))) shared.numberOfInventoryLookupsPerformed = 0 self.updateNumberOfBytes() diff --git a/src/translations/bitmessage.pro b/src/translations/bitmessage.pro index 9e5dc7d9..875388f4 100644 --- a/src/translations/bitmessage.pro +++ b/src/translations/bitmessage.pro @@ -21,6 +21,7 @@ SOURCES = ../addresses.py\ ../bitmessageqt/account.py\ ../bitmessageqt/addaddressdialog.py\ ../bitmessageqt/bitmessageui.py\ + ../bitmessageqt/blacklist.py\ ../bitmessageqt/connect.py\ ../bitmessageqt/emailgateway.py\ ../bitmessageqt/foldertree.py\ @@ -28,6 +29,7 @@ SOURCES = ../addresses.py\ ../bitmessageqt/iconglossary.py\ ../bitmessageqt/messagecompose.py\ ../bitmessageqt/messageview.py\ + ../bitmessageqt/networkstatus.py\ ../bitmessageqt/newaddressdialog.py\ ../bitmessageqt/newchandialog.py\ ../bitmessageqt/newsubscriptiondialog.py\ @@ -37,6 +39,7 @@ SOURCES = ../addresses.py\ ../bitmessageqt/specialaddressbehavior.py FORMS = \ + ../bitmessageqt/blacklist.ui\ ../bitmessageqt/networkstatus.ui TRANSLATIONS = \ diff --git a/src/translations/bitmessage_en.ts b/src/translations/bitmessage_en.ts index 51336976..701d8671 100644 --- a/src/translations/bitmessage_en.ts +++ b/src/translations/bitmessage_en.ts @@ -180,22 +180,22 @@ Please type the desiged email address (including @mailchuck.com) below: - + Enable - + Disable - + Set avatar... - + Copy address to clipboard @@ -210,7 +210,7 @@ Please type the desiged email address (including @mailchuck.com) below: - + Delete @@ -627,12 +627,12 @@ It is important that you back up this file. Would you like to open the file now? - + Address is valid. - + The address you entered was invalid. Ignoring it. @@ -1104,6 +1104,16 @@ p, li { white-space: pre-wrap; } Zoom level %1% + + + Error: You cannot add the same address to your list twice. Perhaps rename the existing one if you want. + + + + + Add new entry + + NewAddressDialog @@ -1288,6 +1298,44 @@ The 'Random Number' option is selected by default but deterministic ad + + blacklist + + + Use a Blacklist (Allow all incoming messages except those on the Blacklist) + + + + + Use a Whitelist (Block all incoming messages except those on the Whitelist) + + + + + Add new entry + + + + + Name or Label + + + + + Address + + + + + Blacklist + + + + + Whitelist + + + connectDialog @@ -1414,6 +1462,51 @@ The 'Random Number' option is selected by default but deterministic ad Connections + + + Since startup on %1 + + + + + Objects to be synced: %1 + + + + + Processed %1 person-to-person messages. + + + + + Processed %1 broadcast messages. + + + + + Processed %1 public keys. + + + + + Down: %1/s Total: %2 + + + + + Up: %1/s Total: %2 + + + + + Total Connections: %1 + + + + + Inventory lookups per second: %1 + + newChanDialog