Translation updates

- add missing files into translation definition
- refresh english strings
- change context for "networkstatus"
This commit is contained in:
Peter Šurda 2016-03-24 10:46:26 +01:00
parent 0f267c94c7
commit 8b605a874a
3 changed files with 114 additions and 18 deletions

View File

@ -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()

View File

@ -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 = \

View File

@ -180,22 +180,22 @@ Please type the desiged email address (including @mailchuck.com) below:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="329"/>
<location filename="../bitmessageqt/blacklist.py" line="121"/>
<source>Enable</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="332"/>
<location filename="../bitmessageqt/blacklist.py" line="124"/>
<source>Disable</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="3515"/>
<location filename="../bitmessageqt/blacklist.py" line="127"/>
<source>Set avatar...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="326"/>
<location filename="../bitmessageqt/blacklist.py" line="117"/>
<source>Copy address to clipboard</source>
<translation type="unfinished"></translation>
</message>
@ -210,7 +210,7 @@ Please type the desiged email address (including @mailchuck.com) below:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="323"/>
<location filename="../bitmessageqt/blacklist.py" line="114"/>
<source>Delete</source>
<translation type="unfinished"></translation>
</message>
@ -627,12 +627,12 @@ It is important that you back up this file. Would you like to open the file now?
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="4197"/>
<location filename="../bitmessageqt/blacklist.py" line="59"/>
<source>Address is valid.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/__init__.py" line="2299"/>
<location filename="../bitmessageqt/blacklist.py" line="93"/>
<source>The address you entered was invalid. Ignoring it.</source>
<translation type="unfinished"></translation>
</message>
@ -1104,6 +1104,16 @@ p, li { white-space: pre-wrap; }
<source>Zoom level %1%</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/blacklist.py" line="90"/>
<source>Error: You cannot add the same address to your list twice. Perhaps rename the existing one if you want.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/blacklist.py" line="111"/>
<source>Add new entry</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>NewAddressDialog</name>
@ -1288,6 +1298,44 @@ The &apos;Random Number&apos; option is selected by default but deterministic ad
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>blacklist</name>
<message>
<location filename="../bitmessageqt/blacklist.ui" line="17"/>
<source>Use a Blacklist (Allow all incoming messages except those on the Blacklist)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/blacklist.ui" line="27"/>
<source>Use a Whitelist (Block all incoming messages except those on the Whitelist)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/blacklist.ui" line="34"/>
<source>Add new entry</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/blacklist.ui" line="85"/>
<source>Name or Label</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/blacklist.ui" line="90"/>
<source>Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/blacklist.py" line="150"/>
<source>Blacklist</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/blacklist.py" line="152"/>
<source>Whitelist</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>connectDialog</name>
<message>
@ -1414,6 +1462,51 @@ The &apos;Random Number&apos; option is selected by default but deterministic ad
<source>Connections</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/networkstatus.py" line="14"/>
<source>Since startup on %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/networkstatus.py" line="56"/>
<source>Objects to be synced: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/networkstatus.py" line="47"/>
<source>Processed %1 person-to-person messages.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/networkstatus.py" line="52"/>
<source>Processed %1 broadcast messages.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/networkstatus.py" line="57"/>
<source>Processed %1 public keys.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/networkstatus.py" line="65"/>
<source>Down: %1/s Total: %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/networkstatus.py" line="67"/>
<source>Up: %1/s Total: %2</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/networkstatus.py" line="114"/>
<source>Total Connections: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bitmessageqt/networkstatus.py" line="123"/>
<source>Inventory lookups per second: %1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>newChanDialog</name>