'
- content = ' '.join(lines) # To keep the whitespace between lines
+ content = ' '.join(lines) # To keep the whitespace between lines
content = shared.fixPotentiallyInvalidUTF8Data(content)
- content = unicode(content, 'utf-8)')
- textEdit.setHtml(QtCore.QString(content))
+ content = content.decode('utf-8')
+ textEdit.setHtml(content)
def on_action_InboxMarkUnread(self):
tableWidget = self.getCurrentMessagelist()
@@ -2961,18 +2953,14 @@ class MyForm(settingsmixin.SMainWindow):
)
self.propagateUnreadCount()
- # tableWidget.selectRow(currentRow + 1)
- # This doesn't de-select the last message if you try to mark it
- # unread, but that doesn't interfere. Might not be necessary.
- # We could also select upwards, but then our problem would be
- # with the topmost message.
- # tableWidget.clearSelection() manages to mark the message
- # as read again.
# Format predefined text on message reply.
def quoted_text(self, message):
if not config.safeGetBoolean('bitmessagesettings', 'replybelow'):
- return '\n\n------------------------------------------------------\n' + message
+ return (
+ '\n\n------------------------------------------------------\n' +
+ message
+ )
quoteWrapper = textwrap.TextWrapper(
replace_whitespace=False, initial_indent='> ',
@@ -3002,7 +2990,7 @@ class MyForm(settingsmixin.SMainWindow):
self.ui.comboBoxSendFrom, self.ui.comboBoxSendFromBroadcast
):
for i in range(box.count()):
- if str(box.itemData(i).toPyObject()) == address:
+ if str(box.itemData(i)) == address:
box.setCurrentIndex(i)
break
else:
@@ -3046,7 +3034,8 @@ class MyForm(settingsmixin.SMainWindow):
acct.parseMessage(
toAddressAtCurrentInboxRow, fromAddressAtCurrentInboxRow,
tableWidget.item(currentInboxRow, 2).subject,
- messageAtCurrentInboxRow)
+ messageAtCurrentInboxRow
+ )
widget = {
'subject': self.ui.lineEditSubject,
'from': self.ui.comboBoxSendFrom,
@@ -3059,23 +3048,26 @@ class MyForm(settingsmixin.SMainWindow):
)
# toAddressAtCurrentInboxRow = fromAddressAtCurrentInboxRow
elif not config.has_section(toAddressAtCurrentInboxRow):
- QtGui.QMessageBox.information(
- self, _translate("MainWindow", "Address is gone"),
+ QtWidgets.QMessageBox.information(
+ self,
+ _translate("MainWindow", "Address is gone"),
_translate(
"MainWindow",
- "Bitmessage cannot find your address %1. Perhaps you"
+ "Bitmessage cannot find your address {0}. Perhaps you"
" removed it?"
- ).arg(toAddressAtCurrentInboxRow), QtGui.QMessageBox.Ok)
+ ).format(toAddressAtCurrentInboxRow),
+ QtWidgets.QMessageBox.Ok)
elif not config.getboolean(
toAddressAtCurrentInboxRow, 'enabled'):
- QtGui.QMessageBox.information(
- self, _translate("MainWindow", "Address disabled"),
+ QtWidgets.QMessageBox.information(
+ self,
+ _translate("MainWindow", "Address disabled"),
_translate(
"MainWindow",
"Error: The address from which you are trying to send"
- " is disabled. You\'ll have to enable it on the"
- " \'Your Identities\' tab before using it."
- ), QtGui.QMessageBox.Ok)
+ " is disabled. You\'ll have to enable it on the \'Your"
+ " Identities\' tab before using it."
+ ), QtWidgets.QMessageBox.Ok)
else:
self.setBroadcastEnablementDependingOnWhetherThisIsAMailingListAddress(toAddressAtCurrentInboxRow)
broadcast_tab_index = self.ui.tabWidgetSend.indexOf(
@@ -3117,7 +3109,7 @@ class MyForm(settingsmixin.SMainWindow):
self.setSendFromComboBox(toAddressAtCurrentInboxRow)
quotedText = self.quoted_text(
- unicode(messageAtCurrentInboxRow, 'utf-8', 'replace'))
+ messageAtCurrentInboxRow.decode('utf-8', 'replace'))
widget['message'].setPlainText(quotedText)
if acct.subject[0:3] in ('Re:', 'RE:'):
widget['subject'].setText(
@@ -3153,8 +3145,9 @@ class MyForm(settingsmixin.SMainWindow):
recipientAddress = tableWidget.item(
currentInboxRow, 0).data(QtCore.Qt.UserRole)
# Let's make sure that it isn't already in the address book
- queryreturn = sqlQuery('''select * from blacklist where address=?''',
- addressAtCurrentInboxRow)
+ queryreturn = sqlQuery(
+ 'SELECT * FROM blacklist WHERE address=?',
+ addressAtCurrentInboxRow)
if queryreturn == []:
label = "\"" + tableWidget.item(currentInboxRow, 2).subject + "\" in " + config.get(
recipientAddress, "label")
@@ -3203,8 +3196,8 @@ class MyForm(settingsmixin.SMainWindow):
return
currentRow = 0
folder = self.getCurrentFolder()
- shifted = QtGui.QApplication.queryKeyboardModifiers() \
- & QtCore.Qt.ShiftModifier
+ shifted = (QtWidgets.QApplication.queryKeyboardModifiers() &
+ QtCore.Qt.ShiftModifier)
tableWidget.setUpdatesEnabled(False)
inventoryHashesToTrash = set()
# ranges in reversed order
@@ -3221,8 +3214,8 @@ class MyForm(settingsmixin.SMainWindow):
idCount = len(inventoryHashesToTrash)
sqlExecuteChunked(
("DELETE FROM inbox" if folder == "trash" or shifted else
- "UPDATE inbox SET folder='trash', read=1") +
- " WHERE msgid IN ({0})", idCount, *inventoryHashesToTrash)
+ "UPDATE inbox SET folder='trash', read=1")
+ + " WHERE msgid IN ({0})", idCount, *inventoryHashesToTrash)
tableWidget.selectRow(0 if currentRow == 0 else currentRow - 1)
tableWidget.setUpdatesEnabled(True)
self.propagateUnreadCount(folder)
@@ -3270,18 +3263,17 @@ class MyForm(settingsmixin.SMainWindow):
# Retrieve the message data out of the SQL database
msgid = tableWidget.item(currentInboxRow, 3).data()
queryreturn = sqlQuery(
- '''select message from inbox where msgid=?''', msgid)
+ 'SELECT message FROM inbox WHERE msgid=?', msgid)
if queryreturn != []:
for row in queryreturn:
message, = row
- defaultFilename = "".join(x for x in subjectAtCurrentInboxRow if x.isalnum()) + '.txt'
- filename = QtGui.QFileDialog.getSaveFileName(
- self,
- _translate("MainWindow","Save As..."),
- defaultFilename,
- "Text files (*.txt);;All files (*.*)")
- if filename == '':
+ defaultFilename = "".join(
+ x for x in subjectAtCurrentInboxRow if x.isalnum()) + '.txt'
+ filename = QtWidgets.QFileDialog.getSaveFileName(
+ self, _translate("MainWindow", "Save As..."), defaultFilename,
+ "Text files (*.txt);;All files (*.*)")[0]
+ if not filename:
return
try:
f = open(filename, 'w')
@@ -3293,11 +3285,13 @@ class MyForm(settingsmixin.SMainWindow):
# Send item on the Sent tab to trash
def on_action_SentTrash(self):
+ currentRow = 0
tableWidget = self.getCurrentMessagelist()
if not tableWidget:
return
folder = self.getCurrentFolder()
- shifted = QtGui.QApplication.queryKeyboardModifiers() & QtCore.Qt.ShiftModifier
+ shifted = (QtWidgets.QApplication.queryKeyboardModifiers() &
+ QtCore.Qt.ShiftModifier)
while tableWidget.selectedIndexes() != []:
currentRow = tableWidget.selectedIndexes()[0].row()
ackdataToTrash = tableWidget.item(currentRow, 3).data()
@@ -3325,15 +3319,18 @@ class MyForm(settingsmixin.SMainWindow):
queryreturn = sqlQuery('''select ackdata FROM sent WHERE status='forcepow' ''')
for row in queryreturn:
ackdata, = row
- queues.UISignalQueue.put(('updateSentItemStatusByAckdata', (
- ackdata, 'Overriding maximum-difficulty setting. Work queued.')))
+ queues.UISignalQueue.put((
+ 'updateSentItemStatusByAckdata',
+ (ackdata, 'Overriding maximum-difficulty setting.'
+ ' Work queued.')
+ ))
queues.workerQueue.put(('sendmessage', ''))
def on_action_SentClipboard(self):
currentRow = self.ui.tableWidgetInbox.currentRow()
addressAtCurrentRow = self.ui.tableWidgetInbox.item(
currentRow, 0).data(QtCore.Qt.UserRole)
- clipboard = QtGui.QApplication.clipboard()
+ clipboard = QtWidgets.QApplication.clipboard()
clipboard.setText(str(addressAtCurrentRow))
# Group of functions for the Address Book dialog box
@@ -3358,7 +3355,7 @@ class MyForm(settingsmixin.SMainWindow):
addresses_string = item.address
else:
addresses_string += ', ' + item.address
- clipboard = QtGui.QApplication.clipboard()
+ clipboard = QtWidgets.QApplication.clipboard()
clipboard.setText(addresses_string)
def on_action_AddressBookSend(self):
@@ -3368,8 +3365,7 @@ class MyForm(settingsmixin.SMainWindow):
return self.updateStatusBar(_translate(
"MainWindow", "No addresses selected."))
- addresses_string = unicode(
- self.ui.lineEditTo.text().toUtf8(), 'utf-8')
+ addresses_string = self.ui.lineEditTo.text()
for item in selected_items:
address_string = item.accountString()
if not addresses_string:
@@ -3400,7 +3396,7 @@ class MyForm(settingsmixin.SMainWindow):
)
def on_context_menuAddressBook(self, point):
- self.popMenuAddressBook = QtGui.QMenu(self)
+ self.popMenuAddressBook = QtWidgets.QMenu(self)
self.popMenuAddressBook.addAction(self.actionAddressBookSend)
self.popMenuAddressBook.addAction(self.actionAddressBookClipboard)
self.popMenuAddressBook.addAction(self.actionAddressBookSubscribe)
@@ -3430,7 +3426,7 @@ class MyForm(settingsmixin.SMainWindow):
self.click_pushButtonAddSubscription()
def on_action_SubscriptionsDelete(self):
- if QtGui.QMessageBox.question(
+ if QtWidgets.QMessageBox.question(
self, "Delete subscription?",
_translate(
"MainWindow",
@@ -3441,8 +3437,8 @@ class MyForm(settingsmixin.SMainWindow):
" messages, but you can still view messages you"
" already received.\n\nAre you sure you want to"
" delete the subscription?"
- ), QtGui.QMessageBox.Yes | QtGui.QMessageBox.No
- ) != QtGui.QMessageBox.Yes:
+ ), QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No
+ ) != QtWidgets.QMessageBox.Yes:
return
address = self.getCurrentAccount()
sqlExecute('''DELETE FROM subscriptions WHERE address=?''',
@@ -3454,7 +3450,7 @@ class MyForm(settingsmixin.SMainWindow):
def on_action_SubscriptionsClipboard(self):
address = self.getCurrentAccount()
- clipboard = QtGui.QApplication.clipboard()
+ clipboard = QtWidgets.QApplication.clipboard()
clipboard.setText(str(address))
def on_action_SubscriptionsEnable(self):
@@ -3479,7 +3475,7 @@ class MyForm(settingsmixin.SMainWindow):
def on_context_menuSubscriptions(self, point):
currentItem = self.getCurrentItem()
- self.popMenuSubscriptions = QtGui.QMenu(self)
+ self.popMenuSubscriptions = QtWidgets.QMenu(self)
if isinstance(currentItem, Ui_AddressWidget):
self.popMenuSubscriptions.addAction(self.actionsubscriptionsNew)
self.popMenuSubscriptions.addAction(self.actionsubscriptionsDelete)
@@ -3519,8 +3515,6 @@ class MyForm(settingsmixin.SMainWindow):
return self.ui.tableWidgetInboxSubscriptions
elif widget == self.ui.treeWidgetChans:
return self.ui.tableWidgetInboxChans
- else:
- return None
def getCurrentTreeWidget(self):
currentIndex = self.ui.tabWidget.currentIndex()
@@ -3609,7 +3603,7 @@ class MyForm(settingsmixin.SMainWindow):
if currentIndex >= 0 and currentIndex < len(messagelistList):
return (
messagelistList[currentIndex] if retObj
- else messagelistList[currentIndex].text().toUtf8().data())
+ else messagelistList[currentIndex].text())
def getCurrentSearchOption(self, currentIndex=None):
if currentIndex is None:
@@ -3665,7 +3659,7 @@ class MyForm(settingsmixin.SMainWindow):
if account.type == AccountMixin.NORMAL:
return # maybe in the future
elif account.type == AccountMixin.CHAN:
- if QtGui.QMessageBox.question(
+ if QtWidgets.QMessageBox.question(
self, "Delete channel?",
_translate(
"MainWindow",
@@ -3676,8 +3670,8 @@ class MyForm(settingsmixin.SMainWindow):
" messages, but you can still view messages you"
" already received.\n\nAre you sure you want to"
" delete the channel?"
- ), QtGui.QMessageBox.Yes | QtGui.QMessageBox.No
- ) == QtGui.QMessageBox.Yes:
+ ), QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No
+ ) == QtWidgets.QMessageBox.Yes:
config.remove_section(str(account.address))
else:
return
@@ -3718,7 +3712,7 @@ class MyForm(settingsmixin.SMainWindow):
def on_action_Clipboard(self):
address = self.getCurrentAccount()
- clipboard = QtGui.QApplication.clipboard()
+ clipboard = QtWidgets.QApplication.clipboard()
clipboard.setText(str(address))
def on_action_ClipboardMessagelist(self):
@@ -3736,14 +3730,14 @@ class MyForm(settingsmixin.SMainWindow):
myAddress = tableWidget.item(currentRow, 0).data(QtCore.Qt.UserRole)
otherAddress = tableWidget.item(currentRow, 1).data(QtCore.Qt.UserRole)
account = accountClass(myAddress)
- if isinstance(account, GatewayAccount) and otherAddress == account.relayAddress and (
- (currentColumn in [0, 2] and self.getCurrentFolder() == "sent") or
- (currentColumn in [1, 2] and self.getCurrentFolder() != "sent")):
- text = str(tableWidget.item(currentRow, currentColumn).label)
+ if isinstance(account, GatewayAccount) \
+ and otherAddress == account.relayAddress and (
+ (currentColumn in (0, 2) and currentFolder == "sent") or
+ (currentColumn in (1, 2) and currentFolder != "sent")):
+ text = tableWidget.item(currentRow, currentColumn).label
else:
text = tableWidget.item(currentRow, currentColumn).data(QtCore.Qt.UserRole)
-
- clipboard = QtGui.QApplication.clipboard()
+ clipboard = QtWidgets.QApplication.clipboard()
clipboard.setText(text)
# set avatar functions
@@ -3768,10 +3762,7 @@ class MyForm(settingsmixin.SMainWindow):
if not os.path.exists(state.appdata + 'avatars/'):
os.makedirs(state.appdata + 'avatars/')
hash = hashlib.md5(addBMIfNotPresent(addressAtCurrentRow)).hexdigest()
- extensions = [
- 'PNG', 'GIF', 'JPG', 'JPEG', 'SVG', 'BMP', 'MNG', 'PBM',
- 'PGM', 'PPM', 'TIFF', 'XBM', 'XPM', 'TGA']
-
+ # http://pyqt.sourceforge.net/Docs/PyQt4/qimagereader.html#supportedImageFormats
names = {
'BMP': 'Windows Bitmap',
'GIF': 'Graphic Interchange Format',
@@ -3786,11 +3777,12 @@ class MyForm(settingsmixin.SMainWindow):
'XBM': 'X11 Bitmap',
'XPM': 'X11 Pixmap',
'SVG': 'Scalable Vector Graphics',
- 'TGA': 'Targa Image Format'}
+ 'TGA': 'Targa Image Format'
+ }
filters = []
all_images_filter = []
current_files = []
- for ext in extensions:
+ for ext in names:
filters += [names[ext] + ' (*.' + ext.lower() + ')']
all_images_filter += ['*.' + ext.lower()]
upper = state.appdata + 'avatars/' + hash + '.' + ext.upper()
@@ -3801,10 +3793,9 @@ class MyForm(settingsmixin.SMainWindow):
current_files += [upper]
filters[0:0] = ['Image files (' + ' '.join(all_images_filter) + ')']
filters[1:1] = ['All files (*.*)']
- sourcefile = QtGui.QFileDialog.getOpenFileName(
+ sourcefile = QtWidgets.QFileDialog.getOpenFileName(
self, _translate("MainWindow", "Set avatar..."),
- filter=';;'.join(filters)
- )
+ filter=';;'.join(filters))[0]
# determine the correct filename (note that avatars don't use the suffix)
destination = state.appdata + 'avatars/' + hash + '.' + sourcefile.split('.')[-1]
exists = QtCore.QFile.exists(destination)
@@ -3813,11 +3804,11 @@ class MyForm(settingsmixin.SMainWindow):
if exists | (len(current_files) > 0):
displayMsg = _translate(
"MainWindow", "Do you really want to remove this avatar?")
- overwrite = QtGui.QMessageBox.question(
+ overwrite = QtWidgets.QMessageBox.question(
self, 'Message', displayMsg,
- QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
+ QtWidgets.QMessageBox.Yes, QtWidgets.QMessageBox.No)
else:
- overwrite = QtGui.QMessageBox.No
+ overwrite = QtWidgets.QMessageBox.No
else:
# ask whether to overwrite old avatar
if exists | (len(current_files) > 0):
@@ -3825,15 +3816,15 @@ class MyForm(settingsmixin.SMainWindow):
"MainWindow",
"You have already set an avatar for this address."
" Do you really want to overwrite it?")
- overwrite = QtGui.QMessageBox.question(
+ overwrite = QtWidgets.QMessageBox.question(
self, 'Message', displayMsg,
- QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
+ QtWidgets.QMessageBox.Yes, QtWidgets.QMessageBox.No)
else:
- overwrite = QtGui.QMessageBox.No
+ overwrite = QtWidgets.QMessageBox.No
# copy the image file to the appdata folder
- if (not exists) | (overwrite == QtGui.QMessageBox.Yes):
- if overwrite == QtGui.QMessageBox.Yes:
+ if (not exists) | (overwrite == QtWidgets.QMessageBox.Yes):
+ if overwrite == QtWidgets.QMessageBox.Yes:
for file in current_files:
QtCore.QFile.remove(file)
QtCore.QFile.remove(destination)
@@ -3861,20 +3852,20 @@ class MyForm(settingsmixin.SMainWindow):
self.setAddressSound(widget.item(widget.currentRow(), 0).text())
def setAddressSound(self, addr):
- filters = [unicode(_translate(
+ filters = [_translate(
"MainWindow", "Sound files (%s)" %
' '.join(['*%s%s' % (os.extsep, ext) for ext in sound.extensions])
- ))]
- sourcefile = unicode(QtGui.QFileDialog.getOpenFileName(
+ )]
+ sourcefile = QtWidgets.QFileDialog.getOpenFileName(
self, _translate("MainWindow", "Set notification sound..."),
filter=';;'.join(filters)
- ))
+ )[0]
if not sourcefile:
return
destdir = os.path.join(state.appdata, 'sounds')
- destfile = unicode(addr) + os.path.splitext(sourcefile)[-1]
+ destfile = addr.decode('utf-8') + os.path.splitext(sourcefile)[-1]
destination = os.path.join(destdir, destfile)
if sourcefile == destination:
@@ -3883,15 +3874,15 @@ class MyForm(settingsmixin.SMainWindow):
pattern = destfile.lower()
for item in os.listdir(destdir):
if item.lower() == pattern:
- overwrite = QtGui.QMessageBox.question(
+ overwrite = QtWidgets.QMessageBox.question(
self, _translate("MainWindow", "Message"),
_translate(
"MainWindow",
"You have already set a notification sound"
" for this address book entry."
" Do you really want to overwrite it?"),
- QtGui.QMessageBox.Yes, QtGui.QMessageBox.No
- ) == QtGui.QMessageBox.Yes
+ QtWidgets.QMessageBox.Yes, QtWidgets.QMessageBox.No
+ ) == QtWidgets.QMessageBox.Yes
if overwrite:
QtCore.QFile.remove(os.path.join(destdir, item))
break
@@ -3902,18 +3893,23 @@ class MyForm(settingsmixin.SMainWindow):
def on_context_menuYourIdentities(self, point):
currentItem = self.getCurrentItem()
- self.popMenuYourIdentities = QtGui.QMenu(self)
+ self.popMenuYourIdentities = QtWidgets.QMenu(self)
if isinstance(currentItem, Ui_AddressWidget):
self.popMenuYourIdentities.addAction(self.actionNewYourIdentities)
self.popMenuYourIdentities.addSeparator()
- self.popMenuYourIdentities.addAction(self.actionClipboardYourIdentities)
+ self.popMenuYourIdentities.addAction(
+ self.actionClipboardYourIdentities)
self.popMenuYourIdentities.addSeparator()
if currentItem.isEnabled:
- self.popMenuYourIdentities.addAction(self.actionDisableYourIdentities)
+ self.popMenuYourIdentities.addAction(
+ self.actionDisableYourIdentities)
else:
- self.popMenuYourIdentities.addAction(self.actionEnableYourIdentities)
- self.popMenuYourIdentities.addAction(self.actionSetAvatarYourIdentities)
- self.popMenuYourIdentities.addAction(self.actionSpecialAddressBehaviorYourIdentities)
+ self.popMenuYourIdentities.addAction(
+ self.actionEnableYourIdentities)
+ self.popMenuYourIdentities.addAction(
+ self.actionSetAvatarYourIdentities)
+ self.popMenuYourIdentities.addAction(
+ self.actionSpecialAddressBehaviorYourIdentities)
self.popMenuYourIdentities.addAction(self.actionEmailGateway)
self.popMenuYourIdentities.addSeparator()
if currentItem.type != AccountMixin.ALL:
@@ -3932,7 +3928,7 @@ class MyForm(settingsmixin.SMainWindow):
# TODO make one popMenu
def on_context_menuChan(self, point):
currentItem = self.getCurrentItem()
- self.popMenu = QtGui.QMenu(self)
+ self.popMenu = QtWidgets.QMenu(self)
if isinstance(currentItem, Ui_AddressWidget):
self.popMenu.addAction(self.actionNew)
self.popMenu.addAction(self.actionDelete)
@@ -3968,7 +3964,7 @@ class MyForm(settingsmixin.SMainWindow):
self.on_context_menuSent(point)
return
- self.popMenuInbox = QtGui.QMenu(self)
+ self.popMenuInbox = QtWidgets.QMenu(self)
self.popMenuInbox.addAction(self.actionForceHtml)
self.popMenuInbox.addAction(self.actionMarkUnread)
self.popMenuInbox.addSeparator()
@@ -4003,7 +3999,7 @@ class MyForm(settingsmixin.SMainWindow):
def on_context_menuSent(self, point):
currentRow = self.ui.tableWidgetInbox.currentRow()
- self.popMenuSent = QtGui.QMenu(self)
+ self.popMenuSent = QtWidgets.QMenu(self)
self.popMenuSent.addAction(self.actionSentClipboard)
self._contact_selected = self.ui.tableWidgetInbox.item(currentRow, 0)
# preloaded gui.menu plugins with prefix 'address'
@@ -4027,7 +4023,7 @@ class MyForm(settingsmixin.SMainWindow):
def inboxSearchLineEditUpdated(self, text):
# dynamic search for too short text is slow
- text = text.toUtf8()
+ text = text.encode('utf-8')
if 0 < len(text) < 3:
return
messagelist = self.getCurrentMessagelist()
@@ -4040,9 +4036,9 @@ class MyForm(settingsmixin.SMainWindow):
def inboxSearchLineEditReturnPressed(self):
logger.debug("Search return pressed")
- searchLine = self.getCurrentSearchLine()
+ searchLine = self.getCurrentSearchLine().encode('utf-8')
messagelist = self.getCurrentMessagelist()
- if messagelist and len(str(searchLine)) < 3:
+ if messagelist and len(searchLine) < 3:
searchOption = self.getCurrentSearchOption()
account = self.getCurrentAccount()
folder = self.getCurrentFolder()
@@ -4084,7 +4080,7 @@ class MyForm(settingsmixin.SMainWindow):
if item.type == AccountMixin.ALL:
return
- newLabel = unicode(item.text(0), 'utf-8', 'ignore')
+ newLabel = item.text(0)
oldLabel = item.defaultLabel()
# unchanged, do not do anything either
@@ -4103,7 +4099,9 @@ class MyForm(settingsmixin.SMainWindow):
self.rerenderMessagelistFromLabels()
if item.type != AccountMixin.SUBSCRIPTION:
self.rerenderMessagelistToLabels()
- if item.type in (AccountMixin.NORMAL, AccountMixin.CHAN, AccountMixin.SUBSCRIPTION):
+ if item.type in (
+ AccountMixin.NORMAL, AccountMixin.CHAN, AccountMixin.SUBSCRIPTION
+ ):
self.rerenderAddressBook()
self.recurDepth -= 1
@@ -4116,17 +4114,19 @@ class MyForm(settingsmixin.SMainWindow):
folder = self.getCurrentFolder()
if msgid:
queryreturn = sqlQuery(
- '''SELECT message FROM %s WHERE %s=?''' % (
+ 'SELECT message FROM %s WHERE %s=?' % (
('sent', 'ackdata') if folder == 'sent'
else ('inbox', 'msgid')
), msgid
)
try:
- message = queryreturn[-1][0]
+ message = queryreturn[-1][0].decode('utf-8')
except NameError:
- message = ""
+ message = u''
except IndexError:
+ # _translate() often returns unicode, no redefinition here!
+ # pylint: disable=redefined-variable-type
message = _translate(
"MainWindow",
"Error occurred: could not load message from disk."
@@ -4139,7 +4139,7 @@ class MyForm(settingsmixin.SMainWindow):
self.updateUnreadStatus(tableWidget, currentRow, msgid)
# propagate
if folder != 'sent' and sqlExecute(
- '''UPDATE inbox SET read=1 WHERE msgid=? AND read=0''',
+ 'UPDATE inbox SET read=1 WHERE msgid=? AND read=0',
msgid
) > 0:
self.propagateUnreadCount()
@@ -4155,8 +4155,9 @@ class MyForm(settingsmixin.SMainWindow):
self.rerenderMessagelistToLabels()
completerList = self.ui.lineEditTo.completer().model().stringList()
for i in range(len(completerList)):
- if unicode(completerList[i]).endswith(" <" + item.address + ">"):
- completerList[i] = item.label + " <" + item.address + ">"
+ address_block = " <" + item.address + ">"
+ if completerList[i].endswith(address_block):
+ completerList[i] = item.label + address_block
self.ui.lineEditTo.completer().model().setStringList(completerList)
def tabWidgetCurrentChanged(self, n):
@@ -4221,7 +4222,7 @@ app = None
myapp = None
-class BitmessageQtApplication(QtGui.QApplication):
+class BitmessageQtApplication(QtWidgets.QApplication):
"""
Listener to allow our Qt form to get focus when another instance of the
application is open.
@@ -4244,15 +4245,15 @@ class BitmessageQtApplication(QtGui.QApplication):
self.server = None
self.is_running = False
- socket = QLocalSocket()
+ socket = QtNetwork.QLocalSocket()
socket.connectToServer(id)
self.is_running = socket.waitForConnected()
# Cleanup past crashed servers
if not self.is_running:
- if socket.error() == QLocalSocket.ConnectionRefusedError:
+ if socket.error() == QtNetwork.QLocalSocket.ConnectionRefusedError:
socket.disconnectFromServer()
- QLocalServer.removeServer(id)
+ QtNetwork.QLocalServer.removeServer(id)
socket.abort()
@@ -4263,16 +4264,12 @@ class BitmessageQtApplication(QtGui.QApplication):
else:
# Nope, create a local server with this id and assign on_new_connection
# for whenever a second instance tries to run focus the application.
- self.server = QLocalServer()
+ self.server = QtNetwork.QLocalServer()
self.server.listen(id)
self.server.newConnection.connect(self.on_new_connection)
self.setStyleSheet("QStatusBar::item { border: 0px solid black }")
- def __del__(self):
- if self.server:
- self.server.close()
-
def on_new_connection(self):
if myapp:
myapp.appIndicatorShow()
diff --git a/src/bitmessageqt/account.py b/src/bitmessageqt/account.py
index 8c82c6f6..18586610 100644
--- a/src/bitmessageqt/account.py
+++ b/src/bitmessageqt/account.py
@@ -1,28 +1,21 @@
-# pylint: disable=too-many-instance-attributes,attribute-defined-outside-init
"""
-account.py
-==========
-
Account related functions.
"""
-from __future__ import absolute_import
-
import inspect
import re
import sys
import time
-from PyQt4 import QtGui
-
import queues
from addresses import decodeAddress
from bmconfigparser import config
from helper_ackPayload import genAckPayload
from helper_sql import sqlQuery, sqlExecute
-from .foldertree import AccountMixin
-from .utils import str_broadcast_subscribers
+from foldertree import AccountMixin
+from utils import str_broadcast_subscribers
+from tr import _translate
def getSortedSubscriptions(count=False):
@@ -34,22 +27,21 @@ def getSortedSubscriptions(count=False):
:retuns: dict keys are addresses, values are dicts containing settings
:rtype: dict, default {}
"""
- queryreturn = sqlQuery('SELECT label, address, enabled FROM subscriptions ORDER BY label COLLATE NOCASE ASC')
+ queryreturn = sqlQuery(
+ 'SELECT label, address, enabled FROM subscriptions'
+ ' ORDER BY label COLLATE NOCASE ASC')
ret = {}
- for row in queryreturn:
- label, address, enabled = row
- ret[address] = {}
- ret[address]["inbox"] = {}
- ret[address]["inbox"]['label'] = label
- ret[address]["inbox"]['enabled'] = enabled
- ret[address]["inbox"]['count'] = 0
+ for label, address, enabled in queryreturn:
+ ret[address] = {'inbox': {}}
+ ret[address]['inbox'].update(label=label, enabled=enabled, count=0)
if count:
- queryreturn = sqlQuery('''SELECT fromaddress, folder, count(msgid) as cnt
- FROM inbox, subscriptions ON subscriptions.address = inbox.fromaddress
- WHERE read = 0 AND toaddress = ?
- GROUP BY inbox.fromaddress, folder''', str_broadcast_subscribers)
- for row in queryreturn:
- address, folder, cnt = row
+ queryreturn = sqlQuery(
+ 'SELECT fromaddress, folder, count(msgid) AS cnt'
+ ' FROM inbox, subscriptions'
+ ' ON subscriptions.address = inbox.fromaddress WHERE read = 0'
+ ' AND toaddress = ? GROUP BY inbox.fromaddress, folder',
+ str_broadcast_subscribers)
+ for address, folder, cnt in queryreturn:
if folder not in ret[address]:
ret[address][folder] = {
'label': ret[address]['inbox']['label'],
@@ -75,7 +67,8 @@ def accountClass(address):
return subscription
try:
gateway = config.get(address, "gateway")
- for _, cls in inspect.getmembers(sys.modules[__name__], inspect.isclass):
+ for _, cls in inspect.getmembers(
+ sys.modules[__name__], inspect.isclass):
if issubclass(cls, GatewayAccount) and cls.gatewayName == gateway:
return cls(address)
# general gateway
@@ -86,7 +79,7 @@ def accountClass(address):
return BMAccount(address)
-class AccountColor(AccountMixin): # pylint: disable=too-few-public-methods
+class AccountColor(AccountMixin):
"""Set the type of account"""
def __init__(self, address, address_type=None):
@@ -100,7 +93,9 @@ class AccountColor(AccountMixin): # pylint: disable=too-few-public-methods
elif config.safeGetBoolean(self.address, 'chan'):
self.type = AccountMixin.CHAN
elif sqlQuery(
- '''select label from subscriptions where address=?''', self.address):
+ 'SELECT label FROM subscriptions WHERE address=?',
+ self.address
+ ):
self.type = AccountMixin.SUBSCRIPTION
else:
self.type = AccountMixin.NORMAL
@@ -108,12 +103,35 @@ class AccountColor(AccountMixin): # pylint: disable=too-few-public-methods
self.type = address_type
-class BMAccount(object):
- """Encapsulate a Bitmessage account"""
-
+class NoAccount(object):
+ """Minimal account like object (All accounts)"""
+ # pylint: disable=too-many-instance-attributes
def __init__(self, address=None):
self.address = address
self.type = AccountMixin.NORMAL
+ self.toAddress = self.fromAddress = ''
+ self.subject = self.message = ''
+ self.fromLabel = self.toLabel = ''
+
+ def getLabel(self, address=None):
+ """Get a label for this bitmessage account"""
+ return address or self.address
+
+ def parseMessage(self, toAddress, fromAddress, subject, message):
+ """Set metadata and address labels on self"""
+ self.toAddress = toAddress
+ self.fromAddress = fromAddress
+ self.subject = subject
+ self.message = message
+ self.fromLabel = self.getLabel(fromAddress)
+ self.toLabel = self.getLabel(toAddress)
+
+
+class BMAccount(NoAccount):
+ """Encapsulate a Bitmessage account"""
+
+ def __init__(self, address=None):
+ super(BMAccount, self).__init__(address)
if config.has_section(address):
if config.safeGetBoolean(self.address, 'chan'):
self.type = AccountMixin.CHAN
@@ -121,55 +139,25 @@ class BMAccount(object):
self.type = AccountMixin.MAILINGLIST
elif self.address == str_broadcast_subscribers:
self.type = AccountMixin.BROADCAST
- else:
- queryreturn = sqlQuery(
- '''select label from subscriptions where address=?''', self.address)
- if queryreturn:
- self.type = AccountMixin.SUBSCRIPTION
+ elif sqlQuery(
+ 'SELECT label FROM subscriptions WHERE address=?', self.address
+ ):
+ self.type = AccountMixin.SUBSCRIPTION
def getLabel(self, address=None):
"""Get a label for this bitmessage account"""
- if address is None:
- address = self.address
+ address = super(BMAccount, self).getLabel(address)
label = config.safeGet(address, 'label', address)
queryreturn = sqlQuery(
- '''select label from addressbook where address=?''', address)
- if queryreturn != []:
- for row in queryreturn:
- label, = row
+ 'SELECT label FROM addressbook WHERE address=?', address)
+ if queryreturn:
+ label = queryreturn[-1][0]
else:
queryreturn = sqlQuery(
- '''select label from subscriptions where address=?''', address)
- if queryreturn != []:
- for row in queryreturn:
- label, = row
- return label
-
- def parseMessage(self, toAddress, fromAddress, subject, message):
- """Set metadata and address labels on self"""
-
- self.toAddress = toAddress
- self.fromAddress = fromAddress
- if isinstance(subject, unicode):
- self.subject = str(subject)
- else:
- self.subject = subject
- self.message = message
- self.fromLabel = self.getLabel(fromAddress)
- self.toLabel = self.getLabel(toAddress)
-
-
-class NoAccount(BMAccount):
- """Override the __init__ method on a BMAccount"""
-
- def __init__(self, address=None): # pylint: disable=super-init-not-called
- self.address = address
- self.type = AccountMixin.NORMAL
-
- def getLabel(self, address=None):
- if address is None:
- address = self.address
- return address
+ 'SELECT label FROM subscriptions WHERE address=?', address)
+ if queryreturn:
+ label = queryreturn[-1][0]
+ return label.decode('utf-8')
class SubscriptionAccount(BMAccount):
@@ -189,15 +177,11 @@ class GatewayAccount(BMAccount):
ALL_OK = 0
REGISTRATION_DENIED = 1
- def __init__(self, address):
- super(GatewayAccount, self).__init__(address)
-
def send(self):
- """Override the send method for gateway accounts"""
-
- # pylint: disable=unused-variable
- status, addressVersionNumber, streamNumber, ripe = decodeAddress(self.toAddress)
- stealthLevel = config.safeGetInt('bitmessagesettings', 'ackstealthlevel')
+ """The send method for gateway accounts"""
+ streamNumber, ripe = decodeAddress(self.toAddress)[2:]
+ stealthLevel = config.safeGetInt(
+ 'bitmessagesettings', 'ackstealthlevel')
ackdata = genAckPayload(streamNumber, stealthLevel)
sqlExecute(
'''INSERT INTO sent VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)''',
@@ -270,10 +254,9 @@ class MailchuckAccount(GatewayAccount):
def settings(self):
"""settings specific to a MailchuckAccount"""
-
self.toAddress = self.registrationAddress
self.subject = "config"
- self.message = QtGui.QApplication.translate(
+ self.message = _translate(
"Mailchuck",
"""# You can use this to configure your email gateway account
# Uncomment the setting you want to use
@@ -319,8 +302,9 @@ class MailchuckAccount(GatewayAccount):
def parseMessage(self, toAddress, fromAddress, subject, message):
"""parseMessage specific to a MailchuckAccount"""
-
- super(MailchuckAccount, self).parseMessage(toAddress, fromAddress, subject, message)
+ super(MailchuckAccount, self).parseMessage(
+ toAddress, fromAddress, subject, message
+ )
if fromAddress == self.relayAddress:
matches = self.regExpIncoming.search(subject)
if matches is not None:
@@ -341,6 +325,7 @@ class MailchuckAccount(GatewayAccount):
self.toLabel = matches.group(1)
self.toAddress = matches.group(1)
self.feedback = self.ALL_OK
- if fromAddress == self.registrationAddress and self.subject == "Registration Request Denied":
+ if fromAddress == self.registrationAddress \
+ and self.subject == "Registration Request Denied":
self.feedback = self.REGISTRATION_DENIED
return self.feedback
diff --git a/src/bitmessageqt/address_dialogs.py b/src/bitmessageqt/address_dialogs.py
index bf571041..903b588a 100644
--- a/src/bitmessageqt/address_dialogs.py
+++ b/src/bitmessageqt/address_dialogs.py
@@ -1,40 +1,39 @@
"""
Dialogs that work with BM address.
"""
-# pylint: disable=attribute-defined-outside-init,too-few-public-methods,relative-import
+# pylint: disable=too-few-public-methods
+# https://github.com/PyCQA/pylint/issues/471
import hashlib
-from PyQt4 import QtCore, QtGui
+from qtpy import QtGui, QtWidgets
import queues
import widgets
import state
-from account import AccountMixin, GatewayAccount, MailchuckAccount, accountClass
+from account import (
+ GatewayAccount, MailchuckAccount, AccountMixin, accountClass
+)
from addresses import addBMIfNotPresent, decodeAddress, encodeVarint
from bmconfigparser import config as global_config
from tr import _translate
class AddressCheckMixin(object):
- """Base address validation class for QT UI"""
+ """Base address validation class for Qt UI"""
- def __init__(self):
+ def _setup(self):
self.valid = False
- QtCore.QObject.connect( # pylint: disable=no-member
- self.lineEditAddress,
- QtCore.SIGNAL("textChanged(QString)"),
- self.addressChanged)
+ self.lineEditAddress.textChanged.connect(self.addressChanged)
def _onSuccess(self, addressVersion, streamNumber, ripe):
pass
- def addressChanged(self, QString):
+ def addressChanged(self, address):
"""
Address validation callback, performs validation and gives feedback
"""
- status, addressVersion, streamNumber, ripe = decodeAddress(
- str(QString))
+ status, addressVersion, streamNumber, ripe = decodeAddress(address)
self.valid = status == 'success'
if self.valid:
self.labelAddressCheck.setText(
@@ -79,19 +78,27 @@ class AddressCheckMixin(object):
))
-class AddressDataDialog(QtGui.QDialog, AddressCheckMixin):
- """QDialog with Bitmessage address validation"""
+class AddressDataDialog(QtWidgets.QDialog, AddressCheckMixin):
+ """
+ Base class for a dialog getting BM-address data.
+ Corresponding ui-file should define two fields:
+ lineEditAddress - for the address
+ lineEditLabel - for it's label
+ After address validation the values of that fields are put into
+ the data field of the dialog.
+ """
def __init__(self, parent):
super(AddressDataDialog, self).__init__(parent)
self.parent = parent
+ self.data = None
def accept(self):
- """Callback for QDIalog accepting value"""
+ """Callback for QDialog accepting value"""
if self.valid:
self.data = (
addBMIfNotPresent(str(self.lineEditAddress.text())),
- str(self.lineEditLabel.text().toUtf8())
+ self.lineEditLabel.text().encode('utf-8')
)
else:
queues.UISignalQueue.put(('updateStatusBar', _translate(
@@ -107,12 +114,12 @@ class AddAddressDialog(AddressDataDialog):
def __init__(self, parent=None, address=None):
super(AddAddressDialog, self).__init__(parent)
widgets.load('addaddressdialog.ui', self)
- AddressCheckMixin.__init__(self)
+ self._setup()
if address:
self.lineEditAddress.setText(address)
-class NewAddressDialog(QtGui.QDialog):
+class NewAddressDialog(QtWidgets.QDialog):
"""QDialog for generating a new address"""
def __init__(self, parent=None):
@@ -125,7 +132,7 @@ class NewAddressDialog(QtGui.QDialog):
self.radioButtonExisting.click()
self.comboBoxExisting.addItem(address)
self.groupBoxDeterministic.setHidden(True)
- QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self))
+ QtWidgets.QWidget.resize(self, QtWidgets.QWidget.sizeHint(self))
self.show()
def accept(self):
@@ -142,13 +149,13 @@ class NewAddressDialog(QtGui.QDialog):
self.comboBoxExisting.currentText())[2]
queues.addressGeneratorQueue.put((
'createRandomAddress', 4, streamNumberForAddress,
- str(self.newaddresslabel.text().toUtf8()), 1, "",
+ self.newaddresslabel.text().encode('utf-8'), 1, "",
self.checkBoxEighteenByteRipe.isChecked()
))
else:
if self.lineEditPassphrase.text() != \
self.lineEditPassphraseAgain.text():
- QtGui.QMessageBox.about(
+ QtWidgets.QMessageBox.about(
self, _translate("MainWindow", "Passphrase mismatch"),
_translate(
"MainWindow",
@@ -156,7 +163,7 @@ class NewAddressDialog(QtGui.QDialog):
" match. Try again.")
)
elif self.lineEditPassphrase.text() == "":
- QtGui.QMessageBox.about(
+ QtWidgets.QMessageBox.about(
self, _translate("MainWindow", "Choose a passphrase"),
_translate(
"MainWindow", "You really do need a passphrase.")
@@ -169,7 +176,7 @@ class NewAddressDialog(QtGui.QDialog):
'createDeterministicAddresses', 4, streamNumberForAddress,
"unused deterministic address",
self.spinBoxNumberOfAddressesToMake.value(),
- self.lineEditPassphrase.text().toUtf8(),
+ self.lineEditPassphrase.text().encode('utf-8'),
self.checkBoxEighteenByteRipe.isChecked()
))
@@ -180,7 +187,8 @@ class NewSubscriptionDialog(AddressDataDialog):
def __init__(self, parent=None):
super(NewSubscriptionDialog, self).__init__(parent)
widgets.load('newsubscriptiondialog.ui', self)
- AddressCheckMixin.__init__(self)
+ self.recent = []
+ self._setup()
def _onSuccess(self, addressVersion, streamNumber, ripe):
if addressVersion <= 3:
@@ -211,22 +219,21 @@ class NewSubscriptionDialog(AddressDataDialog):
_translate(
"MainWindow",
"Display the %n recent broadcast(s) from this address.",
- None,
- QtCore.QCoreApplication.CodecForTr,
- count
+ None, count
))
-class RegenerateAddressesDialog(QtGui.QDialog):
+class RegenerateAddressesDialog(QtWidgets.QDialog):
"""QDialog for regenerating deterministic addresses"""
+
def __init__(self, parent=None):
super(RegenerateAddressesDialog, self).__init__(parent)
widgets.load('regenerateaddresses.ui', self)
self.groupBox.setTitle('')
- QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self))
+ QtWidgets.QWidget.resize(self, QtWidgets.QWidget.sizeHint(self))
-class SpecialAddressBehaviorDialog(QtGui.QDialog):
+class SpecialAddressBehaviorDialog(QtWidgets.QDialog):
"""
QDialog for special address behaviour (e.g. mailing list functionality)
"""
@@ -257,12 +264,12 @@ class SpecialAddressBehaviorDialog(QtGui.QDialog):
self.radioButtonBehaviorMailingList.click()
else:
self.radioButtonBehaveNormalAddress.click()
- mailingListName = config.safeGet(self.address, 'mailinglistname', '')
+ mailingListName = config.safeGet(
+ self.address, 'mailinglistname', '')
self.lineEditMailingListName.setText(
- unicode(mailingListName, 'utf-8')
- )
+ mailingListName.decode('utf-8'))
- QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self))
+ QtWidgets.QWidget.resize(self, QtWidgets.QWidget.sizeHint(self))
self.show()
def accept(self):
@@ -275,14 +282,15 @@ class SpecialAddressBehaviorDialog(QtGui.QDialog):
# Set the color to either black or grey
if self.config.getboolean(self.address, 'enabled'):
self.parent.setCurrentItemColor(
- QtGui.QApplication.palette().text().color()
+ QtWidgets.QApplication.palette().text().color()
)
else:
self.parent.setCurrentItemColor(QtGui.QColor(128, 128, 128))
else:
self.config.set(str(self.address), 'mailinglist', 'true')
- self.config.set(str(self.address), 'mailinglistname', str(
- self.lineEditMailingListName.text().toUtf8()))
+ self.config.set(
+ str(self.address), 'mailinglistname',
+ self.lineEditMailingListName.text().encode('utf-8'))
self.parent.setCurrentItemColor(
QtGui.QColor(137, 4, 177)) # magenta
self.parent.rerenderComboBoxSendFrom()
@@ -291,13 +299,15 @@ class SpecialAddressBehaviorDialog(QtGui.QDialog):
self.parent.rerenderMessagelistToLabels()
-class EmailGatewayDialog(QtGui.QDialog):
+class EmailGatewayDialog(QtWidgets.QDialog):
"""QDialog for email gateway control"""
+
def __init__(self, parent, config=global_config, account=None):
super(EmailGatewayDialog, self).__init__(parent)
widgets.load('emailgateway.ui', self)
self.parent = parent
self.config = config
+ self.data = None
if account:
self.acct = account
self.setWindowTitle(_translate(
@@ -330,7 +340,7 @@ class EmailGatewayDialog(QtGui.QDialog):
else:
self.acct = MailchuckAccount(address)
self.lineEditEmail.setFocus()
- QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self))
+ QtWidgets.QWidget.resize(self, QtWidgets.QWidget.sizeHint(self))
def accept(self):
"""Accept callback"""
@@ -344,7 +354,7 @@ class EmailGatewayDialog(QtGui.QDialog):
if self.radioButtonRegister.isChecked() \
or self.radioButtonRegister.isHidden():
- email = str(self.lineEditEmail.text().toUtf8())
+ email = self.lineEditEmail.text().encode('utf-8')
self.acct.register(email)
self.config.set(self.acct.fromAddress, 'label', email)
self.config.set(self.acct.fromAddress, 'gateway', 'mailchuck')
diff --git a/src/bitmessageqt/addressvalidator.py b/src/bitmessageqt/addressvalidator.py
index dc61b41c..600347c6 100644
--- a/src/bitmessageqt/addressvalidator.py
+++ b/src/bitmessageqt/addressvalidator.py
@@ -1,11 +1,12 @@
"""
-Address validator module.
+The validator for address and passphrase QLineEdits
+used in `.dialogs.NewChanDialog`.
"""
-# pylint: disable=too-many-branches,too-many-arguments
+# pylint: disable=too-many-arguments
from Queue import Empty
-from PyQt4 import QtGui
+from qtpy import QtGui
from addresses import decodeAddress, addBMIfNotPresent
from bmconfigparser import config
@@ -17,22 +18,18 @@ from utils import str_chan
class AddressPassPhraseValidatorMixin(object):
"""Bitmessage address or passphrase validator class for Qt UI"""
def setParams(
- self,
- passPhraseObject=None,
- addressObject=None,
- feedBackObject=None,
- buttonBox=None,
- addressMandatory=True,
+ self, passPhraseObject=None, addressObject=None,
+ feedBackObject=None, button=None, addressMandatory=True
):
- """Initialisation"""
+ """Initialization"""
self.addressObject = addressObject
self.passPhraseObject = passPhraseObject
self.feedBackObject = feedBackObject
- self.buttonBox = buttonBox
self.addressMandatory = addressMandatory
self.isValid = False
# save default text
- self.okButtonLabel = self.buttonBox.button(QtGui.QDialogButtonBox.Ok).text()
+ self.okButton = button
+ self.okButtonLabel = button.text()
def setError(self, string):
"""Indicate that the validation is pending or failed"""
@@ -43,13 +40,13 @@ class AddressPassPhraseValidatorMixin(object):
self.feedBackObject.setStyleSheet("QLabel { color : red; }")
self.feedBackObject.setText(string)
self.isValid = False
- if self.buttonBox:
- self.buttonBox.button(QtGui.QDialogButtonBox.Ok).setEnabled(False)
+ if self.okButton:
+ self.okButton.setEnabled(False)
if string is not None and self.feedBackObject is not None:
- self.buttonBox.button(QtGui.QDialogButtonBox.Ok).setText(
+ self.okButton.setText(
_translate("AddressValidator", "Invalid"))
else:
- self.buttonBox.button(QtGui.QDialogButtonBox.Ok).setText(
+ self.okButton.setText(
_translate("AddressValidator", "Validating..."))
def setOK(self, string):
@@ -61,9 +58,9 @@ class AddressPassPhraseValidatorMixin(object):
self.feedBackObject.setStyleSheet("QLabel { }")
self.feedBackObject.setText(string)
self.isValid = True
- if self.buttonBox:
- self.buttonBox.button(QtGui.QDialogButtonBox.Ok).setEnabled(True)
- self.buttonBox.button(QtGui.QDialogButtonBox.Ok).setText(self.okButtonLabel)
+ if self.okButton:
+ self.okButton.setEnabled(True)
+ self.okButton.setText(self.okButtonLabel)
def checkQueue(self):
"""Validator queue loop"""
@@ -76,7 +73,8 @@ class AddressPassPhraseValidatorMixin(object):
while True:
try:
- addressGeneratorReturnValue = apiAddressGeneratorReturnQueue.get(False)
+ addressGeneratorReturnValue = \
+ apiAddressGeneratorReturnQueue.get(False)
except Empty:
if gotOne:
break
@@ -86,96 +84,120 @@ class AddressPassPhraseValidatorMixin(object):
gotOne = True
if not addressGeneratorReturnValue:
- self.setError(_translate("AddressValidator", "Address already present as one of your identities."))
- return (QtGui.QValidator.Intermediate, 0)
- if addressGeneratorReturnValue[0] == 'chan name does not match address':
- self.setError(
- _translate(
- "AddressValidator",
- "Although the Bitmessage address you "
- "entered was valid, it doesn't match the chan name."))
- return (QtGui.QValidator.Intermediate, 0)
- self.setOK(_translate("MainWindow", "Passphrase and address appear to be valid."))
+ self.setError(_translate(
+ "AddressValidator",
+ "Address already present as one of your identities."
+ ))
+ return
+ if addressGeneratorReturnValue[0] == \
+ 'chan name does not match address':
+ self.setError(_translate(
+ "AddressValidator",
+ "Although the Bitmessage address you entered was valid,"
+ " it doesn\'t match the chan name."
+ ))
+ return
+ self.setOK(_translate(
+ "MainWindow", "Passphrase and address appear to be valid."))
def returnValid(self):
"""Return the value of whether the validation was successful"""
- if self.isValid:
- return QtGui.QValidator.Acceptable
- return QtGui.QValidator.Intermediate
+ return QtGui.QValidator.Acceptable if self.isValid \
+ else QtGui.QValidator.Intermediate
def validate(self, s, pos):
"""Top level validator method"""
- if self.addressObject is None:
+ try:
+ address = self.addressObject.text().encode('utf-8')
+ except AttributeError:
address = None
- else:
- address = str(self.addressObject.text().toUtf8())
- if address == "":
- address = None
- if self.passPhraseObject is None:
+ try:
+ passPhrase = self.passPhraseObject.text().encode('utf-8')
+ except AttributeError:
passPhrase = ""
- else:
- passPhrase = str(self.passPhraseObject.text().toUtf8())
- if passPhrase == "":
- passPhrase = None
# no chan name
- if passPhrase is None:
- self.setError(_translate("AddressValidator", "Chan name/passphrase needed. You didn't enter a chan name."))
- return (QtGui.QValidator.Intermediate, pos)
+ if not passPhrase:
+ self.setError(_translate(
+ "AddressValidator",
+ "Chan name/passphrase needed. You didn't enter a chan name."
+ ))
+ return (QtGui.QValidator.Intermediate, s, pos)
- if self.addressMandatory or address is not None:
+ if self.addressMandatory or address:
# check if address already exists:
- if address in config.addresses():
- self.setError(_translate("AddressValidator", "Address already present as one of your identities."))
- return (QtGui.QValidator.Intermediate, pos)
+ if address in config.addresses(True):
+ self.setError(_translate(
+ "AddressValidator",
+ "Address already present as one of your identities."
+ ))
+ return (QtGui.QValidator.Intermediate, s, pos)
+ status = decodeAddress(address)[0]
# version too high
- if decodeAddress(address)[0] == 'versiontoohigh':
- self.setError(
- _translate(
- "AddressValidator",
- "Address too new. Although that Bitmessage"
- " address might be valid, its version number"
- " is too new for us to handle. Perhaps you need"
- " to upgrade Bitmessage."))
- return (QtGui.QValidator.Intermediate, pos)
-
+ if status == 'versiontoohigh':
+ self.setError(_translate(
+ "AddressValidator",
+ "Address too new. Although that Bitmessage address"
+ " might be valid, its version number is too new"
+ " for us to handle. Perhaps you need to upgrade"
+ " Bitmessage."
+ ))
+ return (QtGui.QValidator.Intermediate, s, pos)
# invalid
- if decodeAddress(address)[0] != 'success':
- self.setError(_translate("AddressValidator", "The Bitmessage address is not valid."))
- return (QtGui.QValidator.Intermediate, pos)
+ if status != 'success':
+ self.setError(_translate(
+ "AddressValidator",
+ "The Bitmessage address is not valid."
+ ))
+ return (QtGui.QValidator.Intermediate, s, pos)
# this just disables the OK button without changing the feedback text
# but only if triggered by textEdited, not by clicking the Ok button
- if not self.buttonBox.button(QtGui.QDialogButtonBox.Ok).hasFocus():
+ if not self.okButton.hasFocus():
self.setError(None)
# check through generator
- if address is None:
- addressGeneratorQueue.put(('createChan', 4, 1, str_chan + ' ' + str(passPhrase), passPhrase, False))
+ if not address:
+ addressGeneratorQueue.put((
+ 'createChan', 4, 1,
+ str_chan + ' ' + passPhrase, passPhrase, False
+ ))
else:
- addressGeneratorQueue.put(
- ('joinChan', addBMIfNotPresent(address),
- "{} {}".format(str_chan, passPhrase), passPhrase, False))
+ addressGeneratorQueue.put((
+ 'joinChan', addBMIfNotPresent(address),
+ "{} {}".format(str_chan, passPhrase), passPhrase, False
+ ))
- if self.buttonBox.button(QtGui.QDialogButtonBox.Ok).hasFocus():
- return (self.returnValid(), pos)
- return (QtGui.QValidator.Intermediate, pos)
+ if self.okButton.hasFocus():
+ return (self.returnValid(), s, pos)
+ else:
+ return (QtGui.QValidator.Intermediate, s, pos)
def checkData(self):
"""Validator Qt signal interface"""
- return self.validate("", 0)
+ return self.validate(u"", 0)
class AddressValidator(QtGui.QValidator, AddressPassPhraseValidatorMixin):
"""AddressValidator class for Qt UI"""
- def __init__(self, parent=None, passPhraseObject=None, feedBackObject=None, buttonBox=None, addressMandatory=True):
+ def __init__(
+ self, parent=None, passPhraseObject=None, feedBackObject=None,
+ button=None, addressMandatory=True
+ ):
super(AddressValidator, self).__init__(parent)
- self.setParams(passPhraseObject, parent, feedBackObject, buttonBox, addressMandatory)
+ self.setParams(
+ passPhraseObject, parent, feedBackObject, button,
+ addressMandatory)
class PassPhraseValidator(QtGui.QValidator, AddressPassPhraseValidatorMixin):
"""PassPhraseValidator class for Qt UI"""
- def __init__(self, parent=None, addressObject=None, feedBackObject=None, buttonBox=None, addressMandatory=False):
+ def __init__(
+ self, parent=None, addressObject=None, feedBackObject=None,
+ button=None, addressMandatory=False
+ ):
super(PassPhraseValidator, self).__init__(parent)
- self.setParams(parent, addressObject, feedBackObject, buttonBox, addressMandatory)
+ self.setParams(
+ parent, addressObject, feedBackObject, button,
+ addressMandatory)
diff --git a/src/bitmessageqt/bitmessage_icons_rc.py b/src/bitmessageqt/bitmessage_icons_rc.py
index bb0a02c0..68404748 100644
--- a/src/bitmessageqt/bitmessage_icons_rc.py
+++ b/src/bitmessageqt/bitmessage_icons_rc.py
@@ -7,7 +7,7 @@
#
# WARNING! All changes made in this file will be lost!
-from PyQt4 import QtCore
+from qtpy import QtCore
qt_resource_data = "\
\x00\x00\x03\x66\
@@ -1666,10 +1666,15 @@ qt_resource_struct = "\
\x00\x00\x01\xe6\x00\x00\x00\x00\x00\x01\x00\x00\x34\xdf\
"
+
def qInitResources():
- QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
+ QtCore.qRegisterResourceData(
+ 0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
+
def qCleanupResources():
- QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
+ QtCore.qUnregisterResourceData(
+ 0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
+
qInitResources()
diff --git a/src/bitmessageqt/bitmessageui.py b/src/bitmessageqt/bitmessageui.py
index 961fc093..7a034dfa 100644
--- a/src/bitmessageqt/bitmessageui.py
+++ b/src/bitmessageqt/bitmessageui.py
@@ -1,13 +1,8 @@
-# -*- coding: utf-8 -*-
+# pylint: skip-file
+# flake8: noqa
-# Form implementation generated from reading ui file 'bitmessageui.ui'
-#
-# Created: Mon Mar 23 22:18:07 2015
-# by: PyQt4 UI code generator 4.10.4
-#
-# WARNING! All changes made in this file will be lost!
-
-from PyQt4 import QtCore, QtGui
+from qtpy import QtCore, QtGui, QtWidgets
+from tr import _translate
from bmconfigparser import config
from foldertree import AddressBookCompleter
from messageview import MessageView
@@ -16,44 +11,23 @@ import settingsmixin
from networkstatus import NetworkStatus
from blacklist import Blacklist
-try:
- _fromUtf8 = QtCore.QString.fromUtf8
-except AttributeError:
- def _fromUtf8(s):
- return s
-
-try:
- _encoding = QtGui.QApplication.UnicodeUTF8
-
- def _translate(context, text, disambig, encoding=QtCore.QCoreApplication.CodecForTr, n=None):
- if n is None:
- return QtGui.QApplication.translate(context, text, disambig, _encoding)
- else:
- return QtGui.QApplication.translate(context, text, disambig, _encoding, n)
-except AttributeError:
- def _translate(context, text, disambig, encoding=QtCore.QCoreApplication.CodecForTr, n=None):
- if n is None:
- return QtGui.QApplication.translate(context, text, disambig)
- else:
- return QtGui.QApplication.translate(context, text, disambig, QtCore.QCoreApplication.CodecForTr, n)
+import bitmessage_icons_rc
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
- MainWindow.setObjectName(_fromUtf8("MainWindow"))
+ MainWindow.setObjectName("MainWindow")
MainWindow.resize(885, 580)
icon = QtGui.QIcon()
- icon.addPixmap(
- QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-24px.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off
- )
+ icon.addPixmap(QtGui.QPixmap(":/newPrefix/images/can-icon-24px.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
MainWindow.setWindowIcon(icon)
- MainWindow.setTabShape(QtGui.QTabWidget.Rounded)
- self.centralwidget = QtGui.QWidget(MainWindow)
- self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
- self.gridLayout_10 = QtGui.QGridLayout(self.centralwidget)
- self.gridLayout_10.setObjectName(_fromUtf8("gridLayout_10"))
- self.tabWidget = QtGui.QTabWidget(self.centralwidget)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
+ MainWindow.setTabShape(QtWidgets.QTabWidget.Rounded)
+ self.centralwidget = QtWidgets.QWidget(MainWindow)
+ self.centralwidget.setObjectName("centralwidget")
+ self.gridLayout_10 = QtWidgets.QGridLayout(self.centralwidget)
+ self.gridLayout_10.setObjectName("gridLayout_10")
+ self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth())
@@ -63,29 +37,27 @@ class Ui_MainWindow(object):
font = QtGui.QFont()
font.setPointSize(9)
self.tabWidget.setFont(font)
- self.tabWidget.setTabPosition(QtGui.QTabWidget.North)
- self.tabWidget.setTabShape(QtGui.QTabWidget.Rounded)
- self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
- self.inbox = QtGui.QWidget()
- self.inbox.setObjectName(_fromUtf8("inbox"))
- self.gridLayout = QtGui.QGridLayout(self.inbox)
- self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
+ self.tabWidget.setTabPosition(QtWidgets.QTabWidget.North)
+ self.tabWidget.setTabShape(QtWidgets.QTabWidget.Rounded)
+ self.tabWidget.setObjectName("tabWidget")
+ self.inbox = QtWidgets.QWidget()
+ self.inbox.setObjectName("inbox")
+ self.gridLayout = QtWidgets.QGridLayout(self.inbox)
+ self.gridLayout.setObjectName("gridLayout")
self.horizontalSplitter_3 = settingsmixin.SSplitter()
- self.horizontalSplitter_3.setObjectName(_fromUtf8("horizontalSplitter_3"))
+ self.horizontalSplitter_3.setObjectName("horizontalSplitter_3")
self.verticalSplitter_12 = settingsmixin.SSplitter()
- self.verticalSplitter_12.setObjectName(_fromUtf8("verticalSplitter_12"))
+ self.verticalSplitter_12.setObjectName("verticalSplitter_12")
self.verticalSplitter_12.setOrientation(QtCore.Qt.Vertical)
self.treeWidgetYourIdentities = settingsmixin.STreeWidget(self.inbox)
- self.treeWidgetYourIdentities.setObjectName(_fromUtf8("treeWidgetYourIdentities"))
+ self.treeWidgetYourIdentities.setObjectName("treeWidgetYourIdentities")
self.treeWidgetYourIdentities.resize(200, self.treeWidgetYourIdentities.height())
icon1 = QtGui.QIcon()
- icon1.addPixmap(
- QtGui.QPixmap(_fromUtf8(":/newPrefix/images/identities.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off
- )
+ icon1.addPixmap(QtGui.QPixmap(":/newPrefix/images/identities.png"), QtGui.QIcon.Selected, QtGui.QIcon.Off)
self.treeWidgetYourIdentities.headerItem().setIcon(0, icon1)
self.verticalSplitter_12.addWidget(self.treeWidgetYourIdentities)
- self.pushButtonNewAddress = QtGui.QPushButton(self.inbox)
- self.pushButtonNewAddress.setObjectName(_fromUtf8("pushButtonNewAddress"))
+ self.pushButtonNewAddress = QtWidgets.QPushButton(self.inbox)
+ self.pushButtonNewAddress.setObjectName("pushButtonNewAddress")
self.pushButtonNewAddress.resize(200, self.pushButtonNewAddress.height())
self.verticalSplitter_12.addWidget(self.pushButtonNewAddress)
self.verticalSplitter_12.setStretchFactor(0, 1)
@@ -95,21 +67,21 @@ class Ui_MainWindow(object):
self.verticalSplitter_12.handle(1).setEnabled(False)
self.horizontalSplitter_3.addWidget(self.verticalSplitter_12)
self.verticalSplitter_7 = settingsmixin.SSplitter()
- self.verticalSplitter_7.setObjectName(_fromUtf8("verticalSplitter_7"))
+ self.verticalSplitter_7.setObjectName("verticalSplitter_7")
self.verticalSplitter_7.setOrientation(QtCore.Qt.Vertical)
- self.horizontalSplitterSearch = QtGui.QSplitter()
- self.horizontalSplitterSearch.setObjectName(_fromUtf8("horizontalSplitterSearch"))
- self.inboxSearchLineEdit = QtGui.QLineEdit(self.inbox)
- self.inboxSearchLineEdit.setObjectName(_fromUtf8("inboxSearchLineEdit"))
+ self.horizontalSplitterSearch = QtWidgets.QSplitter()
+ self.horizontalSplitterSearch.setObjectName("horizontalSplitterSearch")
+ self.inboxSearchLineEdit = QtWidgets.QLineEdit(self.inbox)
+ self.inboxSearchLineEdit.setObjectName("inboxSearchLineEdit")
self.horizontalSplitterSearch.addWidget(self.inboxSearchLineEdit)
- self.inboxSearchOption = QtGui.QComboBox(self.inbox)
- self.inboxSearchOption.setObjectName(_fromUtf8("inboxSearchOption"))
- self.inboxSearchOption.addItem(_fromUtf8(""))
- self.inboxSearchOption.addItem(_fromUtf8(""))
- self.inboxSearchOption.addItem(_fromUtf8(""))
- self.inboxSearchOption.addItem(_fromUtf8(""))
- self.inboxSearchOption.addItem(_fromUtf8(""))
- self.inboxSearchOption.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
+ self.inboxSearchOption = QtWidgets.QComboBox(self.inbox)
+ self.inboxSearchOption.setObjectName("inboxSearchOption")
+ self.inboxSearchOption.addItem("")
+ self.inboxSearchOption.addItem("")
+ self.inboxSearchOption.addItem("")
+ self.inboxSearchOption.addItem("")
+ self.inboxSearchOption.addItem("")
+ self.inboxSearchOption.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToContents)
self.inboxSearchOption.setCurrentIndex(3)
self.horizontalSplitterSearch.addWidget(self.inboxSearchOption)
self.horizontalSplitterSearch.handle(1).setEnabled(False)
@@ -117,21 +89,21 @@ class Ui_MainWindow(object):
self.horizontalSplitterSearch.setStretchFactor(1, 0)
self.verticalSplitter_7.addWidget(self.horizontalSplitterSearch)
self.tableWidgetInbox = settingsmixin.STableWidget(self.inbox)
- self.tableWidgetInbox.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
+ self.tableWidgetInbox.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
self.tableWidgetInbox.setAlternatingRowColors(True)
- self.tableWidgetInbox.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
- self.tableWidgetInbox.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
+ self.tableWidgetInbox.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
+ self.tableWidgetInbox.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
self.tableWidgetInbox.setWordWrap(False)
- self.tableWidgetInbox.setObjectName(_fromUtf8("tableWidgetInbox"))
+ self.tableWidgetInbox.setObjectName("tableWidgetInbox")
self.tableWidgetInbox.setColumnCount(4)
self.tableWidgetInbox.setRowCount(0)
- item = QtGui.QTableWidgetItem()
+ item = QtWidgets.QTableWidgetItem()
self.tableWidgetInbox.setHorizontalHeaderItem(0, item)
- item = QtGui.QTableWidgetItem()
+ item = QtWidgets.QTableWidgetItem()
self.tableWidgetInbox.setHorizontalHeaderItem(1, item)
- item = QtGui.QTableWidgetItem()
+ item = QtWidgets.QTableWidgetItem()
self.tableWidgetInbox.setHorizontalHeaderItem(2, item)
- item = QtGui.QTableWidgetItem()
+ item = QtWidgets.QTableWidgetItem()
self.tableWidgetInbox.setHorizontalHeaderItem(3, item)
self.tableWidgetInbox.horizontalHeader().setCascadingSectionResizes(True)
self.tableWidgetInbox.horizontalHeader().setDefaultSectionSize(200)
@@ -145,7 +117,7 @@ class Ui_MainWindow(object):
self.textEditInboxMessage = MessageView(self.inbox)
self.textEditInboxMessage.setBaseSize(QtCore.QSize(0, 500))
self.textEditInboxMessage.setReadOnly(True)
- self.textEditInboxMessage.setObjectName(_fromUtf8("textEditInboxMessage"))
+ self.textEditInboxMessage.setObjectName("textEditInboxMessage")
self.verticalSplitter_7.addWidget(self.textEditInboxMessage)
self.verticalSplitter_7.setStretchFactor(0, 0)
self.verticalSplitter_7.setStretchFactor(1, 1)
@@ -161,52 +133,51 @@ class Ui_MainWindow(object):
self.horizontalSplitter_3.setCollapsible(1, False)
self.gridLayout.addWidget(self.horizontalSplitter_3)
icon2 = QtGui.QIcon()
- icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/inbox.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.tabWidget.addTab(self.inbox, icon2, _fromUtf8(""))
- self.send = QtGui.QWidget()
- self.send.setObjectName(_fromUtf8("send"))
- self.gridLayout_7 = QtGui.QGridLayout(self.send)
- self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7"))
+ icon2.addPixmap(QtGui.QPixmap(":/newPrefix/images/inbox.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.tabWidget.addTab(self.inbox, icon2, "")
+ self.send = QtWidgets.QWidget()
+ self.send.setObjectName("send")
+ self.gridLayout_7 = QtWidgets.QGridLayout(self.send)
+ self.gridLayout_7.setObjectName("gridLayout_7")
self.horizontalSplitter = settingsmixin.SSplitter()
- self.horizontalSplitter.setObjectName(_fromUtf8("horizontalSplitter"))
+ self.horizontalSplitter.setObjectName("horizontalSplitter")
self.verticalSplitter_2 = settingsmixin.SSplitter()
- self.verticalSplitter_2.setObjectName(_fromUtf8("verticalSplitter_2"))
+ self.verticalSplitter_2.setObjectName("verticalSplitter_2")
self.verticalSplitter_2.setOrientation(QtCore.Qt.Vertical)
self.tableWidgetAddressBook = settingsmixin.STableWidget(self.send)
self.tableWidgetAddressBook.setAlternatingRowColors(True)
- self.tableWidgetAddressBook.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
- self.tableWidgetAddressBook.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
- self.tableWidgetAddressBook.setObjectName(_fromUtf8("tableWidgetAddressBook"))
+ self.tableWidgetAddressBook.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
+ self.tableWidgetAddressBook.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
+ self.tableWidgetAddressBook.setObjectName("tableWidgetAddressBook")
self.tableWidgetAddressBook.setColumnCount(2)
self.tableWidgetAddressBook.setRowCount(0)
self.tableWidgetAddressBook.resize(200, self.tableWidgetAddressBook.height())
- item = QtGui.QTableWidgetItem()
+ item = QtWidgets.QTableWidgetItem()
icon3 = QtGui.QIcon()
- icon3.addPixmap(
- QtGui.QPixmap(_fromUtf8(":/newPrefix/images/addressbook.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off
- )
+ icon3.addPixmap(QtGui.QPixmap(":/newPrefix/images/addressbook.png"), QtGui.QIcon.Selected, QtGui.QIcon.Off)
item.setIcon(icon3)
self.tableWidgetAddressBook.setHorizontalHeaderItem(0, item)
- item = QtGui.QTableWidgetItem()
+ item = QtWidgets.QTableWidgetItem()
self.tableWidgetAddressBook.setHorizontalHeaderItem(1, item)
self.tableWidgetAddressBook.horizontalHeader().setCascadingSectionResizes(True)
self.tableWidgetAddressBook.horizontalHeader().setDefaultSectionSize(200)
self.tableWidgetAddressBook.horizontalHeader().setHighlightSections(False)
self.tableWidgetAddressBook.horizontalHeader().setStretchLastSection(True)
self.tableWidgetAddressBook.verticalHeader().setVisible(False)
+ self.tableWidgetAddressBook.setWordWrap(False)
self.verticalSplitter_2.addWidget(self.tableWidgetAddressBook)
self.addressBookCompleter = AddressBookCompleter()
- self.addressBookCompleter.setCompletionMode(QtGui.QCompleter.PopupCompletion)
+ self.addressBookCompleter.setCompletionMode(QtWidgets.QCompleter.PopupCompletion)
self.addressBookCompleter.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
- self.addressBookCompleterModel = QtGui.QStringListModel()
+ self.addressBookCompleterModel = QtCore.QStringListModel()
self.addressBookCompleter.setModel(self.addressBookCompleterModel)
- self.pushButtonAddAddressBook = QtGui.QPushButton(self.send)
- self.pushButtonAddAddressBook.setObjectName(_fromUtf8("pushButtonAddAddressBook"))
+ self.pushButtonAddAddressBook = QtWidgets.QPushButton(self.send)
+ self.pushButtonAddAddressBook.setObjectName("pushButtonAddAddressBook")
self.pushButtonAddAddressBook.resize(200, self.pushButtonAddAddressBook.height())
self.verticalSplitter_2.addWidget(self.pushButtonAddAddressBook)
- self.pushButtonFetchNamecoinID = QtGui.QPushButton(self.send)
+ self.pushButtonFetchNamecoinID = QtWidgets.QPushButton(self.send)
self.pushButtonFetchNamecoinID.resize(200, self.pushButtonFetchNamecoinID.height())
- self.pushButtonFetchNamecoinID.setObjectName(_fromUtf8("pushButtonFetchNamecoinID"))
+ self.pushButtonFetchNamecoinID.setObjectName("pushButtonFetchNamecoinID")
self.verticalSplitter_2.addWidget(self.pushButtonFetchNamecoinID)
self.verticalSplitter_2.setStretchFactor(0, 1)
self.verticalSplitter_2.setStretchFactor(1, 0)
@@ -218,45 +189,45 @@ class Ui_MainWindow(object):
self.verticalSplitter_2.handle(2).setEnabled(False)
self.horizontalSplitter.addWidget(self.verticalSplitter_2)
self.verticalSplitter = settingsmixin.SSplitter()
- self.verticalSplitter.setObjectName(_fromUtf8("verticalSplitter"))
+ self.verticalSplitter.setObjectName("verticalSplitter")
self.verticalSplitter.setOrientation(QtCore.Qt.Vertical)
- self.tabWidgetSend = QtGui.QTabWidget(self.send)
- self.tabWidgetSend.setObjectName(_fromUtf8("tabWidgetSend"))
- self.sendDirect = QtGui.QWidget()
- self.sendDirect.setObjectName(_fromUtf8("sendDirect"))
- self.gridLayout_8 = QtGui.QGridLayout(self.sendDirect)
- self.gridLayout_8.setObjectName(_fromUtf8("gridLayout_8"))
+ self.tabWidgetSend = QtWidgets.QTabWidget(self.send)
+ self.tabWidgetSend.setObjectName("tabWidgetSend")
+ self.sendDirect = QtWidgets.QWidget()
+ self.sendDirect.setObjectName("sendDirect")
+ self.gridLayout_8 = QtWidgets.QGridLayout(self.sendDirect)
+ self.gridLayout_8.setObjectName("gridLayout_8")
self.verticalSplitter_5 = settingsmixin.SSplitter()
- self.verticalSplitter_5.setObjectName(_fromUtf8("verticalSplitter_5"))
+ self.verticalSplitter_5.setObjectName("verticalSplitter_5")
self.verticalSplitter_5.setOrientation(QtCore.Qt.Vertical)
- self.gridLayout_2 = QtGui.QGridLayout()
- self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
- self.label_3 = QtGui.QLabel(self.sendDirect)
- self.label_3.setObjectName(_fromUtf8("label_3"))
+ self.gridLayout_2 = QtWidgets.QGridLayout()
+ self.gridLayout_2.setObjectName("gridLayout_2")
+ self.label_3 = QtWidgets.QLabel(self.sendDirect)
+ self.label_3.setObjectName("label_3")
self.gridLayout_2.addWidget(self.label_3, 2, 0, 1, 1)
- self.label_2 = QtGui.QLabel(self.sendDirect)
- self.label_2.setObjectName(_fromUtf8("label_2"))
+ self.label_2 = QtWidgets.QLabel(self.sendDirect)
+ self.label_2.setObjectName("label_2")
self.gridLayout_2.addWidget(self.label_2, 0, 0, 1, 1)
- self.lineEditSubject = QtGui.QLineEdit(self.sendDirect)
- self.lineEditSubject.setText(_fromUtf8(""))
- self.lineEditSubject.setObjectName(_fromUtf8("lineEditSubject"))
+ self.lineEditSubject = QtWidgets.QLineEdit(self.sendDirect)
+ self.lineEditSubject.setText("")
+ self.lineEditSubject.setObjectName("lineEditSubject")
self.gridLayout_2.addWidget(self.lineEditSubject, 2, 1, 1, 1)
- self.label = QtGui.QLabel(self.sendDirect)
- self.label.setObjectName(_fromUtf8("label"))
+ self.label = QtWidgets.QLabel(self.sendDirect)
+ self.label.setObjectName("label")
self.gridLayout_2.addWidget(self.label, 1, 0, 1, 1)
- self.comboBoxSendFrom = QtGui.QComboBox(self.sendDirect)
+ self.comboBoxSendFrom = QtWidgets.QComboBox(self.sendDirect)
self.comboBoxSendFrom.setMinimumSize(QtCore.QSize(300, 0))
- self.comboBoxSendFrom.setObjectName(_fromUtf8("comboBoxSendFrom"))
+ self.comboBoxSendFrom.setObjectName("comboBoxSendFrom")
self.gridLayout_2.addWidget(self.comboBoxSendFrom, 0, 1, 1, 1)
- self.lineEditTo = QtGui.QLineEdit(self.sendDirect)
- self.lineEditTo.setObjectName(_fromUtf8("lineEditTo"))
+ self.lineEditTo = QtWidgets.QLineEdit(self.sendDirect)
+ self.lineEditTo.setObjectName("lineEditTo")
self.gridLayout_2.addWidget(self.lineEditTo, 1, 1, 1, 1)
self.lineEditTo.setCompleter(self.addressBookCompleter)
- self.gridLayout_2_Widget = QtGui.QWidget()
+ self.gridLayout_2_Widget = QtWidgets.QWidget()
self.gridLayout_2_Widget.setLayout(self.gridLayout_2)
self.verticalSplitter_5.addWidget(self.gridLayout_2_Widget)
self.textEditMessage = MessageCompose(self.sendDirect)
- self.textEditMessage.setObjectName(_fromUtf8("textEditMessage"))
+ self.textEditMessage.setObjectName("textEditMessage")
self.verticalSplitter_5.addWidget(self.textEditMessage)
self.verticalSplitter_5.setStretchFactor(0, 0)
self.verticalSplitter_5.setStretchFactor(1, 1)
@@ -264,35 +235,35 @@ class Ui_MainWindow(object):
self.verticalSplitter_5.setCollapsible(1, False)
self.verticalSplitter_5.handle(1).setEnabled(False)
self.gridLayout_8.addWidget(self.verticalSplitter_5, 0, 0, 1, 1)
- self.tabWidgetSend.addTab(self.sendDirect, _fromUtf8(""))
- self.sendBroadcast = QtGui.QWidget()
- self.sendBroadcast.setObjectName(_fromUtf8("sendBroadcast"))
- self.gridLayout_9 = QtGui.QGridLayout(self.sendBroadcast)
- self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9"))
+ self.tabWidgetSend.addTab(self.sendDirect, "")
+ self.sendBroadcast = QtWidgets.QWidget()
+ self.sendBroadcast.setObjectName("sendBroadcast")
+ self.gridLayout_9 = QtWidgets.QGridLayout(self.sendBroadcast)
+ self.gridLayout_9.setObjectName("gridLayout_9")
self.verticalSplitter_6 = settingsmixin.SSplitter()
- self.verticalSplitter_6.setObjectName(_fromUtf8("verticalSplitter_6"))
+ self.verticalSplitter_6.setObjectName("verticalSplitter_6")
self.verticalSplitter_6.setOrientation(QtCore.Qt.Vertical)
- self.gridLayout_5 = QtGui.QGridLayout()
- self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5"))
- self.label_8 = QtGui.QLabel(self.sendBroadcast)
- self.label_8.setObjectName(_fromUtf8("label_8"))
+ self.gridLayout_5 = QtWidgets.QGridLayout()
+ self.gridLayout_5.setObjectName("gridLayout_5")
+ self.label_8 = QtWidgets.QLabel(self.sendBroadcast)
+ self.label_8.setObjectName("label_8")
self.gridLayout_5.addWidget(self.label_8, 0, 0, 1, 1)
- self.lineEditSubjectBroadcast = QtGui.QLineEdit(self.sendBroadcast)
- self.lineEditSubjectBroadcast.setText(_fromUtf8(""))
- self.lineEditSubjectBroadcast.setObjectName(_fromUtf8("lineEditSubjectBroadcast"))
+ self.lineEditSubjectBroadcast = QtWidgets.QLineEdit(self.sendBroadcast)
+ self.lineEditSubjectBroadcast.setText("")
+ self.lineEditSubjectBroadcast.setObjectName("lineEditSubjectBroadcast")
self.gridLayout_5.addWidget(self.lineEditSubjectBroadcast, 1, 1, 1, 1)
- self.label_7 = QtGui.QLabel(self.sendBroadcast)
- self.label_7.setObjectName(_fromUtf8("label_7"))
+ self.label_7 = QtWidgets.QLabel(self.sendBroadcast)
+ self.label_7.setObjectName("label_7")
self.gridLayout_5.addWidget(self.label_7, 1, 0, 1, 1)
- self.comboBoxSendFromBroadcast = QtGui.QComboBox(self.sendBroadcast)
+ self.comboBoxSendFromBroadcast = QtWidgets.QComboBox(self.sendBroadcast)
self.comboBoxSendFromBroadcast.setMinimumSize(QtCore.QSize(300, 0))
- self.comboBoxSendFromBroadcast.setObjectName(_fromUtf8("comboBoxSendFromBroadcast"))
+ self.comboBoxSendFromBroadcast.setObjectName("comboBoxSendFromBroadcast")
self.gridLayout_5.addWidget(self.comboBoxSendFromBroadcast, 0, 1, 1, 1)
- self.gridLayout_5_Widget = QtGui.QWidget()
+ self.gridLayout_5_Widget = QtWidgets.QWidget()
self.gridLayout_5_Widget.setLayout(self.gridLayout_5)
self.verticalSplitter_6.addWidget(self.gridLayout_5_Widget)
self.textEditMessageBroadcast = MessageCompose(self.sendBroadcast)
- self.textEditMessageBroadcast.setObjectName(_fromUtf8("textEditMessageBroadcast"))
+ self.textEditMessageBroadcast.setObjectName("textEditMessageBroadcast")
self.verticalSplitter_6.addWidget(self.textEditMessageBroadcast)
self.verticalSplitter_6.setStretchFactor(0, 0)
self.verticalSplitter_6.setStretchFactor(1, 1)
@@ -300,15 +271,15 @@ class Ui_MainWindow(object):
self.verticalSplitter_6.setCollapsible(1, False)
self.verticalSplitter_6.handle(1).setEnabled(False)
self.gridLayout_9.addWidget(self.verticalSplitter_6, 0, 0, 1, 1)
- self.tabWidgetSend.addTab(self.sendBroadcast, _fromUtf8(""))
+ self.tabWidgetSend.addTab(self.sendBroadcast, "")
self.verticalSplitter.addWidget(self.tabWidgetSend)
- self.tTLContainer = QtGui.QWidget()
- self.tTLContainer.setSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
- self.horizontalLayout_5 = QtGui.QHBoxLayout()
+ self.tTLContainer = QtWidgets.QWidget()
+ self.tTLContainer.setSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed)
+ self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
self.tTLContainer.setLayout(self.horizontalLayout_5)
- self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5"))
- self.pushButtonTTL = QtGui.QPushButton(self.send)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
+ self.horizontalLayout_5.setObjectName("horizontalLayout_5")
+ self.pushButtonTTL = QtWidgets.QPushButton(self.send)
+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.pushButtonTTL.sizePolicy().hasHeightForWidth())
@@ -328,29 +299,29 @@ class Ui_MainWindow(object):
font.setUnderline(True)
self.pushButtonTTL.setFont(font)
self.pushButtonTTL.setFlat(True)
- self.pushButtonTTL.setObjectName(_fromUtf8("pushButtonTTL"))
+ self.pushButtonTTL.setObjectName("pushButtonTTL")
self.horizontalLayout_5.addWidget(self.pushButtonTTL, 0, QtCore.Qt.AlignRight)
- self.horizontalSliderTTL = QtGui.QSlider(self.send)
+ self.horizontalSliderTTL = QtWidgets.QSlider(self.send)
self.horizontalSliderTTL.setMinimumSize(QtCore.QSize(70, 0))
self.horizontalSliderTTL.setOrientation(QtCore.Qt.Horizontal)
self.horizontalSliderTTL.setInvertedAppearance(False)
self.horizontalSliderTTL.setInvertedControls(False)
- self.horizontalSliderTTL.setObjectName(_fromUtf8("horizontalSliderTTL"))
+ self.horizontalSliderTTL.setObjectName("horizontalSliderTTL")
self.horizontalLayout_5.addWidget(self.horizontalSliderTTL, 0, QtCore.Qt.AlignLeft)
- self.labelHumanFriendlyTTLDescription = QtGui.QLabel(self.send)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
+ self.labelHumanFriendlyTTLDescription = QtWidgets.QLabel(self.send)
+ sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.labelHumanFriendlyTTLDescription.sizePolicy().hasHeightForWidth())
self.labelHumanFriendlyTTLDescription.setSizePolicy(sizePolicy)
self.labelHumanFriendlyTTLDescription.setMinimumSize(QtCore.QSize(45, 0))
- self.labelHumanFriendlyTTLDescription.setObjectName(_fromUtf8("labelHumanFriendlyTTLDescription"))
+ self.labelHumanFriendlyTTLDescription.setObjectName("labelHumanFriendlyTTLDescription")
self.horizontalLayout_5.addWidget(self.labelHumanFriendlyTTLDescription, 1, QtCore.Qt.AlignLeft)
- self.pushButtonClear = QtGui.QPushButton(self.send)
- self.pushButtonClear.setObjectName(_fromUtf8("pushButtonClear"))
+ self.pushButtonClear = QtWidgets.QPushButton(self.send)
+ self.pushButtonClear.setObjectName("pushButtonClear")
self.horizontalLayout_5.addWidget(self.pushButtonClear, 0, QtCore.Qt.AlignRight)
- self.pushButtonSend = QtGui.QPushButton(self.send)
- self.pushButtonSend.setObjectName(_fromUtf8("pushButtonSend"))
+ self.pushButtonSend = QtWidgets.QPushButton(self.send)
+ self.pushButtonSend.setObjectName("pushButtonSend")
self.horizontalLayout_5.addWidget(self.pushButtonSend, 0, QtCore.Qt.AlignRight)
self.horizontalSliderTTL.setMaximumSize(QtCore.QSize(105, self.pushButtonSend.height()))
self.verticalSplitter.addWidget(self.tTLContainer)
@@ -367,31 +338,29 @@ class Ui_MainWindow(object):
self.horizontalSplitter.setCollapsible(1, False)
self.gridLayout_7.addWidget(self.horizontalSplitter, 0, 0, 1, 1)
icon4 = QtGui.QIcon()
- icon4.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/send.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.tabWidget.addTab(self.send, icon4, _fromUtf8(""))
- self.subscriptions = QtGui.QWidget()
- self.subscriptions.setObjectName(_fromUtf8("subscriptions"))
- self.gridLayout_3 = QtGui.QGridLayout(self.subscriptions)
- self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
+ icon4.addPixmap(QtGui.QPixmap(":/newPrefix/images/send.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.tabWidget.addTab(self.send, icon4, "")
+ self.subscriptions = QtWidgets.QWidget()
+ self.subscriptions.setObjectName("subscriptions")
+ self.gridLayout_3 = QtWidgets.QGridLayout(self.subscriptions)
+ self.gridLayout_3.setObjectName("gridLayout_3")
self.horizontalSplitter_4 = settingsmixin.SSplitter()
- self.horizontalSplitter_4.setObjectName(_fromUtf8("horizontalSplitter_4"))
+ self.horizontalSplitter_4.setObjectName("horizontalSplitter_4")
self.verticalSplitter_3 = settingsmixin.SSplitter()
- self.verticalSplitter_3.setObjectName(_fromUtf8("verticalSplitter_3"))
+ self.verticalSplitter_3.setObjectName("verticalSplitter_3")
self.verticalSplitter_3.setOrientation(QtCore.Qt.Vertical)
self.treeWidgetSubscriptions = settingsmixin.STreeWidget(self.subscriptions)
self.treeWidgetSubscriptions.setAlternatingRowColors(True)
- self.treeWidgetSubscriptions.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
- self.treeWidgetSubscriptions.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
- self.treeWidgetSubscriptions.setObjectName(_fromUtf8("treeWidgetSubscriptions"))
+ self.treeWidgetSubscriptions.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
+ self.treeWidgetSubscriptions.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
+ self.treeWidgetSubscriptions.setObjectName("treeWidgetSubscriptions")
self.treeWidgetSubscriptions.resize(200, self.treeWidgetSubscriptions.height())
icon5 = QtGui.QIcon()
- icon5.addPixmap(
- QtGui.QPixmap(_fromUtf8(":/newPrefix/images/subscriptions.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off
- )
+ icon5.addPixmap(QtGui.QPixmap(":/newPrefix/images/subscriptions.png"), QtGui.QIcon.Selected, QtGui.QIcon.Off)
self.treeWidgetSubscriptions.headerItem().setIcon(0, icon5)
self.verticalSplitter_3.addWidget(self.treeWidgetSubscriptions)
- self.pushButtonAddSubscription = QtGui.QPushButton(self.subscriptions)
- self.pushButtonAddSubscription.setObjectName(_fromUtf8("pushButtonAddSubscription"))
+ self.pushButtonAddSubscription = QtWidgets.QPushButton(self.subscriptions)
+ self.pushButtonAddSubscription.setObjectName("pushButtonAddSubscription")
self.pushButtonAddSubscription.resize(200, self.pushButtonAddSubscription.height())
self.verticalSplitter_3.addWidget(self.pushButtonAddSubscription)
self.verticalSplitter_3.setStretchFactor(0, 1)
@@ -401,20 +370,20 @@ class Ui_MainWindow(object):
self.verticalSplitter_3.handle(1).setEnabled(False)
self.horizontalSplitter_4.addWidget(self.verticalSplitter_3)
self.verticalSplitter_4 = settingsmixin.SSplitter()
- self.verticalSplitter_4.setObjectName(_fromUtf8("verticalSplitter_4"))
+ self.verticalSplitter_4.setObjectName("verticalSplitter_4")
self.verticalSplitter_4.setOrientation(QtCore.Qt.Vertical)
- self.horizontalSplitter_2 = QtGui.QSplitter()
- self.horizontalSplitter_2.setObjectName(_fromUtf8("horizontalSplitter_2"))
- self.inboxSearchLineEditSubscriptions = QtGui.QLineEdit(self.subscriptions)
- self.inboxSearchLineEditSubscriptions.setObjectName(_fromUtf8("inboxSearchLineEditSubscriptions"))
+ self.horizontalSplitter_2 = QtWidgets.QSplitter()
+ self.horizontalSplitter_2.setObjectName("horizontalSplitter_2")
+ self.inboxSearchLineEditSubscriptions = QtWidgets.QLineEdit(self.subscriptions)
+ self.inboxSearchLineEditSubscriptions.setObjectName("inboxSearchLineEditSubscriptions")
self.horizontalSplitter_2.addWidget(self.inboxSearchLineEditSubscriptions)
- self.inboxSearchOptionSubscriptions = QtGui.QComboBox(self.subscriptions)
- self.inboxSearchOptionSubscriptions.setObjectName(_fromUtf8("inboxSearchOptionSubscriptions"))
- self.inboxSearchOptionSubscriptions.addItem(_fromUtf8(""))
- self.inboxSearchOptionSubscriptions.addItem(_fromUtf8(""))
- self.inboxSearchOptionSubscriptions.addItem(_fromUtf8(""))
- self.inboxSearchOptionSubscriptions.addItem(_fromUtf8(""))
- self.inboxSearchOptionSubscriptions.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
+ self.inboxSearchOptionSubscriptions = QtWidgets.QComboBox(self.subscriptions)
+ self.inboxSearchOptionSubscriptions.setObjectName("inboxSearchOptionSubscriptions")
+ self.inboxSearchOptionSubscriptions.addItem("")
+ self.inboxSearchOptionSubscriptions.addItem("")
+ self.inboxSearchOptionSubscriptions.addItem("")
+ self.inboxSearchOptionSubscriptions.addItem("")
+ self.inboxSearchOptionSubscriptions.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToContents)
self.inboxSearchOptionSubscriptions.setCurrentIndex(2)
self.horizontalSplitter_2.addWidget(self.inboxSearchOptionSubscriptions)
self.horizontalSplitter_2.handle(1).setEnabled(False)
@@ -422,21 +391,21 @@ class Ui_MainWindow(object):
self.horizontalSplitter_2.setStretchFactor(1, 0)
self.verticalSplitter_4.addWidget(self.horizontalSplitter_2)
self.tableWidgetInboxSubscriptions = settingsmixin.STableWidget(self.subscriptions)
- self.tableWidgetInboxSubscriptions.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
+ self.tableWidgetInboxSubscriptions.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
self.tableWidgetInboxSubscriptions.setAlternatingRowColors(True)
- self.tableWidgetInboxSubscriptions.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
- self.tableWidgetInboxSubscriptions.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
+ self.tableWidgetInboxSubscriptions.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
+ self.tableWidgetInboxSubscriptions.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
self.tableWidgetInboxSubscriptions.setWordWrap(False)
- self.tableWidgetInboxSubscriptions.setObjectName(_fromUtf8("tableWidgetInboxSubscriptions"))
+ self.tableWidgetInboxSubscriptions.setObjectName("tableWidgetInboxSubscriptions")
self.tableWidgetInboxSubscriptions.setColumnCount(4)
self.tableWidgetInboxSubscriptions.setRowCount(0)
- item = QtGui.QTableWidgetItem()
+ item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(0, item)
- item = QtGui.QTableWidgetItem()
+ item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(1, item)
- item = QtGui.QTableWidgetItem()
+ item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(2, item)
- item = QtGui.QTableWidgetItem()
+ item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxSubscriptions.setHorizontalHeaderItem(3, item)
self.tableWidgetInboxSubscriptions.horizontalHeader().setCascadingSectionResizes(True)
self.tableWidgetInboxSubscriptions.horizontalHeader().setDefaultSectionSize(200)
@@ -450,7 +419,7 @@ class Ui_MainWindow(object):
self.textEditInboxMessageSubscriptions = MessageView(self.subscriptions)
self.textEditInboxMessageSubscriptions.setBaseSize(QtCore.QSize(0, 500))
self.textEditInboxMessageSubscriptions.setReadOnly(True)
- self.textEditInboxMessageSubscriptions.setObjectName(_fromUtf8("textEditInboxMessageSubscriptions"))
+ self.textEditInboxMessageSubscriptions.setObjectName("textEditInboxMessageSubscriptions")
self.verticalSplitter_4.addWidget(self.textEditInboxMessageSubscriptions)
self.verticalSplitter_4.setStretchFactor(0, 0)
self.verticalSplitter_4.setStretchFactor(1, 1)
@@ -466,35 +435,31 @@ class Ui_MainWindow(object):
self.horizontalSplitter_4.setCollapsible(1, False)
self.gridLayout_3.addWidget(self.horizontalSplitter_4, 0, 0, 1, 1)
icon6 = QtGui.QIcon()
- icon6.addPixmap(
- QtGui.QPixmap(_fromUtf8(":/newPrefix/images/subscriptions.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off
- )
- self.tabWidget.addTab(self.subscriptions, icon6, _fromUtf8(""))
- self.chans = QtGui.QWidget()
- self.chans.setObjectName(_fromUtf8("chans"))
- self.gridLayout_4 = QtGui.QGridLayout(self.chans)
- self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4"))
+ icon6.addPixmap(QtGui.QPixmap(":/newPrefix/images/subscriptions.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.tabWidget.addTab(self.subscriptions, icon6, "")
+ self.chans = QtWidgets.QWidget()
+ self.chans.setObjectName("chans")
+ self.gridLayout_4 = QtWidgets.QGridLayout(self.chans)
+ self.gridLayout_4.setObjectName("gridLayout_4")
self.horizontalSplitter_7 = settingsmixin.SSplitter()
- self.horizontalSplitter_7.setObjectName(_fromUtf8("horizontalSplitter_7"))
+ self.horizontalSplitter_7.setObjectName("horizontalSplitter_7")
self.verticalSplitter_17 = settingsmixin.SSplitter()
- self.verticalSplitter_17.setObjectName(_fromUtf8("verticalSplitter_17"))
+ self.verticalSplitter_17.setObjectName("verticalSplitter_17")
self.verticalSplitter_17.setOrientation(QtCore.Qt.Vertical)
self.treeWidgetChans = settingsmixin.STreeWidget(self.chans)
- self.treeWidgetChans.setFrameShadow(QtGui.QFrame.Sunken)
+ self.treeWidgetChans.setFrameShadow(QtWidgets.QFrame.Sunken)
self.treeWidgetChans.setLineWidth(1)
self.treeWidgetChans.setAlternatingRowColors(True)
- self.treeWidgetChans.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)
- self.treeWidgetChans.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
- self.treeWidgetChans.setObjectName(_fromUtf8("treeWidgetChans"))
+ self.treeWidgetChans.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
+ self.treeWidgetChans.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
+ self.treeWidgetChans.setObjectName("treeWidgetChans")
self.treeWidgetChans.resize(200, self.treeWidgetChans.height())
icon7 = QtGui.QIcon()
- icon7.addPixmap(
- QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-16px.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off
- )
+ icon7.addPixmap(QtGui.QPixmap(":/newPrefix/images/can-icon-16px.png"), QtGui.QIcon.Selected, QtGui.QIcon.Off)
self.treeWidgetChans.headerItem().setIcon(0, icon7)
self.verticalSplitter_17.addWidget(self.treeWidgetChans)
- self.pushButtonAddChan = QtGui.QPushButton(self.chans)
- self.pushButtonAddChan.setObjectName(_fromUtf8("pushButtonAddChan"))
+ self.pushButtonAddChan = QtWidgets.QPushButton(self.chans)
+ self.pushButtonAddChan.setObjectName("pushButtonAddChan")
self.pushButtonAddChan.resize(200, self.pushButtonAddChan.height())
self.verticalSplitter_17.addWidget(self.pushButtonAddChan)
self.verticalSplitter_17.setStretchFactor(0, 1)
@@ -504,21 +469,21 @@ class Ui_MainWindow(object):
self.verticalSplitter_17.handle(1).setEnabled(False)
self.horizontalSplitter_7.addWidget(self.verticalSplitter_17)
self.verticalSplitter_8 = settingsmixin.SSplitter()
- self.verticalSplitter_8.setObjectName(_fromUtf8("verticalSplitter_8"))
+ self.verticalSplitter_8.setObjectName("verticalSplitter_8")
self.verticalSplitter_8.setOrientation(QtCore.Qt.Vertical)
- self.horizontalSplitter_6 = QtGui.QSplitter()
- self.horizontalSplitter_6.setObjectName(_fromUtf8("horizontalSplitter_6"))
- self.inboxSearchLineEditChans = QtGui.QLineEdit(self.chans)
- self.inboxSearchLineEditChans.setObjectName(_fromUtf8("inboxSearchLineEditChans"))
+ self.horizontalSplitter_6 = QtWidgets.QSplitter()
+ self.horizontalSplitter_6.setObjectName("horizontalSplitter_6")
+ self.inboxSearchLineEditChans = QtWidgets.QLineEdit(self.chans)
+ self.inboxSearchLineEditChans.setObjectName("inboxSearchLineEditChans")
self.horizontalSplitter_6.addWidget(self.inboxSearchLineEditChans)
- self.inboxSearchOptionChans = QtGui.QComboBox(self.chans)
- self.inboxSearchOptionChans.setObjectName(_fromUtf8("inboxSearchOptionChans"))
- self.inboxSearchOptionChans.addItem(_fromUtf8(""))
- self.inboxSearchOptionChans.addItem(_fromUtf8(""))
- self.inboxSearchOptionChans.addItem(_fromUtf8(""))
- self.inboxSearchOptionChans.addItem(_fromUtf8(""))
- self.inboxSearchOptionChans.addItem(_fromUtf8(""))
- self.inboxSearchOptionChans.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
+ self.inboxSearchOptionChans = QtWidgets.QComboBox(self.chans)
+ self.inboxSearchOptionChans.setObjectName("inboxSearchOptionChans")
+ self.inboxSearchOptionChans.addItem("")
+ self.inboxSearchOptionChans.addItem("")
+ self.inboxSearchOptionChans.addItem("")
+ self.inboxSearchOptionChans.addItem("")
+ self.inboxSearchOptionChans.addItem("")
+ self.inboxSearchOptionChans.setSizeAdjustPolicy(QtWidgets.QComboBox.AdjustToContents)
self.inboxSearchOptionChans.setCurrentIndex(3)
self.horizontalSplitter_6.addWidget(self.inboxSearchOptionChans)
self.horizontalSplitter_6.handle(1).setEnabled(False)
@@ -526,21 +491,21 @@ class Ui_MainWindow(object):
self.horizontalSplitter_6.setStretchFactor(1, 0)
self.verticalSplitter_8.addWidget(self.horizontalSplitter_6)
self.tableWidgetInboxChans = settingsmixin.STableWidget(self.chans)
- self.tableWidgetInboxChans.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
+ self.tableWidgetInboxChans.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
self.tableWidgetInboxChans.setAlternatingRowColors(True)
- self.tableWidgetInboxChans.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
- self.tableWidgetInboxChans.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
+ self.tableWidgetInboxChans.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
+ self.tableWidgetInboxChans.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
self.tableWidgetInboxChans.setWordWrap(False)
- self.tableWidgetInboxChans.setObjectName(_fromUtf8("tableWidgetInboxChans"))
+ self.tableWidgetInboxChans.setObjectName("tableWidgetInboxChans")
self.tableWidgetInboxChans.setColumnCount(4)
self.tableWidgetInboxChans.setRowCount(0)
- item = QtGui.QTableWidgetItem()
+ item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxChans.setHorizontalHeaderItem(0, item)
- item = QtGui.QTableWidgetItem()
+ item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxChans.setHorizontalHeaderItem(1, item)
- item = QtGui.QTableWidgetItem()
+ item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxChans.setHorizontalHeaderItem(2, item)
- item = QtGui.QTableWidgetItem()
+ item = QtWidgets.QTableWidgetItem()
self.tableWidgetInboxChans.setHorizontalHeaderItem(3, item)
self.tableWidgetInboxChans.horizontalHeader().setCascadingSectionResizes(True)
self.tableWidgetInboxChans.horizontalHeader().setDefaultSectionSize(200)
@@ -554,7 +519,7 @@ class Ui_MainWindow(object):
self.textEditInboxMessageChans = MessageView(self.chans)
self.textEditInboxMessageChans.setBaseSize(QtCore.QSize(0, 500))
self.textEditInboxMessageChans.setReadOnly(True)
- self.textEditInboxMessageChans.setObjectName(_fromUtf8("textEditInboxMessageChans"))
+ self.textEditInboxMessageChans.setObjectName("textEditInboxMessageChans")
self.verticalSplitter_8.addWidget(self.textEditInboxMessageChans)
self.verticalSplitter_8.setStretchFactor(0, 0)
self.verticalSplitter_8.setStretchFactor(1, 1)
@@ -570,10 +535,8 @@ class Ui_MainWindow(object):
self.horizontalSplitter_7.setCollapsible(1, False)
self.gridLayout_4.addWidget(self.horizontalSplitter_7, 0, 0, 1, 1)
icon8 = QtGui.QIcon()
- icon8.addPixmap(
- QtGui.QPixmap(_fromUtf8(":/newPrefix/images/can-icon-16px.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off
- )
- self.tabWidget.addTab(self.chans, icon8, _fromUtf8(""))
+ icon8.addPixmap(QtGui.QPixmap(":/newPrefix/images/can-icon-16px.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.tabWidget.addTab(self.chans, icon8, "")
self.blackwhitelist = Blacklist()
self.tabWidget.addTab(self.blackwhitelist, QtGui.QIcon(":/newPrefix/images/blacklist.png"), "")
# Initialize the Blacklist or Whitelist
@@ -585,62 +548,62 @@ class Ui_MainWindow(object):
self.tabWidget.addTab(self.networkstatus, QtGui.QIcon(":/newPrefix/images/networkstatus.png"), "")
self.gridLayout_10.addWidget(self.tabWidget, 0, 0, 1, 1)
MainWindow.setCentralWidget(self.centralwidget)
- self.menubar = QtGui.QMenuBar(MainWindow)
+ self.menubar = QtWidgets.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 885, 27))
- self.menubar.setObjectName(_fromUtf8("menubar"))
- self.menuFile = QtGui.QMenu(self.menubar)
- self.menuFile.setObjectName(_fromUtf8("menuFile"))
- self.menuSettings = QtGui.QMenu(self.menubar)
- self.menuSettings.setObjectName(_fromUtf8("menuSettings"))
- self.menuHelp = QtGui.QMenu(self.menubar)
- self.menuHelp.setObjectName(_fromUtf8("menuHelp"))
+ self.menubar.setObjectName("menubar")
+ self.menuFile = QtWidgets.QMenu(self.menubar)
+ self.menuFile.setObjectName("menuFile")
+ self.menuSettings = QtWidgets.QMenu(self.menubar)
+ self.menuSettings.setObjectName("menuSettings")
+ self.menuHelp = QtWidgets.QMenu(self.menubar)
+ self.menuHelp.setObjectName("menuHelp")
MainWindow.setMenuBar(self.menubar)
- self.statusbar = QtGui.QStatusBar(MainWindow)
+ self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setMaximumSize(QtCore.QSize(16777215, 22))
- self.statusbar.setObjectName(_fromUtf8("statusbar"))
+ self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
- self.actionImport_keys = QtGui.QAction(MainWindow)
- self.actionImport_keys.setObjectName(_fromUtf8("actionImport_keys"))
- self.actionManageKeys = QtGui.QAction(MainWindow)
+ self.actionImport_keys = QtWidgets.QAction(MainWindow)
+ self.actionImport_keys.setObjectName("actionImport_keys")
+ self.actionManageKeys = QtWidgets.QAction(MainWindow)
self.actionManageKeys.setCheckable(False)
self.actionManageKeys.setEnabled(True)
- icon = QtGui.QIcon.fromTheme(_fromUtf8("dialog-password"))
+ icon = QtGui.QIcon.fromTheme("dialog-password")
self.actionManageKeys.setIcon(icon)
- self.actionManageKeys.setObjectName(_fromUtf8("actionManageKeys"))
- self.actionNetworkSwitch = QtGui.QAction(MainWindow)
- self.actionNetworkSwitch.setObjectName(_fromUtf8("actionNetworkSwitch"))
- self.actionExit = QtGui.QAction(MainWindow)
- icon = QtGui.QIcon.fromTheme(_fromUtf8("application-exit"))
+ self.actionManageKeys.setObjectName("actionManageKeys")
+ self.actionNetworkSwitch = QtWidgets.QAction(MainWindow)
+ self.actionNetworkSwitch.setObjectName("actionNetworkSwitch")
+ self.actionExit = QtWidgets.QAction(MainWindow)
+ icon = QtGui.QIcon.fromTheme("application-exit")
self.actionExit.setIcon(icon)
- self.actionExit.setObjectName(_fromUtf8("actionExit"))
- self.actionHelp = QtGui.QAction(MainWindow)
- icon = QtGui.QIcon.fromTheme(_fromUtf8("help-contents"))
+ self.actionExit.setObjectName("actionExit")
+ self.actionHelp = QtWidgets.QAction(MainWindow)
+ icon = QtGui.QIcon.fromTheme("help-contents")
self.actionHelp.setIcon(icon)
- self.actionHelp.setObjectName(_fromUtf8("actionHelp"))
- self.actionSupport = QtGui.QAction(MainWindow)
- icon = QtGui.QIcon.fromTheme(_fromUtf8("help-support"))
+ self.actionHelp.setObjectName("actionHelp")
+ self.actionSupport = QtWidgets.QAction(MainWindow)
+ icon = QtGui.QIcon.fromTheme("help-support")
self.actionSupport.setIcon(icon)
- self.actionSupport.setObjectName(_fromUtf8("actionSupport"))
- self.actionAbout = QtGui.QAction(MainWindow)
- icon = QtGui.QIcon.fromTheme(_fromUtf8("help-about"))
+ self.actionSupport.setObjectName("actionSupport")
+ self.actionAbout = QtWidgets.QAction(MainWindow)
+ icon = QtGui.QIcon.fromTheme("help-about")
self.actionAbout.setIcon(icon)
- self.actionAbout.setObjectName(_fromUtf8("actionAbout"))
- self.actionSettings = QtGui.QAction(MainWindow)
- icon = QtGui.QIcon.fromTheme(_fromUtf8("document-properties"))
+ self.actionAbout.setObjectName("actionAbout")
+ self.actionSettings = QtWidgets.QAction(MainWindow)
+ icon = QtGui.QIcon.fromTheme("document-properties")
self.actionSettings.setIcon(icon)
- self.actionSettings.setObjectName(_fromUtf8("actionSettings"))
- self.actionRegenerateDeterministicAddresses = QtGui.QAction(MainWindow)
- icon = QtGui.QIcon.fromTheme(_fromUtf8("view-refresh"))
+ self.actionSettings.setObjectName("actionSettings")
+ self.actionRegenerateDeterministicAddresses = QtWidgets.QAction(MainWindow)
+ icon = QtGui.QIcon.fromTheme("view-refresh")
self.actionRegenerateDeterministicAddresses.setIcon(icon)
- self.actionRegenerateDeterministicAddresses.setObjectName(_fromUtf8("actionRegenerateDeterministicAddresses"))
- self.actionDeleteAllTrashedMessages = QtGui.QAction(MainWindow)
- icon = QtGui.QIcon.fromTheme(_fromUtf8("user-trash"))
+ self.actionRegenerateDeterministicAddresses.setObjectName("actionRegenerateDeterministicAddresses")
+ self.actionDeleteAllTrashedMessages = QtWidgets.QAction(MainWindow)
+ icon = QtGui.QIcon.fromTheme("user-trash")
self.actionDeleteAllTrashedMessages.setIcon(icon)
- self.actionDeleteAllTrashedMessages.setObjectName(_fromUtf8("actionDeleteAllTrashedMessages"))
- self.actionJoinChan = QtGui.QAction(MainWindow)
- icon = QtGui.QIcon.fromTheme(_fromUtf8("contact-new"))
+ self.actionDeleteAllTrashedMessages.setObjectName("actionDeleteAllTrashedMessages")
+ self.actionJoinChan = QtWidgets.QAction(MainWindow)
+ icon = QtGui.QIcon.fromTheme("contact-new")
self.actionJoinChan.setIcon(icon)
- self.actionJoinChan.setObjectName(_fromUtf8("actionJoinChan"))
+ self.actionJoinChan.setObjectName("actionJoinChan")
self.menuFile.addAction(self.actionManageKeys)
self.menuFile.addAction(self.actionDeleteAllTrashedMessages)
self.menuFile.addAction(self.actionRegenerateDeterministicAddresses)
@@ -671,11 +634,11 @@ class Ui_MainWindow(object):
# Popup menu actions container for the Sent page
# pylint: disable=attribute-defined-outside-init
- self.sentContextMenuToolbar = QtGui.QToolBar()
+ self.sentContextMenuToolbar = QtWidgets.QToolBar()
# Popup menu actions container for chans tree
- self.addressContextMenuToolbar = QtGui.QToolBar()
+ self.addressContextMenuToolbar = QtWidgets.QToolBar()
# Popup menu actions container for subscriptions tree
- self.subscriptionsContextMenuToolbar = QtGui.QToolBar()
+ self.subscriptionsContextMenuToolbar = QtWidgets.QToolBar()
def updateNetworkSwitchMenuLabel(self, dontconnect=None):
if dontconnect is None:
@@ -732,9 +695,7 @@ class Ui_MainWindow(object):
hours = int(config.getint('bitmessagesettings', 'ttl') / 60 / 60)
except:
pass
- self.labelHumanFriendlyTTLDescription.setText(
- _translate("MainWindow", "%n hour(s)", None, QtCore.QCoreApplication.CodecForTr, hours)
- )
+ self.labelHumanFriendlyTTLDescription.setText(_translate("MainWindow", "%n hour(s)", None, hours))
self.pushButtonClear.setText(_translate("MainWindow", "Clear", None))
self.pushButtonSend.setText(_translate("MainWindow", "Send", None))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.send), _translate("MainWindow", "Send", None))
@@ -809,7 +770,7 @@ class Ui_MainWindow(object):
if __name__ == "__main__":
import sys
- app = QtGui.QApplication(sys.argv)
+ app = QtWidgets.QApplication(sys.argv)
MainWindow = settingsmixin.SMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
diff --git a/src/bitmessageqt/blacklist.py b/src/bitmessageqt/blacklist.py
index 093f23d8..ae271866 100644
--- a/src/bitmessageqt/blacklist.py
+++ b/src/bitmessageqt/blacklist.py
@@ -1,4 +1,4 @@
-from PyQt4 import QtCore, QtGui
+from qtpy import QtCore, QtGui, QtWidgets
import widgets
from addresses import addBMIfNotPresent
@@ -12,31 +12,31 @@ from uisignaler import UISignaler
from utils import avatarize
-class Blacklist(QtGui.QWidget, RetranslateMixin):
+class Blacklist(QtWidgets.QWidget, RetranslateMixin):
def __init__(self, parent=None):
super(Blacklist, self).__init__(parent)
widgets.load('blacklist.ui', self)
- QtCore.QObject.connect(self.radioButtonBlacklist, QtCore.SIGNAL(
- "clicked()"), self.click_radioButtonBlacklist)
- QtCore.QObject.connect(self.radioButtonWhitelist, QtCore.SIGNAL(
- "clicked()"), self.click_radioButtonWhitelist)
- QtCore.QObject.connect(self.pushButtonAddBlacklist, QtCore.SIGNAL(
- "clicked()"), self.click_pushButtonAddBlacklist)
+ self.radioButtonBlacklist.clicked.connect(
+ self.click_radioButtonBlacklist)
+ self.radioButtonWhitelist.clicked.connect(
+ self.click_radioButtonWhitelist)
+ self.pushButtonAddBlacklist.clicked.connect(
+ self.click_pushButtonAddBlacklist)
self.init_blacklist_popup_menu()
- # Initialize blacklist
- QtCore.QObject.connect(self.tableWidgetBlacklist, QtCore.SIGNAL(
- "itemChanged(QTableWidgetItem *)"), self.tableWidgetBlacklistItemChanged)
+ self.tableWidgetBlacklist.itemChanged.connect(
+ self.tableWidgetBlacklistItemChanged)
# Set the icon sizes for the identicons
- identicon_size = 3*7
- self.tableWidgetBlacklist.setIconSize(QtCore.QSize(identicon_size, identicon_size))
+ identicon_size = 3 * 7
+ self.tableWidgetBlacklist.setIconSize(
+ QtCore.QSize(identicon_size, identicon_size))
self.UISignalThread = UISignaler.get()
- QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
- "rerenderBlackWhiteList()"), self.rerenderBlackWhiteList)
+ self.UISignalThread.rerenderBlackWhiteList.connect(
+ self.rerenderBlackWhiteList)
def click_radioButtonBlacklist(self):
if config.get('bitmessagesettings', 'blackwhitelist') == 'white':
@@ -69,20 +69,20 @@ class Blacklist(QtGui.QWidget, RetranslateMixin):
sql = '''select * from blacklist where address=?'''
else:
sql = '''select * from whitelist where address=?'''
- queryreturn = sqlQuery(sql,*t)
+ queryreturn = sqlQuery(sql, *t)
if queryreturn == []:
self.tableWidgetBlacklist.setSortingEnabled(False)
self.tableWidgetBlacklist.insertRow(0)
- newItem = QtGui.QTableWidgetItem(unicode(
- self.NewBlacklistDialogInstance.lineEditLabel.text().toUtf8(), 'utf-8'))
+ newItem = QtGui.QTableWidgetItem(
+ self.NewBlacklistDialogInstance.lineEditLabel.text())
newItem.setIcon(avatarize(address))
self.tableWidgetBlacklist.setItem(0, 0, newItem)
- newItem = QtGui.QTableWidgetItem(address)
+ newItem = QtWidgets.QTableWidgetItem(address)
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
self.tableWidgetBlacklist.setItem(0, 1, newItem)
self.tableWidgetBlacklist.setSortingEnabled(True)
- t = (str(self.NewBlacklistDialogInstance.lineEditLabel.text().toUtf8()), address, True)
+ t = (self.NewBlacklistDialogInstance.lineEditLabel.text(), address, True)
if config.get('bitmessagesettings', 'blackwhitelist') == 'black':
sql = '''INSERT INTO blacklist VALUES (?,?,?)'''
else:
@@ -108,17 +108,17 @@ class Blacklist(QtGui.QWidget, RetranslateMixin):
def tableWidgetBlacklistItemChanged(self, item):
if item.column() == 0:
addressitem = self.tableWidgetBlacklist.item(item.row(), 1)
- if isinstance(addressitem, QtGui.QTableWidgetItem):
+ if isinstance(addressitem, QtWidgets.QTableWidgetItem):
if self.radioButtonBlacklist.isChecked():
sqlExecute('''UPDATE blacklist SET label=? WHERE address=?''',
- str(item.text()), str(addressitem.text()))
+ item.text(), str(addressitem.text()))
else:
sqlExecute('''UPDATE whitelist SET label=? WHERE address=?''',
- str(item.text()), str(addressitem.text()))
+ item.text(), str(addressitem.text()))
def init_blacklist_popup_menu(self, connectSignal=True):
# Popup menu for the Blacklist page
- self.blacklistContextMenuToolbar = QtGui.QToolBar()
+ self.blacklistContextMenuToolbar = QtWidgets.QToolBar()
# Actions
self.actionBlacklistNew = self.blacklistContextMenuToolbar.addAction(
_translate(
@@ -143,10 +143,9 @@ class Blacklist(QtGui.QWidget, RetranslateMixin):
self.tableWidgetBlacklist.setContextMenuPolicy(
QtCore.Qt.CustomContextMenu)
if connectSignal:
- self.connect(self.tableWidgetBlacklist, QtCore.SIGNAL(
- 'customContextMenuRequested(const QPoint&)'),
- self.on_context_menuBlacklist)
- self.popMenuBlacklist = QtGui.QMenu(self)
+ self.tableWidgetBlacklist.customContextMenuRequested.connect(
+ self.on_context_menuBlacklist)
+ self.popMenuBlacklist = QtWidgets.QMenu(self)
# self.popMenuBlacklist.addAction( self.actionBlacklistNew )
self.popMenuBlacklist.addAction(self.actionBlacklistDelete)
self.popMenuBlacklist.addSeparator()
@@ -172,16 +171,16 @@ class Blacklist(QtGui.QWidget, RetranslateMixin):
for row in queryreturn:
label, address, enabled = row
self.tableWidgetBlacklist.insertRow(0)
- newItem = QtGui.QTableWidgetItem(unicode(label, 'utf-8'))
+ newItem = QtWidgets.QTableWidgetItem(label)
if not enabled:
- newItem.setTextColor(QtGui.QColor(128, 128, 128))
+ newItem.setForeground(QtGui.QColor(128, 128, 128))
newItem.setIcon(avatarize(address))
self.tableWidgetBlacklist.setItem(0, 0, newItem)
- newItem = QtGui.QTableWidgetItem(address)
+ newItem = QtWidgets.QTableWidgetItem(address)
newItem.setFlags(
QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
if not enabled:
- newItem.setTextColor(QtGui.QColor(128, 128, 128))
+ newItem.setForeground(QtGui.QColor(128, 128, 128))
self.tableWidgetBlacklist.setItem(0, 1, newItem)
self.tableWidgetBlacklist.setSortingEnabled(True)
@@ -192,24 +191,24 @@ class Blacklist(QtGui.QWidget, RetranslateMixin):
def on_action_BlacklistDelete(self):
currentRow = self.tableWidgetBlacklist.currentRow()
labelAtCurrentRow = self.tableWidgetBlacklist.item(
- currentRow, 0).text().toUtf8()
+ currentRow, 0).text()
addressAtCurrentRow = self.tableWidgetBlacklist.item(
currentRow, 1).text()
if config.get('bitmessagesettings', 'blackwhitelist') == 'black':
sqlExecute(
'''DELETE FROM blacklist WHERE label=? AND address=?''',
- str(labelAtCurrentRow), str(addressAtCurrentRow))
+ labelAtCurrentRow, addressAtCurrentRow)
else:
sqlExecute(
'''DELETE FROM whitelist WHERE label=? AND address=?''',
- str(labelAtCurrentRow), str(addressAtCurrentRow))
+ labelAtCurrentRow, addressAtCurrentRow)
self.tableWidgetBlacklist.removeRow(currentRow)
def on_action_BlacklistClipboard(self):
currentRow = self.tableWidgetBlacklist.currentRow()
addressAtCurrentRow = self.tableWidgetBlacklist.item(
currentRow, 1).text()
- clipboard = QtGui.QApplication.clipboard()
+ clipboard = QtWidgets.QApplication.clipboard()
clipboard.setText(str(addressAtCurrentRow))
def on_context_menuBlacklist(self, point):
@@ -220,10 +219,10 @@ class Blacklist(QtGui.QWidget, RetranslateMixin):
currentRow = self.tableWidgetBlacklist.currentRow()
addressAtCurrentRow = self.tableWidgetBlacklist.item(
currentRow, 1).text()
- self.tableWidgetBlacklist.item(
- currentRow, 0).setTextColor(QtGui.QApplication.palette().text().color())
- self.tableWidgetBlacklist.item(
- currentRow, 1).setTextColor(QtGui.QApplication.palette().text().color())
+ self.tableWidgetBlacklist.item(currentRow, 0).setForeground(
+ QtWidgets.QApplication.palette().text().color())
+ self.tableWidgetBlacklist.item(currentRow, 1).setForeground(
+ QtWidgets.QApplication.palette().text().color())
if config.get('bitmessagesettings', 'blackwhitelist') == 'black':
sqlExecute(
'''UPDATE blacklist SET enabled=1 WHERE address=?''',
@@ -237,10 +236,10 @@ class Blacklist(QtGui.QWidget, RetranslateMixin):
currentRow = self.tableWidgetBlacklist.currentRow()
addressAtCurrentRow = self.tableWidgetBlacklist.item(
currentRow, 1).text()
- self.tableWidgetBlacklist.item(
- currentRow, 0).setTextColor(QtGui.QColor(128, 128, 128))
- self.tableWidgetBlacklist.item(
- currentRow, 1).setTextColor(QtGui.QColor(128, 128, 128))
+ self.tableWidgetBlacklist.item(currentRow, 0).setForeground(
+ QtGui.QColor(128, 128, 128))
+ self.tableWidgetBlacklist.item(currentRow, 1).setForeground(
+ QtGui.QColor(128, 128, 128))
if config.get('bitmessagesettings', 'blackwhitelist') == 'black':
sqlExecute(
'''UPDATE blacklist SET enabled=0 WHERE address=?''', str(addressAtCurrentRow))
diff --git a/src/bitmessageqt/blacklist.ui b/src/bitmessageqt/blacklist.ui
index 80993fac..c3b9b5a3 100644
--- a/src/bitmessageqt/blacklist.ui
+++ b/src/bitmessageqt/blacklist.ui
@@ -62,6 +62,9 @@
true
+
+ false
+ true
@@ -98,11 +101,8 @@
STableWidgetQTableWidget
- bitmessageqt/settingsmixin.h
+ bitmessageqt.settingsmixin
-
-
-
diff --git a/src/bitmessageqt/dialogs.py b/src/bitmessageqt/dialogs.py
index dc31e266..07224f00 100644
--- a/src/bitmessageqt/dialogs.py
+++ b/src/bitmessageqt/dialogs.py
@@ -1,8 +1,9 @@
"""
-Custom dialog classes
+All dialogs are available in this module.
"""
# pylint: disable=too-few-public-methods
-from PyQt4 import QtGui
+
+from qtpy import QtWidgets
import paths
import widgets
@@ -16,7 +17,6 @@ from settings import SettingsDialog
from tr import _translate
from version import softwareVersion
-
__all__ = [
"NewChanDialog", "AddAddressDialog", "NewAddressDialog",
"NewSubscriptionDialog", "RegenerateAddressesDialog",
@@ -25,8 +25,8 @@ __all__ = [
]
-class AboutDialog(QtGui.QDialog):
- """The `About` dialog"""
+class AboutDialog(QtWidgets.QDialog):
+ """The "About" dialog"""
def __init__(self, parent=None):
super(AboutDialog, self).__init__(parent)
widgets.load('about.ui', self)
@@ -50,11 +50,11 @@ class AboutDialog(QtGui.QDialog):
except AttributeError:
pass
- self.setFixedSize(QtGui.QWidget.sizeHint(self))
+ self.setFixedSize(QtWidgets.QWidget.sizeHint(self))
-class IconGlossaryDialog(QtGui.QDialog):
- """The `Icon Glossary` dialog, explaining the status icon colors"""
+class IconGlossaryDialog(QtWidgets.QDialog):
+ """The "Icon Glossary" dialog, explaining the status icon colors"""
def __init__(self, parent=None, config=None):
super(IconGlossaryDialog, self).__init__(parent)
widgets.load('iconglossary.ui', self)
@@ -64,22 +64,23 @@ class IconGlossaryDialog(QtGui.QDialog):
self.labelPortNumber.setText(_translate(
"iconGlossaryDialog",
- "You are using TCP port %1. (This can be changed in the settings)."
- ).arg(config.getint('bitmessagesettings', 'port')))
- self.setFixedSize(QtGui.QWidget.sizeHint(self))
+ "You are using TCP port {0}."
+ " (This can be changed in the settings)."
+ ).format(config.getint('bitmessagesettings', 'port')))
+ self.setFixedSize(QtWidgets.QWidget.sizeHint(self))
-class HelpDialog(QtGui.QDialog):
- """The `Help` dialog"""
+class HelpDialog(QtWidgets.QDialog):
+ """The "Help" dialog"""
def __init__(self, parent=None):
super(HelpDialog, self).__init__(parent)
widgets.load('help.ui', self)
- self.setFixedSize(QtGui.QWidget.sizeHint(self))
+ self.setFixedSize(QtWidgets.QWidget.sizeHint(self))
-class ConnectDialog(QtGui.QDialog):
- """The `Connect` dialog"""
+class ConnectDialog(QtWidgets.QDialog):
+ """The "Connect" dialog"""
def __init__(self, parent=None):
super(ConnectDialog, self).__init__(parent)
widgets.load('connect.ui', self)
- self.setFixedSize(QtGui.QWidget.sizeHint(self))
+ self.setFixedSize(QtWidgets.QWidget.sizeHint(self))
diff --git a/src/bitmessageqt/foldertree.py b/src/bitmessageqt/foldertree.py
index c50b7d3d..57c2cd12 100644
--- a/src/bitmessageqt/foldertree.py
+++ b/src/bitmessageqt/foldertree.py
@@ -1,12 +1,12 @@
"""
Folder tree and messagelist widgets definitions.
"""
-# pylint: disable=too-many-arguments,bad-super-call
+# pylint: disable=too-many-arguments
# pylint: disable=attribute-defined-outside-init
from cgi import escape
-from PyQt4 import QtCore, QtGui
+from qtpy import QtCore, QtGui, QtWidgets
from bmconfigparser import config
from helper_sql import sqlExecute, sqlQuery
@@ -38,15 +38,16 @@ class AccountMixin(object):
return QtGui.QColor(128, 128, 128)
elif self.type == self.CHAN:
return QtGui.QColor(216, 119, 0)
- elif self.type in [self.MAILINGLIST, self.SUBSCRIPTION]:
+ elif self.type in (self.MAILINGLIST, self.SUBSCRIPTION):
return QtGui.QColor(137, 4, 177)
- return QtGui.QApplication.palette().text().color()
+
+ return QtWidgets.QApplication.palette().text().color()
def folderColor(self):
"""QT UI color for a folder"""
if not self.parent().isEnabled:
return QtGui.QColor(128, 128, 128)
- return QtGui.QApplication.palette().text().color()
+ return QtWidgets.QApplication.palette().text().color()
def accountBrush(self):
"""Account brush (for QT UI)"""
@@ -83,7 +84,7 @@ class AccountMixin(object):
except AttributeError:
pass
self.unreadCount = int(cnt)
- if isinstance(self, QtGui.QTreeWidgetItem):
+ if isinstance(self, QtWidgets.QTreeWidgetItem):
self.emitDataChanged()
def setEnabled(self, enabled):
@@ -97,7 +98,7 @@ class AccountMixin(object):
for i in range(self.childCount()):
if isinstance(self.child(i), Ui_FolderWidget):
self.child(i).setEnabled(enabled)
- if isinstance(self, QtGui.QTreeWidgetItem):
+ if isinstance(self, QtWidgets.QTreeWidgetItem):
self.emitDataChanged()
def setType(self):
@@ -111,44 +112,44 @@ class AccountMixin(object):
elif config.safeGetBoolean(self.address, 'mailinglist'):
self.type = self.MAILINGLIST
elif sqlQuery(
- '''select label from subscriptions where address=?''', self.address):
+ 'SELECT label FROM subscriptions WHERE address=?',
+ self.address
+ ):
self.type = AccountMixin.SUBSCRIPTION
else:
self.type = self.NORMAL
def defaultLabel(self):
"""Default label (in case no label is set manually)"""
- queryreturn = None
- retval = None
+ queryreturn = retval = None
if self.type in (
AccountMixin.NORMAL,
AccountMixin.CHAN, AccountMixin.MAILINGLIST):
try:
- retval = unicode(
- config.get(self.address, 'label'), 'utf-8')
+ retval = config.get(self.address, 'label')
except Exception:
queryreturn = sqlQuery(
- '''select label from addressbook where address=?''', self.address)
+ 'SELECT label FROM addressbook WHERE address=?',
+ self.address
+ )
elif self.type == AccountMixin.SUBSCRIPTION:
queryreturn = sqlQuery(
- '''select label from subscriptions where address=?''', self.address)
- if queryreturn is not None:
- if queryreturn != []:
- for row in queryreturn:
- retval, = row
- retval = unicode(retval, 'utf-8')
+ 'SELECT label FROM subscriptions WHERE address=?',
+ self.address
+ )
+ if queryreturn:
+ retval = queryreturn[-1][0]
elif self.address is None or self.type == AccountMixin.ALL:
- return unicode(
- str(_translate("MainWindow", "All accounts")), 'utf-8')
+ return _translate("MainWindow", "All accounts")
- return retval or unicode(self.address, 'utf-8')
+ return (retval or self.address).decode('utf-8')
-class BMTreeWidgetItem(QtGui.QTreeWidgetItem, AccountMixin):
+class BMTreeWidgetItem(QtWidgets.QTreeWidgetItem, AccountMixin):
"""A common abstract class for Tree widget item"""
def __init__(self, parent, pos, address, unreadCount):
- super(QtGui.QTreeWidgetItem, self).__init__()
+ super(QtWidgets.QTreeWidgetItem, self).__init__()
self.setAddress(address)
self.setUnreadCount(unreadCount)
self._setup(parent, pos)
@@ -157,7 +158,7 @@ class BMTreeWidgetItem(QtGui.QTreeWidgetItem, AccountMixin):
return " (" + str(self.unreadCount) + ")" if unreadCount else ""
def data(self, column, role):
- """Override internal QT method for returning object data"""
+ """Override internal Qt method for returning object data"""
if column == 0:
if role == QtCore.Qt.DisplayRole:
return self._getLabel() + self._getAddressBracket(
@@ -190,11 +191,11 @@ class Ui_FolderWidget(BMTreeWidgetItem):
return _translate("MainWindow", self.folderName)
def setFolderName(self, fname):
- """Set folder name (for QT UI)"""
+ """Set folder name (for Qt UI)"""
self.folderName = str(fname)
def data(self, column, role):
- """Override internal QT method for returning object data"""
+ """Override internal Qt method for returning object data"""
if column == 0 and role == QtCore.Qt.ForegroundRole:
return self.folderBrush()
return super(Ui_FolderWidget, self).data(column, role)
@@ -216,12 +217,14 @@ class Ui_FolderWidget(BMTreeWidgetItem):
return self.folderName < other.folderName
return x >= y if reverse else x < y
- return super(QtGui.QTreeWidgetItem, self).__lt__(other)
+ return super(QtWidgets.QTreeWidgetItem, self).__lt__(other)
class Ui_AddressWidget(BMTreeWidgetItem, SettingsMixin):
"""Item in the account/folder tree representing an account"""
- def __init__(self, parent, pos=0, address=None, unreadCount=0, enabled=True):
+ def __init__(
+ self, parent, pos=0, address=None, unreadCount=0, enabled=True
+ ):
super(Ui_AddressWidget, self).__init__(
parent, pos, address, unreadCount)
self.setEnabled(enabled)
@@ -232,15 +235,12 @@ class Ui_AddressWidget(BMTreeWidgetItem, SettingsMixin):
def _getLabel(self):
if self.address is None:
- return unicode(_translate(
- "MainWindow", "All accounts").toUtf8(), 'utf-8', 'ignore')
- else:
- try:
- return unicode(
- config.get(self.address, 'label'),
- 'utf-8', 'ignore')
- except:
- return unicode(self.address, 'utf-8')
+ return _translate("MainWindow", "All accounts")
+
+ try:
+ return config.get(self.address, 'label').decode('utf-8', 'ignore')
+ except:
+ return self.address.decode('utf-8')
def _getAddressBracket(self, unreadCount=False):
ret = "" if self.isExpanded() \
@@ -260,15 +260,13 @@ class Ui_AddressWidget(BMTreeWidgetItem, SettingsMixin):
return super(Ui_AddressWidget, self).data(column, role)
def setData(self, column, role, value):
- """Save account label (if you edit in the the UI, this will be triggered and will save it to keys.dat)"""
+ """
+ Save account label (if you edit in the the UI, this will be
+ triggered and will save it to keys.dat)
+ """
if role == QtCore.Qt.EditRole \
and self.type != AccountMixin.SUBSCRIPTION:
- config.set(
- str(self.address), 'label',
- str(value.toString().toUtf8())
- if isinstance(value, QtCore.QVariant)
- else value.encode('utf-8')
- )
+ config.set(str(self.address), 'label', value.encode('utf-8'))
config.save()
return super(Ui_AddressWidget, self).setData(column, role, value)
@@ -295,24 +293,26 @@ class Ui_AddressWidget(BMTreeWidgetItem, SettingsMixin):
if self._getSortRank() < other._getSortRank() else reverse
)
- return super(QtGui.QTreeWidgetItem, self).__lt__(other)
+ return super(Ui_AddressWidget, self).__lt__(other)
class Ui_SubscriptionWidget(Ui_AddressWidget):
"""Special treating of subscription addresses"""
# pylint: disable=unused-argument
- def __init__(self, parent, pos=0, address="", unreadCount=0, label="", enabled=True):
+ def __init__(
+ self, parent, pos=0, address="", unreadCount=0, label="",
+ enabled=True
+ ):
super(Ui_SubscriptionWidget, self).__init__(
parent, pos, address, unreadCount, enabled)
def _getLabel(self):
queryreturn = sqlQuery(
- '''select label from subscriptions where address=?''', self.address)
- if queryreturn != []:
- for row in queryreturn:
- retval, = row
- return unicode(retval, 'utf-8', 'ignore')
- return unicode(self.address, 'utf-8')
+ 'SELECT label FROM subscriptions WHERE address=?',
+ self.address)
+ if queryreturn:
+ return queryreturn[-1][0].decode('utf-8', 'ignore')
+ return self.address.decode('utf-8')
def setType(self):
"""Set account type"""
@@ -322,22 +322,17 @@ class Ui_SubscriptionWidget(Ui_AddressWidget):
def setData(self, column, role, value):
"""Save subscription label to database"""
if role == QtCore.Qt.EditRole:
- if isinstance(value, QtCore.QVariant):
- label = str(
- value.toString().toUtf8()).decode('utf-8', 'ignore')
- else:
- label = unicode(value, 'utf-8', 'ignore')
sqlExecute(
- '''UPDATE subscriptions SET label=? WHERE address=?''',
- label, self.address)
+ 'UPDATE subscriptions SET label=? WHERE address=?',
+ value, self.address)
return super(Ui_SubscriptionWidget, self).setData(column, role, value)
-class BMTableWidgetItem(QtGui.QTableWidgetItem, SettingsMixin):
+class BMTableWidgetItem(QtWidgets.QTableWidgetItem, SettingsMixin):
"""A common abstract class for Table widget item"""
def __init__(self, label=None, unread=False):
- super(QtGui.QTableWidgetItem, self).__init__()
+ super(QtWidgets.QTableWidgetItem, self).__init__()
self.setLabel(label)
self.setUnread(unread)
self._setup()
@@ -407,20 +402,19 @@ class MessageList_AddressWidget(BMAddressWidget):
AccountMixin.NORMAL,
AccountMixin.CHAN, AccountMixin.MAILINGLIST):
try:
- newLabel = unicode(
- config.get(self.address, 'label'),
- 'utf-8', 'ignore')
+ newLabel = config.get(self.address, 'label')
except:
queryreturn = sqlQuery(
- '''select label from addressbook where address=?''', self.address)
+ 'SELECT label FROM addressbook WHERE address=?',
+ self.address)
elif self.type == AccountMixin.SUBSCRIPTION:
queryreturn = sqlQuery(
- '''select label from subscriptions where address=?''', self.address)
+ 'SELECT label FROM subscriptions WHERE address=?',
+ self.address)
if queryreturn:
- for row in queryreturn:
- newLabel = unicode(row[0], 'utf-8', 'ignore')
+ newLabel = queryreturn[-1][0]
- self.label = newLabel
+ self.label = newLabel.decode('utf-8', 'ignore')
def data(self, role):
"""Return object data (QT UI)"""
@@ -438,7 +432,7 @@ class MessageList_AddressWidget(BMAddressWidget):
def __lt__(self, other):
if isinstance(other, MessageList_AddressWidget):
return self.label.lower() < other.label.lower()
- return super(QtGui.QTableWidgetItem, self).__lt__(other)
+ return super(MessageList_AddressWidget, self).__lt__(other)
class MessageList_SubjectWidget(BMTableWidgetItem):
@@ -456,14 +450,14 @@ class MessageList_SubjectWidget(BMTableWidgetItem):
if role == QtCore.Qt.UserRole:
return self.subject
if role == QtCore.Qt.ToolTipRole:
- return escape(unicode(self.subject, 'utf-8'))
+ return escape(self.subject)
return super(MessageList_SubjectWidget, self).data(role)
# label (or address) alphabetically, disabled at the end
def __lt__(self, other):
if isinstance(other, MessageList_SubjectWidget):
return self.label.lower() < other.label.lower()
- return super(QtGui.QTableWidgetItem, self).__lt__(other)
+ return super(MessageList_SubjectWidget, self).__lt__(other)
# In order for the time columns on the Inbox and Sent tabs to be sorted
@@ -491,15 +485,14 @@ class MessageList_TimeWidget(BMTableWidgetItem):
"""
data = super(MessageList_TimeWidget, self).data(role)
if role == TimestampRole:
- return int(data.toPyObject())
+ return int(data)
if role == QtCore.Qt.UserRole:
- return str(data.toPyObject())
+ return str(data)
return data
class Ui_AddressBookWidgetItem(BMAddressWidget):
"""Addressbook item"""
- # pylint: disable=unused-argument
def __init__(self, label=None, acc_type=AccountMixin.NORMAL):
self.type = acc_type
super(Ui_AddressBookWidgetItem, self).__init__(label=label)
@@ -513,10 +506,7 @@ class Ui_AddressBookWidgetItem(BMAddressWidget):
def setData(self, role, value):
"""Set data"""
if role == QtCore.Qt.EditRole:
- self.label = str(
- value.toString().toUtf8()
- if isinstance(value, QtCore.QVariant) else value
- )
+ self.label = value.encode('utf-8')
if self.type in (
AccountMixin.NORMAL,
AccountMixin.MAILINGLIST, AccountMixin.CHAN):
@@ -525,22 +515,27 @@ class Ui_AddressBookWidgetItem(BMAddressWidget):
config.set(self.address, 'label', self.label)
config.save()
except:
- sqlExecute('''UPDATE addressbook set label=? WHERE address=?''', self.label, self.address)
+ sqlExecute(
+ 'UPDATE addressbook SET label=? WHERE address=?',
+ self.label, self.address
+ )
elif self.type == AccountMixin.SUBSCRIPTION:
- sqlExecute('''UPDATE subscriptions set label=? WHERE address=?''', self.label, self.address)
- else:
- pass
+ sqlExecute(
+ 'UPDATE subscriptions SET label=? WHERE address=?',
+ self.label, self.address)
return super(Ui_AddressBookWidgetItem, self).setData(role, value)
def __lt__(self, other):
- if isinstance(other, Ui_AddressBookWidgetItem):
- reverse = QtCore.Qt.DescendingOrder == \
- self.tableWidget().horizontalHeader().sortIndicatorOrder()
+ if not isinstance(other, Ui_AddressBookWidgetItem):
+ return super(Ui_AddressBookWidgetItem, self).__lt__(other)
- if self.type == other.type:
- return self.label.lower() < other.label.lower()
- return not reverse if self.type < other.type else reverse
- return super(QtGui.QTableWidgetItem, self).__lt__(other)
+ reverse = QtCore.Qt.DescendingOrder == \
+ self.tableWidget().horizontalHeader().sortIndicatorOrder()
+
+ if self.type == other.type:
+ return self.label.lower() < other.label.lower()
+
+ return not reverse if self.type < other.type else reverse
class Ui_AddressBookWidgetItemLabel(Ui_AddressBookWidgetItem):
@@ -570,28 +565,26 @@ class Ui_AddressBookWidgetItemAddress(Ui_AddressBookWidgetItem):
return super(Ui_AddressBookWidgetItemAddress, self).data(role)
-class AddressBookCompleter(QtGui.QCompleter):
+class AddressBookCompleter(QtWidgets.QCompleter):
"""Addressbook completer"""
-
def __init__(self):
super(AddressBookCompleter, self).__init__()
self.cursorPos = -1
- def onCursorPositionChanged(self, oldPos, newPos): # pylint: disable=unused-argument
+ def onCursorPositionChanged(self, oldPos, newPos):
"""Callback for cursor position change"""
+ # pylint: disable=unused-argument
if oldPos != self.cursorPos:
self.cursorPos = -1
def splitPath(self, path):
"""Split on semicolon"""
- text = unicode(path.toUtf8(), 'utf-8')
- return [text[:self.widget().cursorPosition()].split(';')[-1].strip()]
+ return [path[:self.widget().cursorPosition()].split(';')[-1].strip()]
def pathFromIndex(self, index):
"""Perform autocompletion (reimplemented QCompleter method)"""
- autoString = unicode(
- index.data(QtCore.Qt.EditRole).toString().toUtf8(), 'utf-8')
- text = unicode(self.widget().text().toUtf8(), 'utf-8')
+ autoString = index.data(QtCore.Qt.EditRole).toString()
+ text = self.widget().text()
# If cursor position was saved, restore it, else save it
if self.cursorPos != -1:
@@ -620,7 +613,6 @@ class AddressBookCompleter(QtGui.QCompleter):
# Get string value from before auto finished string is selected
# pre = text[prevDelimiterIndex + 1:curIndex - 1]
-
# Get part of string that occurs AFTER cursor
part2 = text[nextDelimiterIndex:]
diff --git a/src/bitmessageqt/languagebox.py b/src/bitmessageqt/languagebox.py
index 34f96b02..c4b61154 100644
--- a/src/bitmessageqt/languagebox.py
+++ b/src/bitmessageqt/languagebox.py
@@ -1,48 +1,56 @@
-"""Language Box Module for Locale Settings"""
-# pylint: disable=too-few-public-methods,bad-continuation
+"""LanguageBox widget is for selecting UI language"""
+
import glob
import os
-from PyQt4 import QtCore, QtGui
+from qtpy import QtCore, QtWidgets
import paths
from bmconfigparser import config
+from tr import _translate
-class LanguageBox(QtGui.QComboBox):
- """LanguageBox class for Qt UI"""
+# pylint: disable=too-few-public-methods
+class LanguageBox(QtWidgets.QComboBox):
+ """A subclass of `QtWidgets.QComboBox` for selecting language"""
languageName = {
- "system": "System Settings", "eo": "Esperanto",
+ "system": "System Settings",
+ "eo": "Esperanto",
"en_pirate": "Pirate English"
}
def __init__(self, parent=None):
- super(QtGui.QComboBox, self).__init__(parent)
+ super(LanguageBox, self).__init__(parent)
self.populate()
def populate(self):
"""Populates drop down list with all available languages."""
self.clear()
localesPath = os.path.join(paths.codePath(), 'translations')
- self.addItem(QtGui.QApplication.translate(
- "settingsDialog", "System Settings", "system"), "system")
+ self.addItem(
+ _translate("settingsDialog", "System Settings", "system"),
+ "system"
+ )
self.setCurrentIndex(0)
- self.setInsertPolicy(QtGui.QComboBox.InsertAlphabetically)
+ self.setInsertPolicy(QtWidgets.QComboBox.InsertAlphabetically)
for translationFile in sorted(
glob.glob(os.path.join(localesPath, "bitmessage_*.qm"))
):
localeShort = \
os.path.split(translationFile)[1].split("_", 1)[1][:-3]
+ locale = QtCore.QLocale(localeShort)
if localeShort in LanguageBox.languageName:
self.addItem(
LanguageBox.languageName[localeShort], localeShort)
+ elif locale.nativeLanguageName() == "":
+ self.addItem(localeShort, localeShort)
else:
locale = QtCore.QLocale(localeShort)
self.addItem(
locale.nativeLanguageName() or localeShort, localeShort)
configuredLocale = config.safeGet(
- 'bitmessagesettings', 'userlocale', "system")
+ 'bitmessagesettings', 'userlocale', 'system')
for i in range(self.count()):
if self.itemData(i) == configuredLocale:
self.setCurrentIndex(i)
diff --git a/src/bitmessageqt/messagecompose.py b/src/bitmessageqt/messagecompose.py
index c51282f8..68de5ce0 100644
--- a/src/bitmessageqt/messagecompose.py
+++ b/src/bitmessageqt/messagecompose.py
@@ -1,33 +1,34 @@
-"""
-Message editor with a wheel zoom functionality
-"""
-# pylint: disable=bad-continuation
+"""The MessageCompose class definition"""
-from PyQt4 import QtCore, QtGui
+from qtpy import QtCore, QtWidgets
+from tr import _translate
-class MessageCompose(QtGui.QTextEdit):
+class MessageCompose(QtWidgets.QTextEdit):
"""Editor class with wheel zoom functionality"""
- def __init__(self, parent=0):
+ def __init__(self, parent=None):
super(MessageCompose, self).__init__(parent)
+ # we'll deal with this later when we have a new message format
self.setAcceptRichText(False)
self.defaultFontPointSize = self.currentFont().pointSize()
def wheelEvent(self, event):
"""Mouse wheel scroll event handler"""
if (
- QtGui.QApplication.queryKeyboardModifiers() & QtCore.Qt.ControlModifier
- ) == QtCore.Qt.ControlModifier and event.orientation() == QtCore.Qt.Vertical:
+ (QtWidgets.QApplication.queryKeyboardModifiers()
+ & QtCore.Qt.ControlModifier) == QtCore.Qt.ControlModifier
+ and event.angleDelta().y() != 0
+ ):
if event.delta() > 0:
self.zoomIn(1)
else:
self.zoomOut(1)
- zoom = self.currentFont().pointSize() * 100 / self.defaultFontPointSize
- QtGui.QApplication.activeWindow().statusBar().showMessage(
- QtGui.QApplication.translate("MainWindow", "Zoom level %1%").arg(
- str(zoom)
- )
- )
+ QtWidgets.QApplication.activeWindow().statusbar.showMessage(
+ _translate("MainWindow", "Zoom level {0}%").format(
+ # zoom percentage
+ self.currentFont().pointSize() * 100
+ / self.defaultFontPointSize
+ ))
else:
# in QTextEdit, super does not zoom, only scroll
super(MessageCompose, self).wheelEvent(event)
diff --git a/src/bitmessageqt/messageview.py b/src/bitmessageqt/messageview.py
index 13ea16f9..ebf23c87 100644
--- a/src/bitmessageqt/messageview.py
+++ b/src/bitmessageqt/messageview.py
@@ -1,22 +1,21 @@
"""
Custom message viewer with support for switching between HTML and plain
text rendering, HTML sanitization, lazy rendering (as you scroll down),
-zoom and URL click warning popup
-
+zoom and URL click warning popup.
"""
-from PyQt4 import QtCore, QtGui
+from qtpy import QtCore, QtGui, QtWidgets
from safehtmlparser import SafeHTMLParser
from tr import _translate
-class MessageView(QtGui.QTextBrowser):
+class MessageView(QtWidgets.QTextBrowser):
"""Message content viewer class, can switch between plaintext and HTML"""
MODE_PLAIN = 0
MODE_HTML = 1
- def __init__(self, parent=0):
+ def __init__(self, parent=None):
super(MessageView, self).__init__(parent)
self.mode = MessageView.MODE_PLAIN
self.html = None
@@ -38,8 +37,11 @@ class MessageView(QtGui.QTextBrowser):
def mousePressEvent(self, event):
"""Mouse press button event handler"""
- if event.button() == QtCore.Qt.LeftButton and self.html and self.html.has_html and self.cursorForPosition(
- event.pos()).block().blockNumber() == 0:
+ if (
+ event.button() == QtCore.Qt.LeftButton
+ and self.html and self.html.has_html
+ and self.cursorForPosition(event.pos()).block().blockNumber() == 0
+ ):
if self.mode == MessageView.MODE_PLAIN:
self.showHTML()
else:
@@ -52,23 +54,23 @@ class MessageView(QtGui.QTextBrowser):
# super will actually automatically take care of zooming
super(MessageView, self).wheelEvent(event)
if (
- QtGui.QApplication.queryKeyboardModifiers() & QtCore.Qt.ControlModifier
- ) == QtCore.Qt.ControlModifier and event.orientation() == QtCore.Qt.Vertical:
+ (QtWidgets.QApplication.queryKeyboardModifiers()
+ & QtCore.Qt.ControlModifier) == QtCore.Qt.ControlModifier
+ and event.angleDelta().y() != 0
+ ):
zoom = self.currentFont().pointSize() * 100 / self.defaultFontPointSize
- QtGui.QApplication.activeWindow().statusBar().showMessage(_translate(
- "MainWindow", "Zoom level %1%").arg(str(zoom)))
+ QtWidgets.QApplication.activeWindow().statusbar.showMessage(
+ _translate("MainWindow", "Zoom level {0}%").format(zoom))
def setWrappingWidth(self, width=None):
"""Set word-wrapping width"""
- self.setLineWrapMode(QtGui.QTextEdit.FixedPixelWidth)
- if width is None:
- width = self.width()
- self.setLineWrapColumnOrWidth(width)
+ self.setLineWrapMode(QtWidgets.QTextEdit.FixedPixelWidth)
+ self.setLineWrapColumnOrWidth(width or self.width())
def confirmURL(self, link):
"""Show a dialog requesting URL opening confirmation"""
if link.scheme() == "mailto":
- window = QtGui.QApplication.activeWindow()
+ window = QtWidgets.QApplication.activeWindow()
window.ui.lineEditTo.setText(link.path())
if link.hasQueryItem("subject"):
window.ui.lineEditSubject.setText(
@@ -83,39 +85,40 @@ class MessageView(QtGui.QTextBrowser):
)
window.ui.textEditMessage.setFocus()
return
- reply = QtGui.QMessageBox.warning(
- self,
- QtGui.QApplication.translate(
+ reply = QtWidgets.QMessageBox.warning(
+ self, _translate("MessageView", "Follow external link"),
+ _translate(
"MessageView",
- "Follow external link"),
- QtGui.QApplication.translate(
- "MessageView",
- "The link \"%1\" will open in a browser. It may be a security risk, it could de-anonymise you"
- " or download malicious data. Are you sure?").arg(unicode(link.toString())),
- QtGui.QMessageBox.Yes,
- QtGui.QMessageBox.No)
- if reply == QtGui.QMessageBox.Yes:
+ "The link \"{0}\" will open in a browser. It may be"
+ " a security risk, it could de-anonymise you or download"
+ " malicious data. Are you sure?"
+ ).format(link.toString()),
+ QtWidgets.QMessageBox.Yes, QtWidgets.QMessageBox.No)
+ if reply == QtWidgets.QMessageBox.Yes:
QtGui.QDesktopServices.openUrl(link)
def loadResource(self, restype, name):
"""
- Callback for loading referenced objects, such as an image. For security reasons at the moment doesn't do
- anything)
+ Callback for loading referenced objects, such as an image.
+ For security reasons at the moment doesn't do anything
"""
pass
def lazyRender(self):
"""
- Partially render a message. This is to avoid UI freezing when loading huge messages. It continues loading as
- you scroll down.
+ Partially render a message. This is to avoid UI freezing when
+ loading huge messages. It continues loading as you scroll down.
"""
if self.rendering:
return
self.rendering = True
position = self.verticalScrollBar().value()
cursor = QtGui.QTextCursor(self.document())
- while self.outpos < len(self.out) and self.verticalScrollBar().value(
- ) >= self.document().size().height() - 2 * self.size().height():
+ while (
+ self.outpos < len(self.out)
+ and self.verticalScrollBar().value()
+ >= self.document().size().height() - 2 * self.size().height()
+ ):
startpos = self.outpos
self.outpos += 10240
# find next end of tag
@@ -123,8 +126,9 @@ class MessageView(QtGui.QTextBrowser):
pos = self.out.find(">", self.outpos)
if pos > self.outpos:
self.outpos = pos + 1
- cursor.movePosition(QtGui.QTextCursor.End, QtGui.QTextCursor.MoveAnchor)
- cursor.insertHtml(QtCore.QString(self.out[startpos:self.outpos]))
+ cursor.movePosition(
+ QtGui.QTextCursor.End, QtGui.QTextCursor.MoveAnchor)
+ cursor.insertHtml(self.out[startpos:self.outpos])
self.verticalScrollBar().setValue(position)
self.rendering = False
@@ -133,9 +137,11 @@ class MessageView(QtGui.QTextBrowser):
self.mode = MessageView.MODE_PLAIN
out = self.html.raw
if self.html.has_html:
- out = "
" + unicode(
- QtGui.QApplication.translate(
- "MessageView", "HTML detected, click here to display")) + "
" + out
+ out = (
+ '
'
+ + _translate(
+ "MessageView", "HTML detected, click here to display"
+ ) + '
' + out)
self.out = out
self.outpos = 0
self.setHtml("")
@@ -144,10 +150,10 @@ class MessageView(QtGui.QTextBrowser):
def showHTML(self):
"""Render message as HTML"""
self.mode = MessageView.MODE_HTML
- out = self.html.sanitised
- out = "
" + unicode(
- QtGui.QApplication.translate("MessageView", "Click here to disable HTML")) + "
" + out
- self.out = out
+ self.out = (
+ '
'
+ + _translate("MessageView", "Click here to disable HTML")
+ + '
' + self.html.sanitised)
self.outpos = 0
self.setHtml("")
self.lazyRender()
@@ -155,8 +161,6 @@ class MessageView(QtGui.QTextBrowser):
def setContent(self, data):
"""Set message content from argument"""
self.html = SafeHTMLParser()
- self.html.reset()
- self.html.reset_safe()
self.html.allow_picture = True
self.html.feed(data)
self.html.close()
diff --git a/src/bitmessageqt/migrationwizard.py b/src/bitmessageqt/migrationwizard.py
index 6e80f1dc..239770d2 100644
--- a/src/bitmessageqt/migrationwizard.py
+++ b/src/bitmessageqt/migrationwizard.py
@@ -1,16 +1,15 @@
-#!/usr/bin/env python2.7
-from PyQt4 import QtCore, QtGui
+from qtpy import QtCore, QtWidgets
-class MigrationWizardIntroPage(QtGui.QWizardPage):
+class MigrationWizardIntroPage(QtWidgets.QWizardPage):
def __init__(self):
- super(QtGui.QWizardPage, self).__init__()
+ super(QtWidgets.QWizardPage, self).__init__()
self.setTitle("Migrating configuration")
- label = QtGui.QLabel("This wizard will help you to migrate your configuration. "
+ label = QtWidgets.QLabel("This wizard will help you to migrate your configuration. "
"You can still keep using PyBitMessage once you migrate, the changes are backwards compatible.")
label.setWordWrap(True)
- layout = QtGui.QVBoxLayout()
+ layout = QtWidgets.QVBoxLayout()
layout.addWidget(label)
self.setLayout(layout)
@@ -18,15 +17,15 @@ class MigrationWizardIntroPage(QtGui.QWizardPage):
return 1
-class MigrationWizardAddressesPage(QtGui.QWizardPage):
+class MigrationWizardAddressesPage(QtWidgets.QWizardPage):
def __init__(self, addresses):
- super(QtGui.QWizardPage, self).__init__()
+ super(QtWidgets.QWizardPage, self).__init__()
self.setTitle("Addresses")
- label = QtGui.QLabel("Please select addresses that you are already using with mailchuck. ")
+ label = QtWidgets.QLabel("Please select addresses that you are already using with mailchuck. ")
label.setWordWrap(True)
- layout = QtGui.QVBoxLayout()
+ layout = QtWidgets.QVBoxLayout()
layout.addWidget(label)
self.setLayout(layout)
@@ -34,15 +33,15 @@ class MigrationWizardAddressesPage(QtGui.QWizardPage):
return 10
-class MigrationWizardGPUPage(QtGui.QWizardPage):
+class MigrationWizardGPUPage(QtWidgets.QWizardPage):
def __init__(self):
- super(QtGui.QWizardPage, self).__init__()
+ super(QtWidgets.QWizardPage, self).__init__()
self.setTitle("GPU")
- label = QtGui.QLabel("Are you using a GPU? ")
+ label = QtWidgets.QLabel("Are you using a GPU? ")
label.setWordWrap(True)
- layout = QtGui.QVBoxLayout()
+ layout = QtWidgets.QVBoxLayout()
layout.addWidget(label)
self.setLayout(layout)
@@ -50,22 +49,22 @@ class MigrationWizardGPUPage(QtGui.QWizardPage):
return 10
-class MigrationWizardConclusionPage(QtGui.QWizardPage):
+class MigrationWizardConclusionPage(QtWidgets.QWizardPage):
def __init__(self):
- super(QtGui.QWizardPage, self).__init__()
+ super(QtWidgets.QWizardPage, self).__init__()
self.setTitle("All done!")
- label = QtGui.QLabel("You successfully migrated.")
+ label = QtWidgets.QLabel("You successfully migrated.")
label.setWordWrap(True)
- layout = QtGui.QVBoxLayout()
+ layout = QtWidgets.QVBoxLayout()
layout.addWidget(label)
self.setLayout(layout)
-class Ui_MigrationWizard(QtGui.QWizard):
+class Ui_MigrationWizard(QtWidgets.QWizard):
def __init__(self, addresses):
- super(QtGui.QWizard, self).__init__()
+ super(QtWidgets.QWizard, self).__init__()
self.pages = {}
@@ -81,4 +80,4 @@ class Ui_MigrationWizard(QtGui.QWizard):
self.setWindowTitle("Migration from PyBitMessage wizard")
self.adjustSize()
- self.show()
\ No newline at end of file
+ self.show()
diff --git a/src/bitmessageqt/networkstatus.py b/src/bitmessageqt/networkstatus.py
index 5d669f39..772f8387 100644
--- a/src/bitmessageqt/networkstatus.py
+++ b/src/bitmessageqt/networkstatus.py
@@ -4,7 +4,7 @@ Network status tab widget definition.
import time
-from PyQt4 import QtCore, QtGui
+from qtpy import QtCore, QtGui, QtWidgets
import l10n
import network.stats
@@ -16,14 +16,16 @@ from tr import _translate
from uisignaler import UISignaler
-class NetworkStatus(QtGui.QWidget, RetranslateMixin):
+class NetworkStatus(QtWidgets.QWidget, RetranslateMixin):
"""Network status tab"""
def __init__(self, parent=None):
super(NetworkStatus, self).__init__(parent)
widgets.load('networkstatus.ui', self)
header = self.tableWidgetConnectionCount.horizontalHeader()
- header.setResizeMode(QtGui.QHeaderView.ResizeToContents)
+ header.setSectionResizeMode(QtWidgets.QHeaderView.ResizeToContents)
+ header.setSectionResizeMode(0, QtWidgets.QHeaderView.Stretch)
+ header.setSectionResizeMode(2, QtWidgets.QHeaderView.Stretch)
# Somehow this value was 5 when I tested
if header.sortIndicatorSection() > 4:
@@ -32,20 +34,17 @@ class NetworkStatus(QtGui.QWidget, RetranslateMixin):
self.startup = time.localtime()
self.UISignalThread = UISignaler.get()
- # pylint: disable=no-member
- QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
- "updateNumberOfMessagesProcessed()"), self.updateNumberOfMessagesProcessed)
- QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
- "updateNumberOfPubkeysProcessed()"), self.updateNumberOfPubkeysProcessed)
- QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
- "updateNumberOfBroadcastsProcessed()"), self.updateNumberOfBroadcastsProcessed)
- QtCore.QObject.connect(self.UISignalThread, QtCore.SIGNAL(
- "updateNetworkStatusTab(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"), self.updateNetworkStatusTab)
+ self.UISignalThread.updateNumberOfMessagesProcessed.connect(
+ self.updateNumberOfMessagesProcessed)
+ self.UISignalThread.updateNumberOfPubkeysProcessed.connect(
+ self.updateNumberOfPubkeysProcessed)
+ self.UISignalThread.updateNumberOfBroadcastsProcessed.connect(
+ self.updateNumberOfBroadcastsProcessed)
+ self.UISignalThread.updateNetworkStatusTab.connect(
+ self.updateNetworkStatusTab)
self.timer = QtCore.QTimer()
-
- QtCore.QObject.connect(self.timer, QtCore.SIGNAL("timeout()"), self.runEveryTwoSeconds)
- # pylint: enable=no-member
+ self.timer.timeout.connect(self.runEveryTwoSeconds)
def startUpdate(self):
"""Start a timer to update counters every 2 seconds"""
@@ -57,91 +56,66 @@ class NetworkStatus(QtGui.QWidget, RetranslateMixin):
"""Stop counter update timer"""
self.timer.stop()
- def formatBytes(self, num):
+ @staticmethod
+ def formatBytes(num):
"""Format bytes nicely (SI prefixes)"""
- # pylint: disable=no-self-use
- for x in [
- _translate(
- "networkstatus",
- "byte(s)",
- None,
- QtCore.QCoreApplication.CodecForTr,
- num),
- "kB",
- "MB",
- "GB",
- ]:
+ for x in (
+ _translate("networkstatus", "byte(s)", None, num),
+ "kB", "MB", "GB"
+ ):
if num < 1000.0:
return "%3.0f %s" % (num, x)
num /= 1000.0
- return "%3.0f %s" % (num, 'TB')
+ return "%3.0f %s" % (num, "TB")
- def formatByteRate(self, num):
+ @staticmethod
+ def formatByteRate(num):
"""Format transfer speed in kB/s"""
- # pylint: disable=no-self-use
num /= 1000
return "%4.0f kB" % num
def updateNumberOfObjectsToBeSynced(self):
"""Update the counter for number of objects to be synced"""
- self.labelSyncStatus.setText(
- _translate(
- "networkstatus",
- "Object(s) to be synced: %n",
- None,
- QtCore.QCoreApplication.CodecForTr,
- network.stats.pendingDownload()
- + network.stats.pendingUpload()))
+ self.labelSyncStatus.setText(_translate(
+ "networkstatus", "Object(s) to be synced: %n", None,
+ network.stats.pendingDownload() + network.stats.pendingUpload()))
def updateNumberOfMessagesProcessed(self):
"""Update the counter for number of processed messages"""
self.updateNumberOfObjectsToBeSynced()
- self.labelMessageCount.setText(
- _translate(
- "networkstatus",
- "Processed %n person-to-person message(s).",
- None,
- QtCore.QCoreApplication.CodecForTr,
- state.numberOfMessagesProcessed))
+ self.labelMessageCount.setText(_translate(
+ "networkstatus", "Processed %n person-to-person message(s).",
+ None, state.numberOfMessagesProcessed))
def updateNumberOfBroadcastsProcessed(self):
"""Update the counter for the number of processed broadcasts"""
self.updateNumberOfObjectsToBeSynced()
- self.labelBroadcastCount.setText(
- _translate(
- "networkstatus",
- "Processed %n broadcast message(s).",
- None,
- QtCore.QCoreApplication.CodecForTr,
- state.numberOfBroadcastsProcessed))
+ self.labelBroadcastCount.setText(_translate(
+ "networkstatus", "Processed %n broadcast message(s).", None,
+ state.numberOfBroadcastsProcessed))
def updateNumberOfPubkeysProcessed(self):
"""Update the counter for the number of processed pubkeys"""
self.updateNumberOfObjectsToBeSynced()
- self.labelPubkeyCount.setText(
- _translate(
- "networkstatus",
- "Processed %n public key(s).",
- None,
- QtCore.QCoreApplication.CodecForTr,
- state.numberOfPubkeysProcessed))
+ self.labelPubkeyCount.setText(_translate(
+ "networkstatus", "Processed %n public key(s).", None,
+ state.numberOfPubkeysProcessed))
def updateNumberOfBytes(self):
"""
- This function is run every two seconds, so we divide the rate of bytes
- sent and received by 2.
+ This function is run every two seconds, so we divide the rate
+ of bytes sent and received by 2.
"""
- self.labelBytesRecvCount.setText(
- _translate(
- "networkstatus",
- "Down: %1/s Total: %2").arg(
- self.formatByteRate(network.stats.downloadSpeed()),
- self.formatBytes(network.stats.receivedBytes())))
- self.labelBytesSentCount.setText(
- _translate(
- "networkstatus", "Up: %1/s Total: %2").arg(
- self.formatByteRate(network.stats.uploadSpeed()),
- self.formatBytes(network.stats.sentBytes())))
+ self.labelBytesRecvCount.setText(_translate(
+ "networkstatus", "Down: {0}/s Total: {1}").format(
+ self.formatByteRate(network.stats.downloadSpeed()),
+ self.formatBytes(network.stats.receivedBytes())
+ ))
+ self.labelBytesSentCount.setText(_translate(
+ "networkstatus", "Up: {0}/s Total: {1}").format(
+ self.formatByteRate(network.stats.uploadSpeed()),
+ self.formatBytes(network.stats.sentBytes())
+ ))
def updateNetworkStatusTab(self, outbound, add, destination):
"""Add or remove an entry to the list of connected peers"""
@@ -168,67 +142,67 @@ class NetworkStatus(QtGui.QWidget, RetranslateMixin):
if add:
self.tableWidgetConnectionCount.insertRow(0)
self.tableWidgetConnectionCount.setItem(
- 0, 0,
- QtGui.QTableWidgetItem("%s:%i" % (destination.host, destination.port))
- )
+ 0, 0, QtWidgets.QTableWidgetItem(
+ "%s:%i" % (destination.host, destination.port)))
self.tableWidgetConnectionCount.setItem(
- 0, 2,
- QtGui.QTableWidgetItem("%s" % (c.userAgent))
- )
+ 0, 2, QtWidgets.QTableWidgetItem("%s" % (c.userAgent.decode("utf-8", "replace"))))
self.tableWidgetConnectionCount.setItem(
- 0, 3,
- QtGui.QTableWidgetItem("%s" % (c.tlsVersion))
- )
+ 0, 3, QtWidgets.QTableWidgetItem("%s" % (c.tlsVersion)))
self.tableWidgetConnectionCount.setItem(
- 0, 4,
- QtGui.QTableWidgetItem("%s" % (",".join(map(str, c.streams))))
- )
+ 0, 4, QtWidgets.QTableWidgetItem(
+ "%s" % ",".join(map(str, c.streams))))
try:
# .. todo:: FIXME: hard coded stream no
- rating = "%.1f" % (knownnodes.knownNodes[1][destination]['rating'])
+ rating = "%.1f" % knownnodes.knownNodes[1][destination]['rating']
except KeyError:
rating = "-"
self.tableWidgetConnectionCount.setItem(
- 0, 1,
- QtGui.QTableWidgetItem("%s" % (rating))
- )
+ 0, 1, QtWidgets.QTableWidgetItem("%s" % (rating)))
if outbound:
- brush = QtGui.QBrush(QtGui.QColor("yellow"), QtCore.Qt.SolidPattern)
+ brush = QtGui.QBrush(
+ QtGui.QColor("yellow"), QtCore.Qt.SolidPattern)
else:
- brush = QtGui.QBrush(QtGui.QColor("green"), QtCore.Qt.SolidPattern)
+ brush = QtGui.QBrush(
+ QtGui.QColor("green"), QtCore.Qt.SolidPattern)
for j in range(1):
self.tableWidgetConnectionCount.item(0, j).setBackground(brush)
- self.tableWidgetConnectionCount.item(0, 0).setData(QtCore.Qt.UserRole, destination)
- self.tableWidgetConnectionCount.item(0, 1).setData(QtCore.Qt.UserRole, outbound)
+ self.tableWidgetConnectionCount.item(0, 0).setData(
+ QtCore.Qt.UserRole, destination)
+ self.tableWidgetConnectionCount.item(0, 1).setData(
+ QtCore.Qt.UserRole, outbound)
else:
if not connectionpool.pool.inboundConnections:
self.window().setStatusIcon('yellow')
for i in range(self.tableWidgetConnectionCount.rowCount()):
- if self.tableWidgetConnectionCount.item(i, 0).data(QtCore.Qt.UserRole).toPyObject() != destination:
+ if self.tableWidgetConnectionCount.item(i, 0).data(
+ QtCore.Qt.UserRole) != destination:
continue
- if self.tableWidgetConnectionCount.item(i, 1).data(QtCore.Qt.UserRole).toPyObject() == outbound:
+ if self.tableWidgetConnectionCount.item(i, 1).data(
+ QtCore.Qt.UserRole) == outbound:
self.tableWidgetConnectionCount.removeRow(i)
break
self.tableWidgetConnectionCount.setUpdatesEnabled(True)
self.tableWidgetConnectionCount.setSortingEnabled(True)
- self.labelTotalConnections.setText(
- _translate(
- "networkstatus", "Total Connections: %1").arg(
- str(self.tableWidgetConnectionCount.rowCount())))
- # 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.
- if self.tableWidgetConnectionCount.rowCount() and state.statusIconColor == 'red':
- self.window().setStatusIcon('yellow')
- elif self.tableWidgetConnectionCount.rowCount() == 0 and state.statusIconColor != "red":
+ self.labelTotalConnections.setText(_translate(
+ "networkstatus", "Total Connections: {0}").format(
+ self.tableWidgetConnectionCount.rowCount()
+ ))
+ # 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.
+ if self.tableWidgetConnectionCount.rowCount():
+ if state.statusIconColor == 'red':
+ self.window().setStatusIcon('yellow')
+ elif state.statusIconColor != 'red':
self.window().setStatusIcon('red')
# timer driven
def runEveryTwoSeconds(self):
"""Updates counters, runs every 2 seconds if the timer is running"""
- self.labelLookupsPerSecond.setText(_translate("networkstatus", "Inventory lookups per second: %1").arg(
- str(state.Inventory.numberOfInventoryLookupsPerformed / 2)))
+ self.labelLookupsPerSecond.setText(_translate(
+ "networkstatus", "Inventory lookups per second: {0}"
+ ).format(state.Inventory.numberOfInventoryLookupsPerformed / 2))
state.Inventory.numberOfInventoryLookupsPerformed = 0
self.updateNumberOfBytes()
self.updateNumberOfObjectsToBeSynced()
@@ -236,13 +210,12 @@ class NetworkStatus(QtGui.QWidget, RetranslateMixin):
def retranslateUi(self):
"""Conventional Qt Designer method for dynamic l10n"""
super(NetworkStatus, self).retranslateUi()
- self.labelTotalConnections.setText(
- _translate(
- "networkstatus", "Total Connections: %1").arg(
- str(self.tableWidgetConnectionCount.rowCount())))
+ self.labelTotalConnections.setText(_translate(
+ "networkstatus", "Total Connections: {0}"
+ ).format(self.tableWidgetConnectionCount.rowCount()))
self.labelStartupTime.setText(_translate(
- "networkstatus", "Since startup on %1"
- ).arg(l10n.formatTimestamp(self.startup)))
+ "networkstatus", "Since startup on {0}"
+ ).format(l10n.formatTimestamp(self.startup)))
self.updateNumberOfMessagesProcessed()
self.updateNumberOfBroadcastsProcessed()
self.updateNumberOfPubkeysProcessed()
diff --git a/src/bitmessageqt/networkstatus.ui b/src/bitmessageqt/networkstatus.ui
index e0c01b57..7830714a 100644
--- a/src/bitmessageqt/networkstatus.ui
+++ b/src/bitmessageqt/networkstatus.ui
@@ -100,6 +100,9 @@
true
+
+ false
+ true
@@ -109,9 +112,6 @@
false
-
- true
- false
@@ -296,11 +296,8 @@
STableWidgetQTableWidget
- bitmessageqt/settingsmixin.h
+ bitmessageqt.settingsmixin
-
-
-
diff --git a/src/bitmessageqt/newaddressdialog.ui b/src/bitmessageqt/newaddressdialog.ui
index 8b5276cc..8a7cc6ae 100644
--- a/src/bitmessageqt/newaddressdialog.ui
+++ b/src/bitmessageqt/newaddressdialog.ui
@@ -375,7 +375,7 @@ The 'Random Number' option is selected by default but deterministic addresses ha
radioButtonDeterministicAddresstoggled(bool)groupBoxDeterministic
- setShown(bool)
+ setVisible(bool)92
@@ -391,7 +391,7 @@ The 'Random Number' option is selected by default but deterministic addresses ha
radioButtonRandomAddresstoggled(bool)groupBox
- setShown(bool)
+ setVisible(bool)72
diff --git a/src/bitmessageqt/newchandialog.py b/src/bitmessageqt/newchandialog.py
index c0629cd7..2091a7ab 100644
--- a/src/bitmessageqt/newchandialog.py
+++ b/src/bitmessageqt/newchandialog.py
@@ -1,10 +1,8 @@
"""
-src/bitmessageqt/newchandialog.py
-=================================
-
+NewChanDialog class definition
"""
-from PyQt4 import QtCore, QtGui
+from qtpy import QtCore, QtWidgets
import widgets
from addresses import addBMIfNotPresent
@@ -15,30 +13,21 @@ from tr import _translate
from utils import str_chan
-class NewChanDialog(QtGui.QDialog):
- """The `New Chan` dialog"""
+class NewChanDialog(QtWidgets.QDialog):
+ """The "New Chan" dialog"""
def __init__(self, parent=None):
super(NewChanDialog, self).__init__(parent)
widgets.load('newchandialog.ui', self)
self.parent = parent
- self.chanAddress.setValidator(
- AddressValidator(
- self.chanAddress,
- self.chanPassPhrase,
- self.validatorFeedback,
- self.buttonBox,
- False))
- self.chanPassPhrase.setValidator(
- PassPhraseValidator(
- self.chanPassPhrase,
- self.chanAddress,
- self.validatorFeedback,
- self.buttonBox,
- False))
+ self.chanAddress.setValidator(AddressValidator(
+ self.chanAddress, self.chanPassPhrase, self.validatorFeedback,
+ self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok), False))
+ self.chanPassPhrase.setValidator(PassPhraseValidator(
+ self.chanPassPhrase, self.chanAddress, self.validatorFeedback,
+ self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok), False))
self.timer = QtCore.QTimer()
- QtCore.QObject.connect( # pylint: disable=no-member
- self.timer, QtCore.SIGNAL("timeout()"), self.delayedUpdateStatus)
+ self.timer.timeout.connect(self.delayedUpdateStatus)
self.timer.start(500) # milliseconds
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
self.show()
@@ -52,32 +41,47 @@ class NewChanDialog(QtGui.QDialog):
self.timer.stop()
self.hide()
apiAddressGeneratorReturnQueue.queue.clear()
- if self.chanAddress.text().toUtf8() == "":
- addressGeneratorQueue.put(
- ('createChan', 4, 1, str_chan + ' ' + str(self.chanPassPhrase.text().toUtf8()),
- self.chanPassPhrase.text().toUtf8(),
- True))
+ passPhrase = self.chanPassPhrase.text().encode('utf-8')
+ if self.chanAddress.text() == "":
+ addressGeneratorQueue.put((
+ 'createChan', 4, 1,
+ str_chan + ' ' + passPhrase, passPhrase, True
+ ))
else:
- addressGeneratorQueue.put(
- ('joinChan', addBMIfNotPresent(self.chanAddress.text().toUtf8()),
- str_chan + ' ' + str(self.chanPassPhrase.text().toUtf8()),
- self.chanPassPhrase.text().toUtf8(),
- True))
+ addressGeneratorQueue.put((
+ 'joinChan', addBMIfNotPresent(self.chanAddress.text()),
+ str_chan + ' ' + passPhrase, passPhrase, True
+ ))
addressGeneratorReturnValue = apiAddressGeneratorReturnQueue.get(True)
- if addressGeneratorReturnValue and addressGeneratorReturnValue[0] != 'chan name does not match address':
- UISignalQueue.put(('updateStatusBar', _translate(
- "newchandialog", "Successfully created / joined chan %1").arg(unicode(self.chanPassPhrase.text()))))
+ if (
+ len(addressGeneratorReturnValue) > 0
+ and addressGeneratorReturnValue[0]
+ != 'chan name does not match address'
+ ):
+ UISignalQueue.put((
+ 'updateStatusBar',
+ _translate(
+ "newchandialog",
+ "Successfully created / joined chan {0}"
+ ).format(passPhrase)
+ ))
self.parent.ui.tabWidget.setCurrentIndex(
self.parent.ui.tabWidget.indexOf(self.parent.ui.chans)
)
- self.done(QtGui.QDialog.Accepted)
+ self.done(QtWidgets.QDialog.Accepted)
else:
- UISignalQueue.put(('updateStatusBar', _translate("newchandialog", "Chan creation / joining failed")))
- self.done(QtGui.QDialog.Rejected)
+ UISignalQueue.put((
+ 'updateStatusBar',
+ _translate("newchandialog", "Chan creation / joining failed")
+ ))
+ self.done(QtWidgets.QDialog.Rejected)
def reject(self):
"""Cancel joining the chan"""
self.timer.stop()
self.hide()
- UISignalQueue.put(('updateStatusBar', _translate("newchandialog", "Chan creation / joining cancelled")))
- self.done(QtGui.QDialog.Rejected)
+ UISignalQueue.put((
+ 'updateStatusBar',
+ _translate("newchandialog", "Chan creation / joining cancelled")
+ ))
+ self.done(QtWidgets.QDialog.Rejected)
diff --git a/src/bitmessageqt/retranslateui.py b/src/bitmessageqt/retranslateui.py
index c7676f77..706c3e81 100644
--- a/src/bitmessageqt/retranslateui.py
+++ b/src/bitmessageqt/retranslateui.py
@@ -1,20 +1,20 @@
-from os import path
-from PyQt4 import QtGui
-from debug import logger
+from qtpy import QtWidgets
+
import widgets
+
class RetranslateMixin(object):
def retranslateUi(self):
- defaults = QtGui.QWidget()
+ defaults = QtWidgets.QWidget()
widgets.load(self.__class__.__name__.lower() + '.ui', defaults)
for attr, value in defaults.__dict__.iteritems():
setTextMethod = getattr(value, "setText", None)
if callable(setTextMethod):
getattr(self, attr).setText(getattr(defaults, attr).text())
- elif isinstance(value, QtGui.QTableWidget):
- for i in range (value.columnCount()):
+ elif isinstance(value, QtWidgets.QTableWidget):
+ for i in range(value.columnCount()):
getattr(self, attr).horizontalHeaderItem(i).setText(
getattr(defaults, attr).horizontalHeaderItem(i).text())
- for i in range (value.rowCount()):
+ for i in range(value.rowCount()):
getattr(self, attr).verticalHeaderItem(i).setText(
getattr(defaults, attr).verticalHeaderItem(i).text())
diff --git a/src/bitmessageqt/safehtmlparser.py b/src/bitmessageqt/safehtmlparser.py
index d408d2c7..a7161ae0 100644
--- a/src/bitmessageqt/safehtmlparser.py
+++ b/src/bitmessageqt/safehtmlparser.py
@@ -123,10 +123,6 @@ class SafeHTMLParser(HTMLParser):
self.sanitised += "&" + name + ";"
def feed(self, data):
- try:
- data = unicode(data, 'utf-8')
- except UnicodeDecodeError:
- data = unicode(data, 'utf-8', errors='replace')
HTMLParser.feed(self, data)
tmp = SafeHTMLParser.replace_pre(data)
tmp = self.uriregex1.sub(r'\1', tmp)
diff --git a/src/bitmessageqt/settings.py b/src/bitmessageqt/settings.py
index 3d05db25..c784b2aa 100644
--- a/src/bitmessageqt/settings.py
+++ b/src/bitmessageqt/settings.py
@@ -1,13 +1,14 @@
"""
-This module setting file is for settings
+SettingsDialog class definition
"""
+
import ConfigParser
import os
import sys
import tempfile
+from qtpy import QtCore, QtGui, QtWidgets
import six
-from PyQt4 import QtCore, QtGui
import debug
import defaults
@@ -39,7 +40,7 @@ def getSOCKSProxyType(config):
return result
-class SettingsDialog(QtGui.QDialog):
+class SettingsDialog(QtWidgets.QDialog):
"""The "Settings" dialog"""
def __init__(self, parent=None, firstrun=False):
super(SettingsDialog, self).__init__(parent)
@@ -80,7 +81,7 @@ class SettingsDialog(QtGui.QDialog):
self.tabWidgetSettings.setCurrentIndex(
self.tabWidgetSettings.indexOf(self.tabNetworkSettings)
)
- QtGui.QWidget.resize(self, QtGui.QWidget.sizeHint(self))
+ QtWidgets.QWidget.resize(self, QtWidgets.QWidget.sizeHint(self))
def adjust_from_config(self, config):
"""Adjust all widgets state according to config settings"""
@@ -312,10 +313,10 @@ class SettingsDialog(QtGui.QDialog):
_translate("MainWindow", "Testing..."))
nc = namecoin.namecoinConnection({
'type': self.getNamecoinType(),
- 'host': str(self.lineEditNamecoinHost.text().toUtf8()),
- 'port': str(self.lineEditNamecoinPort.text().toUtf8()),
- 'user': str(self.lineEditNamecoinUser.text().toUtf8()),
- 'password': str(self.lineEditNamecoinPassword.text().toUtf8())
+ 'host': str(self.lineEditNamecoinHost.text()),
+ 'port': str(self.lineEditNamecoinPort.text()),
+ 'user': str(self.lineEditNamecoinUser.text()),
+ 'password': str(self.lineEditNamecoinPassword.text())
})
status, text = nc.test()
self.labelNamecoinTestResult.setText(text)
@@ -348,8 +349,8 @@ class SettingsDialog(QtGui.QDialog):
self.config.set('bitmessagesettings', 'replybelow', str(
self.checkBoxReplyBelow.isChecked()))
- lang = str(self.languageComboBox.itemData(
- self.languageComboBox.currentIndex()).toString())
+ lang = self.languageComboBox.itemData(
+ self.languageComboBox.currentIndex())
self.config.set('bitmessagesettings', 'userlocale', lang)
self.parent.change_translation()
@@ -431,7 +432,7 @@ class SettingsDialog(QtGui.QDialog):
self.config.set('bitmessagesettings', 'maxuploadrate', str(
int(float(self.lineEditMaxUploadRate.text()))))
except ValueError:
- QtGui.QMessageBox.about(
+ QtWidgets.QMessageBox.about(
self, _translate("MainWindow", "Number needed"),
_translate(
"MainWindow",
@@ -472,7 +473,7 @@ class SettingsDialog(QtGui.QDialog):
float(self.lineEditSmallMessageDifficulty.text())
* defaults.networkDefaultPayloadLengthExtraBytes)))
- if self.comboBoxOpenCL.currentText().toUtf8() != self.config.safeGet(
+ if self.comboBoxOpenCL.currentText() != self.config.safeGet(
'bitmessagesettings', 'opencl'):
self.config.set(
'bitmessagesettings', 'opencl',
@@ -486,7 +487,7 @@ class SettingsDialog(QtGui.QDialog):
or float(self.lineEditMaxAcceptableTotalDifficulty.text()) == 0
):
if self.config.get(
- 'bitmessagesettings', 'maxacceptablenoncetrialsperbyte'
+ 'bitmessagesettings', 'maxacceptablenoncetrialsperbyte'
) != str(int(
float(self.lineEditMaxAcceptableTotalDifficulty.text())
* defaults.networkDefaultProofOfWorkNonceTrialsPerByte)):
@@ -503,7 +504,7 @@ class SettingsDialog(QtGui.QDialog):
or float(self.lineEditMaxAcceptableSmallMessageDifficulty.text()) == 0
):
if self.config.get(
- 'bitmessagesettings', 'maxacceptablepayloadlengthextrabytes'
+ 'bitmessagesettings', 'maxacceptablepayloadlengthextrabytes'
) != str(int(
float(self.lineEditMaxAcceptableSmallMessageDifficulty.text())
* defaults.networkDefaultPayloadLengthExtraBytes)):
@@ -555,7 +556,7 @@ class SettingsDialog(QtGui.QDialog):
if state.maximumLengthOfTimeToBotherResendingMessages < 432000:
# If the time period is less than 5 hours, we give
# zero values to all fields. No message will be sent again.
- QtGui.QMessageBox.about(
+ QtWidgets.QMessageBox.about(
self,
_translate("MainWindow", "Will not resend ever"),
_translate(
diff --git a/src/bitmessageqt/settings.ui b/src/bitmessageqt/settings.ui
index 1e9a6f09..7ce1e389 100644
--- a/src/bitmessageqt/settings.ui
+++ b/src/bitmessageqt/settings.ui
@@ -1086,9 +1086,6 @@
checkBoxSocksListenbuttonBox
-
-
- buttonBox
diff --git a/src/bitmessageqt/settingsmixin.py b/src/bitmessageqt/settingsmixin.py
index 3d5999e2..9e53c6fb 100644
--- a/src/bitmessageqt/settingsmixin.py
+++ b/src/bitmessageqt/settingsmixin.py
@@ -1,15 +1,15 @@
-#!/usr/bin/python2.7
"""
src/settingsmixin.py
====================
"""
-from PyQt4 import QtCore, QtGui
+from qtpy import QtCore, QtWidgets
class SettingsMixin(object):
- """Mixin for adding geometry and state saving between restarts."""
+ """Mixin for adding geometry and state saving between restarts"""
+
def warnIfNoObjectName(self):
"""
Handle objects which don't have a name. Currently it ignores them. Objects without a name can't have their
@@ -40,8 +40,9 @@ class SettingsMixin(object):
self.warnIfNoObjectName()
settings = QtCore.QSettings()
try:
- geom = settings.value("/".join([str(self.objectName()), "geometry"]))
- target.restoreGeometry(geom.toByteArray() if hasattr(geom, 'toByteArray') else geom)
+ geom = settings.value(
+ "/".join([str(self.objectName()), "geometry"]))
+ target.restoreGeometry(geom)
except Exception:
pass
@@ -51,13 +52,14 @@ class SettingsMixin(object):
settings = QtCore.QSettings()
try:
state = settings.value("/".join([str(self.objectName()), "state"]))
- target.restoreState(state.toByteArray() if hasattr(state, 'toByteArray') else state)
+ target.restoreState(state)
except Exception:
pass
-class SMainWindow(QtGui.QMainWindow, SettingsMixin):
- """Main window with Settings functionality."""
+class SMainWindow(QtWidgets.QMainWindow, SettingsMixin):
+ """Main window with Settings functionality"""
+
def loadSettings(self):
"""Load main window settings."""
self.readGeometry(self)
@@ -69,9 +71,9 @@ class SMainWindow(QtGui.QMainWindow, SettingsMixin):
self.writeGeometry(self)
-class STableWidget(QtGui.QTableWidget, SettingsMixin):
+class STableWidget(QtWidgets.QTableWidget, SettingsMixin):
"""Table widget with Settings functionality"""
- # pylint: disable=too-many-ancestors
+
def loadSettings(self):
"""Load table settings."""
self.readState(self.horizontalHeader())
@@ -81,8 +83,9 @@ class STableWidget(QtGui.QTableWidget, SettingsMixin):
self.writeState(self.horizontalHeader())
-class SSplitter(QtGui.QSplitter, SettingsMixin):
- """Splitter with Settings functionality."""
+class SSplitter(QtWidgets.QSplitter, SettingsMixin):
+ """Splitter with Settings functionality"""
+
def loadSettings(self):
"""Load splitter settings"""
self.readState(self)
@@ -92,17 +95,17 @@ class SSplitter(QtGui.QSplitter, SettingsMixin):
self.writeState(self)
-class STreeWidget(QtGui.QTreeWidget, SettingsMixin):
- """Tree widget with settings functionality."""
- # pylint: disable=too-many-ancestors
+class STreeWidget(QtWidgets.QTreeWidget, SettingsMixin):
+ """Tree widget with settings functionality"""
+
def loadSettings(self):
- """Load tree settings."""
+ """Load tree settings. Unimplemented."""
# recurse children
# self.readState(self)
pass
def saveSettings(self):
- """Save tree settings"""
+ """Save tree settings. Unimplemented."""
# recurse children
# self.writeState(self)
pass
diff --git a/src/bitmessageqt/statusbar.py b/src/bitmessageqt/statusbar.py
index 2add604d..478d570c 100644
--- a/src/bitmessageqt/statusbar.py
+++ b/src/bitmessageqt/statusbar.py
@@ -1,11 +1,11 @@
-# pylint: disable=unused-argument
-"""Status bar Module"""
+"""BMStatusBar class definition"""
from time import time
-from PyQt4 import QtGui
+
+from qtpy import QtWidgets
-class BMStatusBar(QtGui.QStatusBar):
+class BMStatusBar(QtWidgets.QStatusBar):
"""Status bar with queue and priorities"""
duration = 10000
deleteAfter = 60
@@ -16,21 +16,24 @@ class BMStatusBar(QtGui.QStatusBar):
self.timer = self.startTimer(BMStatusBar.duration)
self.iterator = 0
- def timerEvent(self, event):
+ def timerEvent(self, event): # pylint: disable=unused-argument
"""an event handler which allows to queue and prioritise messages to
show in the status bar, for example if many messages come very quickly
after one another, it adds delays and so on"""
while len(self.important) > 0:
self.iterator += 1
try:
- if time() > self.important[self.iterator][1] + BMStatusBar.deleteAfter:
+ if (
+ self.important[self.iterator][1]
+ + BMStatusBar.deleteAfter < time()
+ ):
del self.important[self.iterator]
self.iterator -= 1
continue
except IndexError:
self.iterator = -1
continue
- super(BMStatusBar, self).showMessage(self.important[self.iterator][0], 0)
+ self.showMessage(self.important[self.iterator][0], 0)
break
def addImportant(self, message):
diff --git a/src/bitmessageqt/support.py b/src/bitmessageqt/support.py
index a84affa4..5d455e59 100644
--- a/src/bitmessageqt/support.py
+++ b/src/bitmessageqt/support.py
@@ -1,13 +1,11 @@
"""Composing support request message functions."""
-# pylint: disable=no-member
import ctypes
+import os
import ssl
import sys
import time
-from PyQt4 import QtCore
-
import account
import defaults
import network.stats
@@ -31,7 +29,7 @@ OLD_SUPPORT_ADDRESS = 'BM-2cTkCtMYkrSPwFTpgcBrMrf5d8oZwvMZWK'
SUPPORT_ADDRESS = 'BM-2cUdgkDDAahwPAU6oD2A7DnjqZz3hgY832'
SUPPORT_LABEL = _translate("Support", "PyBitmessage support")
SUPPORT_MY_LABEL = _translate("Support", "My new address")
-SUPPORT_SUBJECT = 'Support request'
+SUPPORT_SUBJECT = _translate("Support", "Support request")
SUPPORT_MESSAGE = _translate("Support", '''
You can use this message to send a report to one of the PyBitmessage core \
developers regarding PyBitmessage or the mailchuck.com email service. \
@@ -55,6 +53,7 @@ Operating system: {}
Architecture: {}bit
Python Version: {}
OpenSSL Version: {}
+Qt API: {}
Frozen: {}
Portable mode: {}
C PoW: {}
@@ -67,28 +66,35 @@ Connected hosts: {}
def checkAddressBook(myapp):
+ """
+ Add "PyBitmessage support" address to address book, remove old one if found.
+ """
sqlExecute('DELETE from addressbook WHERE address=?', OLD_SUPPORT_ADDRESS)
- queryreturn = sqlQuery('SELECT * FROM addressbook WHERE address=?', SUPPORT_ADDRESS)
+ queryreturn = sqlQuery(
+ 'SELECT * FROM addressbook WHERE address=?', SUPPORT_ADDRESS)
if queryreturn == []:
sqlExecute(
'INSERT INTO addressbook VALUES (?,?)',
- SUPPORT_LABEL.toUtf8(), SUPPORT_ADDRESS)
+ SUPPORT_LABEL.encode('utf-8'), SUPPORT_ADDRESS)
myapp.rerenderAddressBook()
def checkHasNormalAddress():
- for address in config.addresses():
+ """Returns first enabled normal address or False if not found."""
+ for address in config.addresses(True):
acct = account.accountClass(address)
- if acct.type == AccountMixin.NORMAL and config.safeGetBoolean(address, 'enabled'):
+ if acct.type == AccountMixin.NORMAL and config.safeGetBoolean(
+ address, 'enabled'):
return address
return False
def createAddressIfNeeded(myapp):
+ """Checks if user has any anabled normal address, creates new one if no."""
if not checkHasNormalAddress():
queues.addressGeneratorQueue.put((
'createRandomAddress', 4, 1,
- str(SUPPORT_MY_LABEL.toUtf8()),
+ SUPPORT_MY_LABEL.encode('utf-8'),
1, "", False,
defaults.networkDefaultProofOfWorkNonceTrialsPerByte,
defaults.networkDefaultPayloadLengthExtraBytes
@@ -100,15 +106,20 @@ def createAddressIfNeeded(myapp):
def createSupportMessage(myapp):
+ """
+ Prepare the support request message and switch to tab "Send"
+ """
checkAddressBook(myapp)
address = createAddressIfNeeded(myapp)
if state.shutdown:
return
myapp.ui.lineEditSubject.setText(SUPPORT_SUBJECT)
- addrIndex = myapp.ui.comboBoxSendFrom.findData(
- address, QtCore.Qt.UserRole,
- QtCore.Qt.MatchFixedString | QtCore.Qt.MatchCaseSensitive)
+ # addrIndex = myapp.ui.comboBoxSendFrom.findData(
+ # address, QtCore.Qt.UserRole,
+ # QtCore.Qt.MatchFixedString | QtCore.Qt.MatchCaseSensitive
+ # )
+ addrIndex = myapp.ui.comboBoxSendFrom.findData(address)
if addrIndex == -1: # something is very wrong
return
myapp.ui.comboBoxSendFrom.setCurrentIndex(addrIndex)
@@ -119,15 +130,13 @@ def createSupportMessage(myapp):
if commit:
version += " GIT " + commit
- os = sys.platform
- if os == "win32":
- windowsversion = sys.getwindowsversion()
- os = "Windows " + str(windowsversion[0]) + "." + str(windowsversion[1])
+ if sys.platform.startswith("win"):
+ # pylint: disable=no-member
+ osname = "Windows %s.%s" % sys.getwindowsversion()[:2]
else:
try:
- from os import uname
- unixversion = uname()
- os = unixversion[0] + " " + unixversion[2]
+ unixversion = os.uname()
+ osname = unixversion[0] + " " + unixversion[2]
except:
pass
architecture = "32" if ctypes.sizeof(ctypes.c_voidp) == 4 else "64"
@@ -136,22 +145,26 @@ def createSupportMessage(myapp):
opensslversion = "%s (Python internal), %s (external for PyElliptic)" % (
ssl.OPENSSL_VERSION, OpenSSL._version)
+ qtapi = os.environ.get('QT_API', 'fallback')
+
frozen = "N/A"
if paths.frozen:
frozen = paths.frozen
- portablemode = "True" if state.appdata == paths.lookupExeFolder() else "False"
+ portablemode = str(state.appdata == paths.lookupExeFolder())
cpow = "True" if proofofwork.bmpow else "False"
openclpow = str(
config.safeGet('bitmessagesettings', 'opencl')
) if openclEnabled() else "None"
locale = getTranslationLanguage()
- socks = getSOCKSProxyType(config) or "N/A"
- upnp = config.safeGet('bitmessagesettings', 'upnp', "N/A")
+ socks = getSOCKSProxyType(config) or 'N/A'
+ upnp = config.safeGet('bitmessagesettings', 'upnp', 'N/A')
connectedhosts = len(network.stats.connectedHostsList())
- myapp.ui.textEditMessage.setText(unicode(SUPPORT_MESSAGE, 'utf-8').format(
- version, os, architecture, pythonversion, opensslversion, frozen,
- portablemode, cpow, openclpow, locale, socks, upnp, connectedhosts))
+ myapp.ui.textEditMessage.setText(SUPPORT_MESSAGE.format(
+ version, osname, architecture, pythonversion, opensslversion, qtapi,
+ frozen, portablemode, cpow, openclpow, locale, socks, upnp,
+ connectedhosts
+ ))
# single msg tab
myapp.ui.tabWidgetSend.setCurrentIndex(
diff --git a/src/bitmessageqt/tests/main.py b/src/bitmessageqt/tests/main.py
index b3aa67fa..1d65f16e 100644
--- a/src/bitmessageqt/tests/main.py
+++ b/src/bitmessageqt/tests/main.py
@@ -4,7 +4,8 @@ import Queue
import sys
import unittest
-from PyQt4 import QtCore, QtGui
+from qtpy import QtCore, QtWidgets
+from six import string_types
import bitmessageqt
import queues
@@ -16,7 +17,7 @@ class TestBase(unittest.TestCase):
def setUp(self):
self.app = (
- QtGui.QApplication.instance()
+ QtWidgets.QApplication.instance()
or bitmessageqt.BitmessageQtApplication(sys.argv))
self.window = self.app.activeWindow()
if not self.window:
@@ -39,10 +40,7 @@ class TestMain(unittest.TestCase):
def test_translate(self):
"""Check the results of _translate() with various args"""
- self.assertIsInstance(
- _translate("MainWindow", "Test"),
- QtCore.QString
- )
+ self.assertIsInstance(_translate("MainWindow", "Test"), string_types)
class TestUISignaler(TestBase):
diff --git a/src/bitmessageqt/uisignaler.py b/src/bitmessageqt/uisignaler.py
index c23ec3bc..8f34aff0 100644
--- a/src/bitmessageqt/uisignaler.py
+++ b/src/bitmessageqt/uisignaler.py
@@ -1,15 +1,35 @@
-
-from PyQt4.QtCore import QThread, SIGNAL
import sys
+from qtpy import QtCore
+
import queues
+from network.node import Peer
-class UISignaler(QThread):
+class UISignaler(QtCore.QThread):
_instance = None
- def __init__(self, parent=None):
- QThread.__init__(self, parent)
+ writeNewAddressToTable = QtCore.Signal(str, str, str)
+ updateStatusBar = QtCore.Signal(object)
+ updateSentItemStatusByToAddress = QtCore.Signal(object, str)
+ updateSentItemStatusByAckdata = QtCore.Signal(object, str)
+ displayNewInboxMessage = QtCore.Signal(object, str, object, object, str)
+ displayNewSentMessage = QtCore.Signal(
+ object, str, str, object, object, str)
+ updateNetworkStatusTab = QtCore.Signal(bool, bool, Peer)
+ updateNumberOfMessagesProcessed = QtCore.Signal()
+ updateNumberOfPubkeysProcessed = QtCore.Signal()
+ updateNumberOfBroadcastsProcessed = QtCore.Signal()
+ setStatusIcon = QtCore.Signal(str)
+ changedInboxUnread = QtCore.Signal(str)
+ rerenderMessagelistFromLabels = QtCore.Signal()
+ rerenderMessagelistToLabels = QtCore.Signal()
+ rerenderAddressBook = QtCore.Signal()
+ rerenderSubscriptions = QtCore.Signal()
+ rerenderBlackWhiteList = QtCore.Signal()
+ removeInboxRowByMsgid = QtCore.Signal(str)
+ newVersionAvailable = QtCore.Signal(str)
+ displayAlert = QtCore.Signal(str, str, bool)
@classmethod
def get(cls):
@@ -22,69 +42,59 @@ class UISignaler(QThread):
command, data = queues.UISignalQueue.get()
if command == 'writeNewAddressToTable':
label, address, streamNumber = data
- self.emit(
- SIGNAL("writeNewAddressToTable(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"),
- label,
- address,
- str(streamNumber))
+ self.writeNewAddressToTable.emit(
+ label, address, str(streamNumber))
elif command == 'updateStatusBar':
- self.emit(SIGNAL("updateStatusBar(PyQt_PyObject)"), data)
+ self.updateStatusBar.emit(data)
elif command == 'updateSentItemStatusByToAddress':
toAddress, message = data
- self.emit(SIGNAL(
- "updateSentItemStatusByToAddress(PyQt_PyObject,PyQt_PyObject)"), toAddress, message)
+ self.updateSentItemStatusByToAddress.emit(toAddress, message)
elif command == 'updateSentItemStatusByAckdata':
ackData, message = data
- self.emit(SIGNAL(
- "updateSentItemStatusByAckdata(PyQt_PyObject,PyQt_PyObject)"), ackData, message)
+ self.updateSentItemStatusByAckdata.emit(ackData, message)
elif command == 'displayNewInboxMessage':
inventoryHash, toAddress, fromAddress, subject, body = data
- self.emit(SIGNAL(
- "displayNewInboxMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"),
- inventoryHash, toAddress, fromAddress, subject, body)
+
+ self.displayNewInboxMessage.emit(
+ inventoryHash, toAddress, fromAddress,
+ subject, body)
elif command == 'displayNewSentMessage':
toAddress, fromLabel, fromAddress, subject, message, ackdata = data
- self.emit(SIGNAL(
- "displayNewSentMessage(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"),
- toAddress, fromLabel, fromAddress, subject, message, ackdata)
+ self.displayNewSentMessage.emit(
+ toAddress, fromLabel, fromAddress,
+ subject.decode('utf-8'), message, ackdata)
elif command == 'updateNetworkStatusTab':
outbound, add, destination = data
- self.emit(
- SIGNAL("updateNetworkStatusTab(PyQt_PyObject,PyQt_PyObject,PyQt_PyObject)"),
- outbound,
- add,
- destination)
+ self.updateNetworkStatusTab.emit(outbound, add, destination)
elif command == 'updateNumberOfMessagesProcessed':
- self.emit(SIGNAL("updateNumberOfMessagesProcessed()"))
+ self.updateNumberOfMessagesProcessed.emit()
elif command == 'updateNumberOfPubkeysProcessed':
- self.emit(SIGNAL("updateNumberOfPubkeysProcessed()"))
+ self.updateNumberOfPubkeysProcessed.emit()
elif command == 'updateNumberOfBroadcastsProcessed':
- self.emit(SIGNAL("updateNumberOfBroadcastsProcessed()"))
+ self.updateNumberOfBroadcastsProcessed.emit()
elif command == 'setStatusIcon':
- self.emit(SIGNAL("setStatusIcon(PyQt_PyObject)"), data)
+ self.setStatusIcon.emit(data)
elif command == 'changedInboxUnread':
- self.emit(SIGNAL("changedInboxUnread(PyQt_PyObject)"), data)
+ self.changedInboxUnread.emit(data)
elif command == 'rerenderMessagelistFromLabels':
- self.emit(SIGNAL("rerenderMessagelistFromLabels()"))
+ self.rerenderMessagelistFromLabels.emit()
elif command == 'rerenderMessagelistToLabels':
- self.emit(SIGNAL("rerenderMessagelistToLabels()"))
+ self.rerenderMessagelistToLabels.emit()
elif command == 'rerenderAddressBook':
- self.emit(SIGNAL("rerenderAddressBook()"))
+ self.rerenderAddressBook.emit()
elif command == 'rerenderSubscriptions':
- self.emit(SIGNAL("rerenderSubscriptions()"))
+ self.rerenderSubscriptions.emit()
elif command == 'rerenderBlackWhiteList':
- self.emit(SIGNAL("rerenderBlackWhiteList()"))
+ self.rerenderBlackWhiteList.emit()
elif command == 'removeInboxRowByMsgid':
- self.emit(SIGNAL("removeInboxRowByMsgid(PyQt_PyObject)"), data)
+ self.removeInboxRowByMsgid.emit(data)
elif command == 'newVersionAvailable':
- self.emit(SIGNAL("newVersionAvailable(PyQt_PyObject)"), data)
+ self.newVersionAvailable.emit(data)
elif command == 'alert':
title, text, exitAfterUserClicksOk = data
- self.emit(
- SIGNAL("displayAlert(PyQt_PyObject, PyQt_PyObject, PyQt_PyObject)"),
- title,
- text,
- exitAfterUserClicksOk)
+ self.displayAlert.emit(title, text, exitAfterUserClicksOk)
else:
sys.stderr.write(
- 'Command sent to UISignaler not recognized: %s\n' % command)
+ 'Command sent to UISignaler not recognized: %s\n'
+ % command
+ )
diff --git a/src/bitmessageqt/utils.py b/src/bitmessageqt/utils.py
index 9f849b3b..cdeb0331 100644
--- a/src/bitmessageqt/utils.py
+++ b/src/bitmessageqt/utils.py
@@ -1,7 +1,7 @@
import hashlib
import os
-from PyQt4 import QtGui
+from qtpy import QtGui
import state
from addresses import addBMIfNotPresent
@@ -30,16 +30,17 @@ def identiconize(address):
# It can be used as a pseudo-password to salt the generation of
# the identicons to decrease the risk of attacks where someone creates
# an address to mimic someone else's identicon.
- identiconsuffix = config.get('bitmessagesettings', 'identiconsuffix')
+ data = addBMIfNotPresent(address) + config.get(
+ 'bitmessagesettings', 'identiconsuffix')
if identicon_lib[:len('qidenticon')] == 'qidenticon':
# originally by:
# :Author:Shin Adachi
# Licesensed under FreeBSD License.
# stripped from PIL and uses QT instead (by sendiulo, same license)
import qidenticon
- icon_hash = hashlib.md5(
- addBMIfNotPresent(address) + identiconsuffix).hexdigest()
- use_two_colors = identicon_lib[:len('qidenticon_two')] == 'qidenticon_two'
+ icon_hash = hashlib.md5(data).hexdigest()
+ use_two_colors = (
+ identicon_lib[:len('qidenticon_two')] == 'qidenticon_two')
opacity = int(
identicon_lib not in (
'qidenticon_x', 'qidenticon_two_x',
@@ -63,8 +64,7 @@ def identiconize(address):
# https://github.com/azaghal/pydenticon
# note that it requires pillow (or PIL) to be installed:
# https://python-pillow.org/
- idcon_render = Pydenticon(
- addBMIfNotPresent(address) + identiconsuffix, size * 3)
+ idcon_render = Pydenticon(data, size * 3)
rendering = idcon_render._render()
data = rendering.convert("RGBA").tostring("raw", "RGBA")
qim = QtGui.QImage(data, size, size, QtGui.QImage.Format_ARGB32)
@@ -105,11 +105,9 @@ def avatarize(address):
lower_default = state.appdata + 'avatars/' + 'default.' + ext.lower()
upper_default = state.appdata + 'avatars/' + 'default.' + ext.upper()
if os.path.isfile(lower_default):
- default = lower_default
idcon.addFile(lower_default)
return idcon
elif os.path.isfile(upper_default):
- default = upper_default
idcon.addFile(upper_default)
return idcon
# If no avatar is found
diff --git a/src/bitmessageqt/widgets.py b/src/bitmessageqt/widgets.py
index 8ef807f2..e3232fe6 100644
--- a/src/bitmessageqt/widgets.py
+++ b/src/bitmessageqt/widgets.py
@@ -1,13 +1,15 @@
-from PyQt4 import uic
+from qtpy import uic
import os.path
import paths
-import sys
+
def resource_path(resFile):
baseDir = paths.codePath()
- for subDir in ["ui", "bitmessageqt"]:
- if os.path.isdir(os.path.join(baseDir, subDir)) and os.path.isfile(os.path.join(baseDir, subDir, resFile)):
- return os.path.join(baseDir, subDir, resFile)
+ for subDir in ("ui", "bitmessageqt"):
+ path = os.path.join(baseDir, subDir, resFile)
+ if os.path.isfile(path):
+ return path
+
def load(resFile, widget):
uic.loadUi(resource_path(resFile), widget)
diff --git a/src/bmconfigparser.py b/src/bmconfigparser.py
index abf285ad..c3a4b201 100644
--- a/src/bmconfigparser.py
+++ b/src/bmconfigparser.py
@@ -114,7 +114,8 @@ class BMConfigParser(SafeConfigParser):
"""Return a list of local bitmessage addresses (from section labels)"""
sections = [x for x in self.sections() if x.startswith('BM-')]
if sort:
- sections.sort(key=lambda item: self.get(item, 'label').lower())
+ sections.sort(key=lambda item: self.get(item, 'label') \
+ .decode('utf-8').lower())
return sections
def save(self):
diff --git a/src/class_addressGenerator.py b/src/class_addressGenerator.py
index 33da1371..4927b333 100644
--- a/src/class_addressGenerator.py
+++ b/src/class_addressGenerator.py
@@ -1,5 +1,5 @@
"""
-A thread for creating addresses
+addressGenerator thread class definition
"""
import time
@@ -211,8 +211,8 @@ class addressGenerator(StoppableThread):
'updateStatusBar',
_translate(
"MainWindow",
- "Generating %1 new addresses."
- ).arg(str(numberOfAddressesToMake))
+ "Generating {0} new addresses."
+ ).format(str(numberOfAddressesToMake))
))
signingKeyNonce = 0
encryptionKeyNonce = 1
@@ -302,9 +302,9 @@ class addressGenerator(StoppableThread):
'updateStatusBar',
_translate(
"MainWindow",
- "%1 is already in 'Your Identities'."
+ "{0} is already in 'Your Identities'."
" Not adding it again."
- ).arg(address)
+ ).format(address)
))
else:
self.logger.debug('label: %s', label)
diff --git a/src/class_objectProcessor.py b/src/class_objectProcessor.py
index 469ccbfa..658bad9c 100644
--- a/src/class_objectProcessor.py
+++ b/src/class_objectProcessor.py
@@ -148,11 +148,10 @@ class objectProcessor(threading.Thread):
" WHERE ackdata=?", int(time.time()), data[readPosition:])
queues.UISignalQueue.put((
'updateSentItemStatusByAckdata', (
- data[readPosition:],
- _translate(
+ data[readPosition:], _translate(
"MainWindow",
- "Acknowledgement of the message received %1"
- ).arg(l10n.formatTimestamp()))
+ "Acknowledgement of the message received {0}"
+ ).format(l10n.formatTimestamp()))
))
else:
logger.debug('This object is not an acknowledgement bound for me.')
diff --git a/src/class_singleWorker.py b/src/class_singleWorker.py
index f2821f65..2d16c869 100644
--- a/src/class_singleWorker.py
+++ b/src/class_singleWorker.py
@@ -24,12 +24,12 @@ import protocol
import queues
import shared
import state
-import tr
from addresses import decodeAddress, decodeVarint, encodeVarint
from bmconfigparser import config
from helper_sql import sqlExecute, sqlQuery
from network import knownnodes, StoppableThread
from six.moves import configparser, queue
+from tr import _translate
def sizeof_fmt(num, suffix='h/s'):
@@ -217,9 +217,8 @@ class singleWorker(StoppableThread):
return privSigningKeyHex, privEncryptionKeyHex, \
pubSigningKey, pubEncryptionKey
- def _doPOWDefaults(self, payload, TTL,
- log_prefix='',
- log_time=False):
+ def _doPOWDefaults(
+ self, payload, TTL, log_prefix='', log_time=False):
target = 2 ** 64 / (
defaults.networkDefaultProofOfWorkNonceTrialsPerByte * (
len(payload) + 8
@@ -245,14 +244,16 @@ class singleWorker(StoppableThread):
'PoW took %.1f seconds, speed %s.',
delta, sizeof_fmt(nonce / delta)
)
- except: # noqa:E722 # NameError
+ except NameError:
self.logger.warning("Proof of Work exception")
payload = pack('>Q', nonce) + payload
return payload
def doPOWForMyV2Pubkey(self, adressHash):
- """ This function also broadcasts out the pubkey
- message once it is done with the POW"""
+ """
+ This function also broadcasts out the pubkey message once it is
+ done with the POW
+ """
# Look up my stream number based on my address hash
myAddress = shared.myAddressesByHash[adressHash]
addressVersionNumber, streamNumber = decodeAddress(myAddress)[1:3]
@@ -308,9 +309,10 @@ class singleWorker(StoppableThread):
def sendOutOrStoreMyV3Pubkey(self, adressHash):
"""
- If this isn't a chan address, this function assembles the pubkey data, does the necessary POW and sends it out.
- If it *is* a chan then it assembles the pubkey and stores is in the pubkey table so that we can send messages
- to "ourselves".
+ If this isn't a chan address, this function assembles the pubkey
+ data, does the necessary POW and sends it out.
+ If it *is* a chan then it assembles the pubkey and stores it in
+ the pubkey table so that we can send messages to "ourselves".
"""
try:
myAddress = shared.myAddressesByHash[adressHash]
@@ -396,9 +398,10 @@ class singleWorker(StoppableThread):
def sendOutOrStoreMyV4Pubkey(self, myAddress):
"""
- It doesn't send directly anymore. It put is to a queue for another thread to send at an appropriate time,
- whereas in the past it directly appended it to the outgoing buffer, I think. Same with all the other methods in
- this class.
+ It doesn't send directly anymore. It put is to a queue for
+ another thread to send at an appropriate time, whereas in the
+ past it directly appended it to the outgoing buffer, I think.
+ Same with all the other methods in this class.
"""
if not config.has_section(myAddress):
# The address has been deleted.
@@ -525,7 +528,10 @@ class singleWorker(StoppableThread):
queues.invQueue.put((streamNumber, inventoryHash))
def sendBroadcast(self):
- """Send a broadcast-type object (assemble the object, perform PoW and put it to the inv announcement queue)"""
+ """
+ Send a broadcast-type object (assemble the object, perform PoW
+ and put it to the inv announcement queue)
+ """
# Reset just in case
sqlExecute(
'''UPDATE sent SET status='broadcastqueued' '''
@@ -556,8 +562,7 @@ class singleWorker(StoppableThread):
except ValueError:
queues.UISignalQueue.put((
'updateSentItemStatusByAckdata', (
- ackdata,
- tr._translate(
+ ackdata, _translate(
"MainWindow",
"Error! Could not find sender address"
" (your address) in the keys.dat file."))
@@ -572,7 +577,7 @@ class singleWorker(StoppableThread):
queues.UISignalQueue.put((
'updateSentItemStatusByAckdata', (
ackdata,
- tr._translate(
+ _translate(
"MainWindow",
"Error, can't send."))
))
@@ -661,8 +666,7 @@ class singleWorker(StoppableThread):
queues.UISignalQueue.put((
'updateSentItemStatusByAckdata', (
- ackdata,
- tr._translate(
+ ackdata, _translate(
"MainWindow",
"Doing work necessary to send broadcast..."))
))
@@ -694,11 +698,9 @@ class singleWorker(StoppableThread):
queues.UISignalQueue.put((
'updateSentItemStatusByAckdata', (
- ackdata,
- tr._translate(
- "MainWindow",
- "Broadcast sent on %1"
- ).arg(l10n.formatTimestamp()))
+ ackdata, _translate(
+ "MainWindow", "Broadcast sent on {0}"
+ ).format(l10n.formatTimestamp()))
))
# Update the status of the message in the 'sent' table to have
@@ -710,7 +712,10 @@ class singleWorker(StoppableThread):
)
def sendMsg(self):
- """Send a message-type object (assemble the object, perform PoW and put it to the inv announcement queue)"""
+ """
+ Send a message-type object (assemble the object, perform PoW
+ and put it to the inv announcement queue)
+ """
# pylint: disable=too-many-nested-blocks
# Reset just in case
sqlExecute(
@@ -806,8 +811,7 @@ class singleWorker(StoppableThread):
)
queues.UISignalQueue.put((
'updateSentItemStatusByToAddress', (
- toaddress,
- tr._translate(
+ toaddress, _translate(
"MainWindow",
"Encryption key was requested earlier."))
))
@@ -879,8 +883,7 @@ class singleWorker(StoppableThread):
)
queues.UISignalQueue.put((
'updateSentItemStatusByToAddress', (
- toaddress,
- tr._translate(
+ toaddress, _translate(
"MainWindow",
"Sending a request for the"
" recipient\'s encryption key."))
@@ -904,8 +907,7 @@ class singleWorker(StoppableThread):
state.ackdataForWhichImWatching[ackdata] = 0
queues.UISignalQueue.put((
'updateSentItemStatusByAckdata', (
- ackdata,
- tr._translate(
+ ackdata, _translate(
"MainWindow",
"Looking up the receiver\'s public key"))
))
@@ -962,15 +964,14 @@ class singleWorker(StoppableThread):
)
queues.UISignalQueue.put((
'updateSentItemStatusByAckdata', (
- ackdata,
- tr._translate(
+ ackdata, _translate(
"MainWindow",
"Problem: Destination is a mobile"
" device who requests that the"
" destination be included in the"
" message but this is disallowed in"
- " your settings. %1"
- ).arg(l10n.formatTimestamp()))
+ " your settings. {0}"
+ ).format(l10n.formatTimestamp()))
))
# if the human changes their setting and then
# sends another message or restarts their client,
@@ -993,8 +994,7 @@ class singleWorker(StoppableThread):
defaults.networkDefaultPayloadLengthExtraBytes
queues.UISignalQueue.put((
'updateSentItemStatusByAckdata', (
- ackdata,
- tr._translate(
+ ackdata, _translate(
"MainWindow",
"Doing work necessary to send message.\n"
"There is no required difficulty for"
@@ -1026,32 +1026,19 @@ class singleWorker(StoppableThread):
requiredAverageProofOfWorkNonceTrialsPerByte,
requiredPayloadLengthExtraBytes
)
-
- queues.UISignalQueue.put(
- (
- 'updateSentItemStatusByAckdata',
- (
- ackdata,
- tr._translate(
- "MainWindow",
- "Doing work necessary to send message.\n"
- "Receiver\'s required difficulty: %1"
- " and %2"
- ).arg(
- str(
- float(requiredAverageProofOfWorkNonceTrialsPerByte)
- / defaults.networkDefaultProofOfWorkNonceTrialsPerByte
- )
- ).arg(
- str(
- float(requiredPayloadLengthExtraBytes)
- / defaults.networkDefaultPayloadLengthExtraBytes
- )
- )
- )
- )
- )
-
+ queues.UISignalQueue.put((
+ 'updateSentItemStatusByAckdata', (
+ ackdata, _translate(
+ "MainWindow",
+ "Doing work necessary to send message.\n"
+ "Receiver\'s required difficulty: {0} and {1}"
+ ).format(
+ float(requiredAverageProofOfWorkNonceTrialsPerByte)
+ / defaults.networkDefaultProofOfWorkNonceTrialsPerByte,
+ float(requiredPayloadLengthExtraBytes)
+ / defaults.networkDefaultPayloadLengthExtraBytes
+ ))
+ ))
if status != 'forcepow':
maxacceptablenoncetrialsperbyte = config.getint(
'bitmessagesettings', 'maxacceptablenoncetrialsperbyte')
@@ -1071,18 +1058,19 @@ class singleWorker(StoppableThread):
ackdata)
queues.UISignalQueue.put((
'updateSentItemStatusByAckdata', (
- ackdata,
- tr._translate(
+ ackdata, _translate(
"MainWindow",
- "Problem: The work demanded by"
- " the recipient (%1 and %2) is"
- " more difficult than you are"
- " willing to do. %3"
- ).arg(str(float(requiredAverageProofOfWorkNonceTrialsPerByte)
- / defaults.networkDefaultProofOfWorkNonceTrialsPerByte)
- ).arg(str(float(requiredPayloadLengthExtraBytes)
- / defaults.networkDefaultPayloadLengthExtraBytes)
- ).arg(l10n.formatTimestamp()))))
+ "Problem: The work demanded by the"
+ " recipient ({0} and {1}) is more"
+ " difficult than you are willing"
+ " to do. {2}"
+ ).format(
+ float(requiredAverageProofOfWorkNonceTrialsPerByte)
+ / defaults.networkDefaultProofOfWorkNonceTrialsPerByte,
+ float(requiredPayloadLengthExtraBytes)
+ / defaults.networkDefaultPayloadLengthExtraBytes,
+ l10n.formatTimestamp()))
+ ))
continue
else: # if we are sending a message to ourselves or a chan..
self.logger.info('Sending a message.')
@@ -1096,15 +1084,14 @@ class singleWorker(StoppableThread):
except (configparser.NoSectionError, configparser.NoOptionError) as err:
queues.UISignalQueue.put((
'updateSentItemStatusByAckdata', (
- ackdata,
- tr._translate(
+ ackdata, _translate(
"MainWindow",
"Problem: You are trying to send a"
" message to yourself or a chan but your"
" encryption key could not be found in"
" the keys.dat file. Could not encrypt"
- " message. %1"
- ).arg(l10n.formatTimestamp()))
+ " message. {0}"
+ ).format(l10n.formatTimestamp()))
))
self.logger.error(
'Error within sendMsg. Could not read the keys'
@@ -1122,8 +1109,7 @@ class singleWorker(StoppableThread):
defaults.networkDefaultPayloadLengthExtraBytes
queues.UISignalQueue.put((
'updateSentItemStatusByAckdata', (
- ackdata,
- tr._translate(
+ ackdata, _translate(
"MainWindow",
"Doing work necessary to send message."))
))
@@ -1145,8 +1131,7 @@ class singleWorker(StoppableThread):
except ValueError:
queues.UISignalQueue.put((
'updateSentItemStatusByAckdata', (
- ackdata,
- tr._translate(
+ ackdata, _translate(
"MainWindow",
"Error! Could not find sender address"
" (your address) in the keys.dat file."))
@@ -1161,7 +1146,7 @@ class singleWorker(StoppableThread):
queues.UISignalQueue.put((
'updateSentItemStatusByAckdata', (
ackdata,
- tr._translate(
+ _translate(
"MainWindow",
"Error, can't send."))
))
@@ -1213,8 +1198,7 @@ class singleWorker(StoppableThread):
# The fullAckPayload is a normal msg protocol message
# with the proof of work already completed that the
# receiver of this message can easily send out.
- fullAckPayload = self.generateFullAckMessage(
- ackdata, toStreamNumber, TTL)
+ fullAckPayload = self.generateFullAckMessage(ackdata, TTL)
payload += encodeVarint(len(fullAckPayload))
payload += fullAckPayload
dataToSign = pack('>Q', embeddedTime) + '\x00\x00\x00\x02' + \
@@ -1237,12 +1221,11 @@ class singleWorker(StoppableThread):
)
queues.UISignalQueue.put((
'updateSentItemStatusByAckdata', (
- ackdata,
- tr._translate(
+ ackdata, _translate(
"MainWindow",
"Problem: The recipient\'s encryption key is"
- " no good. Could not encrypt message. %1"
- ).arg(l10n.formatTimestamp()))
+ " no good. Could not encrypt message. {0}"
+ ).format(l10n.formatTimestamp()))
))
continue
@@ -1306,21 +1289,19 @@ class singleWorker(StoppableThread):
not protocol.checkBitfield(behaviorBitfield, protocol.BITFIELD_DOESACK):
queues.UISignalQueue.put((
'updateSentItemStatusByAckdata', (
- ackdata,
- tr._translate(
- "MainWindow",
- "Message sent. Sent at %1"
- ).arg(l10n.formatTimestamp()))))
+ ackdata, _translate(
+ "MainWindow", "Message sent. Sent at {0}"
+ ).format(l10n.formatTimestamp()))
+ ))
else:
# not sending to a chan or one of my addresses
queues.UISignalQueue.put((
'updateSentItemStatusByAckdata', (
- ackdata,
- tr._translate(
+ ackdata, _translate(
"MainWindow",
"Message sent. Waiting for acknowledgement."
- " Sent on %1"
- ).arg(l10n.formatTimestamp()))
+ " Sent on {0}"
+ ).format(l10n.formatTimestamp()))
))
self.logger.info(
'Broadcasting inv for my msg(within sendmsg function): %s',
@@ -1446,8 +1427,7 @@ class singleWorker(StoppableThread):
queues.UISignalQueue.put(('updateStatusBar', statusbar))
queues.UISignalQueue.put((
'updateSentItemStatusByToAddress', (
- toAddress,
- tr._translate(
+ toAddress, _translate(
"MainWindow",
"Doing work necessary to request encryption key."))
))
@@ -1471,30 +1451,31 @@ class singleWorker(StoppableThread):
int(time.time()), retryNumber + 1, sleeptill, toAddress)
queues.UISignalQueue.put((
- 'updateStatusBar',
- tr._translate(
+ 'updateStatusBar', _translate(
"MainWindow",
"Broadcasting the public key request. This program will"
" auto-retry if they are offline.")
))
queues.UISignalQueue.put((
'updateSentItemStatusByToAddress', (
- toAddress,
- tr._translate(
+ toAddress, _translate(
"MainWindow",
"Sending public key request. Waiting for reply."
- " Requested at %1"
- ).arg(l10n.formatTimestamp()))
+ " Requested at {0}"
+ ).format(l10n.formatTimestamp()))
))
- def generateFullAckMessage(self, ackdata, _, TTL):
- """
- It might be perfectly fine to just use the same TTL for the ackdata that we use for the message. But I would
- rather it be more difficult for attackers to associate ackData with the associated msg object. However, users
- would want the TTL of the acknowledgement to be about the same as they set for the message itself. So let's set
- the TTL of the acknowledgement to be in one of three 'buckets': 1 hour, 7 days, or 28 days, whichever is
- relatively close to what the user specified.
- """
+ def generateFullAckMessage(self, ackdata, TTL):
+ """Create ACK packet"""
+ # It might be perfectly fine to just use the same TTL for
+ # the ackdata that we use for the message. But I would rather
+ # it be more difficult for attackers to associate ackData with
+ # the associated msg object. However, users would want the TTL
+ # of the acknowledgement to be about the same as they set
+ # for the message itself. So let's set the TTL of the
+ # acknowledgement to be in one of three 'buckets': 1 hour, 7
+ # days, or 28 days, whichever is relatively close to what the
+ # user specified.
if TTL < 24 * 60 * 60: # 1 day
TTL = 24 * 60 * 60 # 1 day
elif TTL < 7 * 24 * 60 * 60: # 1 week
diff --git a/src/depends.py b/src/depends.py
index d966d5fe..6aeb32ef 100755
--- a/src/depends.py
+++ b/src/depends.py
@@ -17,6 +17,7 @@ if not hasattr(sys, 'hexversion') or sys.hexversion < 0x20300F0:
)
import logging # noqa:E402
+from distutils import version
import subprocess # nosec B404
from importlib import import_module
@@ -53,23 +54,23 @@ PACKAGE_MANAGER = {
}
PACKAGES = {
- "PyQt4": {
- "OpenBSD": "py-qt4",
- "FreeBSD": "py27-qt4",
- "Debian": "python-qt4",
- "Ubuntu": "python-qt4",
- "Ubuntu 12": "python-qt4",
- "Ubuntu 20": "",
- "openSUSE": "python-qt",
- "Fedora": "PyQt4",
- "Guix": "python2-pyqt@4.11.4",
- "Gentoo": "dev-python/PyQt4",
+ "qtpy": {
+ "OpenBSD": "py-qtpy",
+ "FreeBSD": "py27-QtPy",
+ "Debian": "python-qtpy",
+ "Ubuntu": "python-qtpy",
+ "Ubuntu 12": "python-qtpy",
+ "Ubuntu 20": "python-qtpy",
+ "openSUSE": "python-QtPy",
+ "Fedora": "python2-QtPy",
+ "Guix": "",
+ "Gentoo": "dev-python/QtPy",
"optional": True,
"description":
- "You only need PyQt if you want to use the GUI."
+ "You only need qtpy if you want to use the GUI."
" When only running as a daemon, this can be skipped.\n"
- "However, you would have to install it manually"
- " because setuptools does not support PyQt."
+ "Also maybe you need to install PyQt5 or PyQt4"
+ " if your package manager not installs it as qtpy dependency"
},
"msgpack": {
"OpenBSD": "py-msgpack",
@@ -156,19 +157,19 @@ detectOS.result = None
def detectOSRelease():
"""Detecting the release of OS"""
with open("/etc/os-release", 'r') as osRelease:
- version = None
+ ver = None
for line in osRelease:
if line.startswith("NAME="):
detectOS.result = OS_RELEASE.get(
line.replace('"', '').split("=")[-1].strip().lower())
elif line.startswith("VERSION_ID="):
try:
- version = float(line.split("=")[1].replace("\"", ""))
+ ver = float(line.split("=")[1].replace("\"", ""))
except ValueError:
pass
- if detectOS.result == "Ubuntu" and version < 14:
+ if detectOS.result == "Ubuntu" and ver < 14:
detectOS.result = "Ubuntu 12"
- elif detectOS.result == "Ubuntu" and version >= 20:
+ elif detectOS.result == "Ubuntu" and ver >= 20:
detectOS.result = "Ubuntu 20"
@@ -191,7 +192,7 @@ def try_import(module, log_extra=False):
def check_ripemd160():
"""Check availability of the RIPEMD160 hash function"""
try:
- from fallback import RIPEMD160Hash # pylint: disable=relative-import
+ from fallback import RIPEMD160Hash
except ImportError:
return False
return RIPEMD160Hash is not None
@@ -380,33 +381,52 @@ def check_curses():
def check_pyqt():
"""Do pyqt dependency check.
- Here we are checking for PyQt4 with its version, as for it require
+ Here we are checking for qtpy with its version, as for it require
PyQt 4.8 or later.
"""
- QtCore = try_import(
- 'PyQt4.QtCore', 'PyBitmessage requires PyQt 4.8 or later and Qt 4.7 or later.')
-
- if not QtCore:
+ # pylint: disable=no-member
+ try:
+ import qtpy
+ except ImportError:
+ logger.error(
+ 'PyBitmessage requires qtpy, and PyQt5 or PyQt4, '
+ ' PyQt 4.8 or later and Qt 4.7 or later.')
return False
- logger.info('PyQt Version: %s', QtCore.PYQT_VERSION_STR)
- logger.info('Qt Version: %s', QtCore.QT_VERSION_STR)
+ from qtpy import QtCore
+ try:
+ logger.info('PyQt Version: %s', QtCore.PYQT_VERSION_STR)
+ except AttributeError:
+ logger.info('Can be PySide..')
+ try:
+ logger.info('Qt Version: %s', QtCore.__version__)
+ except AttributeError:
+ # Can be PySide..
+ pass
passed = True
- if QtCore.PYQT_VERSION < 0x40800:
- logger.error(
- 'This version of PyQt is too old. PyBitmessage requries'
- ' PyQt 4.8 or later.')
- passed = False
- if QtCore.QT_VERSION < 0x40700:
- logger.error(
- 'This version of Qt is too old. PyBitmessage requries'
- ' Qt 4.7 or later.')
- passed = False
+ try:
+ if version.LooseVersion(QtCore.PYQT_VERSION_STR) < '4.8':
+ logger.error(
+ 'This version of PyQt is too old. PyBitmessage requries'
+ ' PyQt 4.8 or later.')
+ passed = False
+ except AttributeError:
+ # Can be PySide..
+ pass
+ try:
+ if version.LooseVersion(QtCore.__version__) < '4.7':
+ logger.error(
+ 'This version of Qt is too old. PyBitmessage requries'
+ ' Qt 4.7 or later.')
+ passed = False
+ except AttributeError:
+ # Can be PySide..
+ pass
return passed
def check_msgpack():
- """Do sgpack module check.
+ """Do msgpack module check.
simply checking if msgpack package with all its dependency
is available or not as recommended for messages coding.
diff --git a/src/helper_msgcoding.py b/src/helper_msgcoding.py
index 05fa1c1b..abc9a228 100644
--- a/src/helper_msgcoding.py
+++ b/src/helper_msgcoding.py
@@ -155,5 +155,6 @@ class MsgDecode(object):
# Throw away any extra lines (headers) after the subject.
if subject:
subject = subject.splitlines()[0]
- self.subject = subject
- self.body = body
+ # Field types should be the same for all message types
+ self.subject = subject.decode('utf-8', 'replace')
+ self.body = body.decode('utf-8', 'replace')
diff --git a/src/namecoin.py b/src/namecoin.py
index a16cb3d7..87414570 100644
--- a/src/namecoin.py
+++ b/src/namecoin.py
@@ -1,7 +1,7 @@
"""
Namecoin queries
"""
-# pylint: disable=too-many-branches,protected-access
+# pylint: disable=too-many-branches
import base64
import httplib
@@ -14,14 +14,14 @@ import defaults
from addresses import decodeAddress
from bmconfigparser import config
from debug import logger
-from tr import _translate # translate
+from tr import _translate
+
configSection = "bitmessagesettings"
class RPCError(Exception):
"""Error thrown when the RPC call returns an error."""
-
error = None
def __init__(self, data):
@@ -29,7 +29,7 @@ class RPCError(Exception):
self.error = data
def __str__(self):
- return "{0}: {1}".format(type(self).__name__, self.error)
+ return '{0}: {1}'.format(type(self).__name__, self.error)
class namecoinConnection(object):
@@ -46,8 +46,8 @@ class namecoinConnection(object):
def __init__(self, options=None):
"""
- Initialise. If options are given, take the connection settings from
- them instead of loading from the configs. This can be used to test
+ Initialise. If options are given, take the connection settings from
+ them instead of loading from the configs. This can be used to test
currently entered connection settings in the config dialog without
actually changing the values (yet).
"""
@@ -69,14 +69,14 @@ class namecoinConnection(object):
self.user = options["user"]
self.password = options["password"]
- assert self.nmctype == "namecoind" or self.nmctype == "nmcontrol"
+ assert self.nmctype in ("namecoind", "nmcontrol")
if self.nmctype == "namecoind":
self.con = httplib.HTTPConnection(self.host, self.port, timeout=3)
def query(self, identity):
"""
Query for the bitmessage address corresponding to the given identity
- string. If it doesn't contain a slash, id/ is prepended. We return
+ string. If it doesn't contain a slash, id/ is prepended. We return
the result as (Error, Address) pair, where the Error is an error
message to display or None in case of success.
"""
@@ -96,8 +96,8 @@ class namecoinConnection(object):
res = res["reply"]
if not res:
return (_translate(
- "MainWindow", "The name %1 was not found."
- ).arg(identity.decode("utf-8", "ignore")), None)
+ "MainWindow", "The name {0} was not found."
+ ).format(identity.decode('utf-8', 'ignore')), None)
else:
assert False
except RPCError as exc:
@@ -107,12 +107,12 @@ class namecoinConnection(object):
else:
errmsg = exc.error
return (_translate(
- "MainWindow", "The namecoin query failed (%1)"
- ).arg(errmsg.decode("utf-8", "ignore")), None)
+ "MainWindow", "The namecoin query failed ({0})"
+ ).format(errmsg.decode('utf-8', 'ignore')), None)
except AssertionError:
return (_translate(
- "MainWindow", "Unknown namecoin interface type: %1"
- ).arg(self.nmctype.decode("utf-8", "ignore")), None)
+ "MainWindow", "Unknown namecoin interface type: {0}"
+ ).format(self.nmctype.decode('utf-8', 'ignore')), None)
except Exception:
logger.exception("Namecoin query exception")
return (_translate(
@@ -135,12 +135,12 @@ class namecoinConnection(object):
) if valid else (
_translate(
"MainWindow",
- "The name %1 has no associated Bitmessage address."
- ).arg(identity.decode("utf-8", "ignore")), None)
+ "The name {0} has no associated Bitmessage address."
+ ).format(identity.decode('utf-8', 'ignore')), None)
def test(self):
"""
- Test the connection settings. This routine tries to query a "getinfo"
+ Test the connection settings. This routine tries to query a "getinfo"
command, and builds either an error message or a success message with
some info from it.
"""
@@ -160,44 +160,36 @@ class namecoinConnection(object):
versStr = "0.%d.%d" % (v1, v2)
else:
versStr = "0.%d.%d.%d" % (v1, v2, v3)
- message = (
- "success",
- _translate(
+ return (
+ 'success', _translate(
"MainWindow",
- "Success! Namecoind version %1 running.").arg(
- versStr.decode("utf-8", "ignore")))
+ "Success! Namecoind version {0} running."
+ ).format(versStr.decode('utf-8', 'ignore'))
+ )
elif self.nmctype == "nmcontrol":
res = self.callRPC("data", ["status"])
prefix = "Plugin data running"
if ("reply" in res) and res["reply"][:len(prefix)] == prefix:
return (
- "success",
- _translate(
+ 'success', _translate(
"MainWindow",
- "Success! NMControll is up and running."
- )
+ "Success! NMControll is up and running.")
)
logger.error("Unexpected nmcontrol reply: %s", res)
- message = (
- "failed",
- _translate(
- "MainWindow",
- "Couldn\'t understand NMControl."
- )
+ return (
+ 'failed', _translate(
+ "MainWindow", "Couldn\'t understand NMControl.")
)
else:
sys.exit("Unsupported Namecoin type")
- return message
-
except Exception:
logger.info("Namecoin connection test failure")
return (
- "failed",
- _translate(
+ 'failed', _translate(
"MainWindow", "The connection to namecoin failed.")
)
@@ -245,26 +237,24 @@ class namecoinConnection(object):
"Authorization", "Basic %s" % base64.b64encode(authstr))
self.con.endheaders()
self.con.send(data)
+ try:
+ resp = self.con.getresponse()
+ result = resp.read()
+ if resp.status != 200:
+ raise Exception(
+ "Namecoin returned status %i: %s" %
+ (resp.status, resp.reason))
+ except: # noqa:E722
+ logger.info("HTTP receive error")
except: # noqa:E722
logger.info("HTTP connection error")
- return None
-
- try:
- resp = self.con.getresponse()
- result = resp.read()
- if resp.status != 200:
- raise Exception(
- "Namecoin returned status"
- " %i: %s" % (resp.status, resp.reason))
- except: # noqa:E722
- logger.info("HTTP receive error")
- return None
return result
def queryServer(self, data):
- """Helper routine sending data to the RPC "
- "server and returning the result."""
+ """
+ Helper routine sending data to the RPC server and returning the result.
+ """
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@@ -296,23 +286,24 @@ def lookupNamecoinFolder():
"""
app = "namecoin"
- from os import path, environ
+
if sys.platform == "darwin":
- if "HOME" in environ:
- dataFolder = path.join(os.environ["HOME"],
- "Library/Application Support/", app) + "/"
- else:
+ try:
+ dataFolder = os.path.join(
+ os.getenv("HOME"), "Library/Application Support/", app)
+ except TypeError: # getenv is None
sys.exit(
"Could not find home folder, please report this message"
" and your OS X version to the BitMessage Github."
- )
+ ) # TODO: remove exits from utility modules
- elif "win32" in sys.platform or "win64" in sys.platform:
- dataFolder = path.join(environ["APPDATA"], app) + "\\"
- else:
- dataFolder = path.join(environ["HOME"], ".%s" % app) + "/"
+ dataFolder = (
+ os.path.join(os.getenv("APPDATA"), app)
+ if sys.platform.startswith('win') else
+ os.path.join(os.getenv("HOME"), ".%s" % app)
+ )
- return dataFolder
+ return dataFolder + os.path.sep
def ensureNamecoinOptions():
@@ -357,8 +348,8 @@ def ensureNamecoinOptions():
nmc.close()
except IOError:
logger.warning(
- "%s unreadable or missing, Namecoin support deactivated",
- nmcConfig)
+ "%s unreadable or missing, Namecoin support deactivated", nmcConfig
+ )
except Exception:
logger.warning("Error processing namecoin.conf", exc_info=True)
diff --git a/src/network/tcp.py b/src/network/tcp.py
index 139715a6..47517528 100644
--- a/src/network/tcp.py
+++ b/src/network/tcp.py
@@ -138,9 +138,10 @@ class TCPConnection(BMProto, TLSDispatcher):
'updateStatusBar',
_translate(
"MainWindow",
- "The time on your computer, %1, may be wrong. "
+ "The time on your computer, {0}, may be wrong. "
"Please verify your settings."
- ).arg(l10n.formatTimestamp())))
+ ).format(l10n.formatTimestamp())
+ ))
def state_connection_fully_established(self):
"""
diff --git a/src/plugins/indicator_libmessaging.py b/src/plugins/indicator_libmessaging.py
index b471d2ef..4cd583e3 100644
--- a/src/plugins/indicator_libmessaging.py
+++ b/src/plugins/indicator_libmessaging.py
@@ -23,9 +23,9 @@ class IndicatorLibmessaging(object):
return
self._menu = {
- 'send': unicode(_translate('MainWindow', 'Send')),
- 'messages': unicode(_translate('MainWindow', 'Messages')),
- 'subscriptions': unicode(_translate('MainWindow', 'Subscriptions'))
+ 'send': _translate('MainWindow', 'Send'),
+ 'messages': _translate('MainWindow', 'Messages'),
+ 'subscriptions': _translate('MainWindow', 'Subscriptions')
}
self.new_message_item = self.new_broadcast_item = None
@@ -45,12 +45,11 @@ class IndicatorLibmessaging(object):
def show_unread(self, draw_attention=False):
"""
- show the number of unread messages and subscriptions
+ Show the number of unread messages and subscriptions
on the messaging menu
"""
for source, count in zip(
- ('messages', 'subscriptions'),
- self.form.getUnread()
+ ('messages', 'subscriptions'), self.form.getUnread()
):
if count > 0:
if self.app.has_source(source):
diff --git a/src/plugins/menu_qrcode.py b/src/plugins/menu_qrcode.py
index ea322a49..1fbccbe4 100644
--- a/src/plugins/menu_qrcode.py
+++ b/src/plugins/menu_qrcode.py
@@ -6,7 +6,7 @@ A menu plugin showing QR-Code for bitmessage address in modal dialog.
import urllib
import qrcode
-from PyQt4 import QtCore, QtGui
+from qtpy import QtGui, QtCore, QtWidgets
from pybitmessage.tr import _translate
@@ -39,23 +39,23 @@ class Image(qrcode.image.base.BaseImage): # pylint: disable=abstract-method
QtCore.Qt.black)
-class QRCodeDialog(QtGui.QDialog):
+class QRCodeDialog(QtWidgets.QDialog):
"""The dialog"""
def __init__(self, parent):
super(QRCodeDialog, self).__init__(parent)
- self.image = QtGui.QLabel(self)
- self.label = QtGui.QLabel(self)
+ self.image = QtWidgets.QLabel(self)
+ self.label = QtWidgets.QLabel(self)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.label.setFont(font)
self.label.setAlignment(
QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter)
- buttonBox = QtGui.QDialogButtonBox(self)
+ buttonBox = QtWidgets.QDialogButtonBox(self)
buttonBox.setOrientation(QtCore.Qt.Horizontal)
- buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok)
+ buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Ok)
buttonBox.accepted.connect(self.accept)
- layout = QtGui.QVBoxLayout(self)
+ layout = QtWidgets.QVBoxLayout(self)
layout.addWidget(self.image)
layout.addWidget(self.label)
layout.addWidget(buttonBox)
@@ -72,7 +72,7 @@ class QRCodeDialog(QtGui.QDialog):
self.label.setText(text)
self.label.setToolTip(text)
self.label.setFixedWidth(pixmap.width())
- self.setFixedSize(QtGui.QWidget.sizeHint(self))
+ self.setFixedSize(QtWidgets.QWidget.sizeHint(self))
def connect_plugin(form):
diff --git a/src/plugins/plugin.py b/src/plugins/plugin.py
index 629de0a6..9f3b76c0 100644
--- a/src/plugins/plugin.py
+++ b/src/plugins/plugin.py
@@ -32,6 +32,7 @@ def get_plugins(group, point='', name=None, fallback=None):
except (AttributeError,
ImportError,
ValueError,
+ RuntimeError, # PyQt for example
pkg_resources.DistributionNotFound,
pkg_resources.UnknownExtra):
logger.debug(
diff --git a/src/qidenticon.py b/src/qidenticon.py
index 13be3578..722c47ca 100644
--- a/src/qidenticon.py
+++ b/src/qidenticon.py
@@ -42,10 +42,7 @@ Returns an instance of :class:`QPixmap` which have generated identicon image.
from six.moves import range
-try:
- from PyQt5 import QtCore, QtGui
-except (ImportError, RuntimeError):
- from PyQt4 import QtCore, QtGui
+from qtpy import QtCore, QtGui
class IdenticonRendererBase(object):
@@ -129,11 +126,13 @@ class IdenticonRendererBase(object):
QtCore.QPointF(size, size), QtCore.QPointF(0., size)]
rotation = [0, 90, 180, 270]
- nopen = QtGui.QPen(foreColor, QtCore.Qt.NoPen)
+ nopen = QtGui.QPen(foreColor)
+ nopen.setStyle(QtCore.Qt.NoPen)
foreBrush = QtGui.QBrush(foreColor, QtCore.Qt.SolidPattern)
if penwidth > 0:
pen_color = QtGui.QColor(255, 255, 255)
- pen = QtGui.QPen(pen_color, QtCore.Qt.SolidPattern)
+ pen = QtGui.QPen(pen_color)
+ pen.setBrush(QtCore.Qt.SolidPattern)
pen.setWidth(penwidth)
painter = QtGui.QPainter()
diff --git a/src/tests/test_identicon.py b/src/tests/test_identicon.py
index 4c6be32d..35503d1c 100644
--- a/src/tests/test_identicon.py
+++ b/src/tests/test_identicon.py
@@ -4,7 +4,7 @@ import atexit
import unittest
try:
- from PyQt5 import QtGui, QtWidgets
+ from qtpy import QtGui, QtWidgets
from xvfbwrapper import Xvfb
from pybitmessage import qidenticon
except ImportError:
diff --git a/src/tr.py b/src/tr.py
index eec82c37..45e8668c 100644
--- a/src/tr.py
+++ b/src/tr.py
@@ -1,7 +1,6 @@
"""
-Translating text
+Slim layer providing environment agnostic _translate()
"""
-import os
try:
import state
@@ -9,51 +8,17 @@ except ImportError:
from . import state
-class translateClass:
- """
- This is used so that the translateText function can be used
- when we are in daemon mode and not using any QT functions.
- """
- # pylint: disable=old-style-class,too-few-public-methods
- def __init__(self, context, text):
- self.context = context
- self.text = text
-
- def arg(self, _):
- """Replace argument placeholders"""
- if '%' in self.text:
- # This doesn't actually do anything with the arguments
- # because we don't have a UI in which to display this information anyway.
- return translateClass(self.context, self.text.replace('%', '', 1))
- return self.text
-
-
-def _translate(context, text, disambiguation=None, encoding=None, n=None):
+def _tr_dummy(context, text, disambiguation=None, n=None):
# pylint: disable=unused-argument
- return translateText(context, text, n)
+ return text
-def translateText(context, text, n=None):
- """Translate text in context"""
+if state.enableGUI and not state.curses:
try:
- enableGUI = state.enableGUI
- except AttributeError: # inside the plugin
- enableGUI = True
- if enableGUI:
- try:
- from PyQt4 import QtCore, QtGui
- except Exception as err:
- print('PyBitmessage requires PyQt unless you want to run it as a daemon'
- ' and interact with it using the API.'
- ' You can download PyQt from http://www.riverbankcomputing.com/software/pyqt/download'
- ' or by searching Google for \'PyQt Download\'.'
- ' If you want to run in daemon mode, see https://bitmessage.org/wiki/Daemon')
- print('Error message:', err)
- os._exit(0) # pylint: disable=protected-access
- if n is None:
- return QtGui.QApplication.translate(context, text)
- return QtGui.QApplication.translate(context, text, None, QtCore.QCoreApplication.CodecForTr, n)
+ from qtpy import QtWidgets, QtCore
+ except ImportError:
+ _translate = _tr_dummy
else:
- if '%' in text:
- return translateClass(context, text.replace('%', '', 1))
- return text
+ _translate = QtWidgets.QApplication.translate
+else:
+ _translate = _tr_dummy
diff --git a/src/translations/bitmessage_ar.qm b/src/translations/bitmessage_ar.qm
index 892f6160..6f279545 100644
Binary files a/src/translations/bitmessage_ar.qm and b/src/translations/bitmessage_ar.qm differ
diff --git a/src/translations/bitmessage_ar.ts b/src/translations/bitmessage_ar.ts
index 6bf906d7..4b3ba9c1 100644
--- a/src/translations/bitmessage_ar.ts
+++ b/src/translations/bitmessage_ar.ts
@@ -241,8 +241,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- واحد من العناوين، %1، حاصل على رقم إصدار 1، العناوين ذات رقم الإصدار 1 غير مدعومه حالياً، هل باستطاعتنا حذفه الآن؟
+
+ واحد من العناوين، {0}، حاصل على رقم إصدار 1، العناوين ذات رقم الإصدار 1 غير مدعومه حالياً، هل باستطاعتنا حذفه الآن؟
@@ -261,13 +261,13 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
-
- تم إرسال الرسالة في %1
+
+ تم إرسال الرسالة في {0}
@@ -276,8 +276,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- تم استلام إشعار الاستلام للرسالة %1
+
+ تم استلام إشعار الاستلام للرسالة {0}
@@ -286,18 +286,18 @@ Please type the desired email address (including @mailchuck.com) below:
-
- البث في %1
+
+ البث في {0}
-
- مشكلة: العمل المطلوب من قبل المستلم أصعب من ما كنت مستعد للقيام به %1
+
+ مشكلة: العمل المطلوب من قبل المستلم أصعب من ما كنت مستعد للقيام به {0}
-
- مشكلة: مفتاح تشفير المرسل إليه غير جيد، لا يمكن تشفير الرسالة. %1
+
+ مشكلة: مفتاح تشفير المرسل إليه غير جيد، لا يمكن تشفير الرسالة. {0}
@@ -306,8 +306,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- حالة غير معروفه: %1 %2
+
+ حالة غير معروفه: {0} {1}
@@ -347,10 +347,10 @@ Please type the desired email address (including @mailchuck.com) below:
يمكنك إدارة مفاتيحك بواسطة تعديل ملف keys.dat المحفوظ في
-%1
+{0}
مهم جداً أن تحتفظ بنسخة إضافية من هذا الملف.
@@ -366,10 +366,10 @@ It is important that you back up this file.
يمكنك إدارة مفاتيحك بواسطة تعديل ملف keys.dat المحفوظ في
-%1
+{0}
مهم جداً أن تحتفظ بنسخة إضافية من هذا الملف. هل ترغب بفتح الملف الآن؟ تأكد من إغلاق البرنامج Bitmessage قبل تعديل الملف.
@@ -434,8 +434,8 @@ It is important that you back up this file. Would you like to open the file now?
-
- تم تكوين زمرة بنجاح، لإتاحة الفرصة للأخرين بالإنضمام لمجموعتك أعطهم إسم الزمرة و هذا العنوان %1، هذا العنوان سيظهر ضمن هوياتك.
+
+ تم تكوين زمرة بنجاح، لإتاحة الفرصة للأخرين بالإنضمام لمجموعتك أعطهم إسم الزمرة و هذا العنوان {0}، هذا العنوان سيظهر ضمن هوياتك.
@@ -502,53 +502,53 @@ It is important that you back up this file. Would you like to open the file now?
-
+
-
+
-
- خطأ: عناوين ال Bitmessage تبدأ ب BM-، يرجى فحص %1
+
+ خطأ: عناوين ال Bitmessage تبدأ ب BM-، يرجى فحص {0}
-
- خطأ: لم يتم إدخال أو نسخ العنوان %1 بطريقة صحيحة، يرجى فحصه.
+
+ خطأ: لم يتم إدخال أو نسخ العنوان {0} بطريقة صحيحة، يرجى فحصه.
-
- خطأ: العنوان %1 يحتوي على حروف غير صالحة، يرجى فحصه.
+
+ خطأ: العنوان {0} يحتوي على حروف غير صالحة، يرجى فحصه.
-
- خطأ: رقم إصدار العنوان %1 عالي جداً، إما أن تقوم بتحديث برنامج Bitmessage أو أن شريكك ذكي جدأ.
+
+ خطأ: رقم إصدار العنوان {0} عالي جداً، إما أن تقوم بتحديث برنامج Bitmessage أو أن شريكك ذكي جدأ.
-
- بعض البيانات المشفرة ضمن العنوان %1 قصيرة جداً. يمكن أن يكون هناك خطأ في برنامج شريكك.
+
+ بعض البيانات المشفرة ضمن العنوان {0} قصيرة جداً. يمكن أن يكون هناك خطأ في برنامج شريكك.
-
- بعض البيانات المشفرة ضمن العنوان %1 طويلة جداً. يمكن أن يكون هناك خطأ في برنامج شريكك.
+
+ بعض البيانات المشفرة ضمن العنوان {0} طويلة جداً. يمكن أن يكون هناك خطأ في برنامج شريكك.
-
+
-
- خطأ: هناك خطأ في هذا العنوان %1.
+
+ خطأ: هناك خطأ في هذا العنوان {0}.
@@ -562,8 +562,8 @@ It is important that you back up this file. Would you like to open the file now?
-
- بالنظر إلى العنوان %1, Bitmessage لم يستطع فهم رقم إصدار العنوان %2، ربما يجب عليك تحديث برنامج Bitmessage لإصداره الأخير.
+
+ بالنظر إلى العنوان {0}, Bitmessage لم يستطع فهم رقم إصدار العنوان {1}، ربما يجب عليك تحديث برنامج Bitmessage لإصداره الأخير.
@@ -572,8 +572,8 @@ It is important that you back up this file. Would you like to open the file now?
-
- بالنظر إلى العنوان %1, Bitmessage لم يستطع فهم رقم إصدار العنوان %2، ربما يجب عليك تحديث برنامج Bitmessage لإصداره الأخير.
+
+ بالنظر إلى العنوان {0}, Bitmessage لم يستطع فهم رقم إصدار العنوان {1}، ربما يجب عليك تحديث برنامج Bitmessage لإصداره الأخير.
@@ -707,8 +707,8 @@ It is important that you back up this file. Would you like to open the file now?
-
- لم يستطع Bitmessage العثور على عنوانك %1, ربما قمت بحذف العنوان؟
+
+ لم يستطع Bitmessage العثور على عنوانك {0}, ربما قمت بحذف العنوان؟
@@ -861,8 +861,8 @@ Are you sure you want to delete the channel?
-
- أنت تستخدم نقطة عبور TCP %1 - يمكنك تغييره في قائمة الضبط.
+
+ أنت تستخدم نقطة عبور TCP {0} - يمكنك تغييره في قائمة الضبط.
@@ -1056,7 +1056,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1071,47 +1071,47 @@ Are you sure you want to delete the channel?
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1140,7 +1140,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1160,12 +1160,12 @@ Are you sure you want to delete the channel?
-
+
-
+
@@ -1175,7 +1175,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1200,7 +1200,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1220,7 +1220,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1232,17 +1232,17 @@ There is no required difficulty for version 2 addresses like this.
+Receiver's required difficulty: {0} and {1}
-
+
-
+
@@ -1252,7 +1252,7 @@ Receiver's required difficulty: %1 and %2
-
+
@@ -1267,12 +1267,12 @@ Receiver's required difficulty: %1 and %2
-
+
-
+
@@ -1635,27 +1635,27 @@ The 'Random Number' option is selected by default but deterministic ad
-
+
-
+
-
+
-
+
-
+
diff --git a/src/translations/bitmessage_cs.qm b/src/translations/bitmessage_cs.qm
index c25ccafa..8fde0714 100644
Binary files a/src/translations/bitmessage_cs.qm and b/src/translations/bitmessage_cs.qm differ
diff --git a/src/translations/bitmessage_cs.ts b/src/translations/bitmessage_cs.ts
index 11ab163a..adcfd3d4 100644
--- a/src/translations/bitmessage_cs.ts
+++ b/src/translations/bitmessage_cs.ts
@@ -241,8 +241,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Jedna z Vašich adres, %1, je stará adresa verze 1. Adresy verze 1 již nejsou podporovány. Můžeme ji nyní smazat?
+
+ Jedna z Vašich adres, {0}, je stará adresa verze 1. Adresy verze 1 již nejsou podporovány. Můžeme ji nyní smazat?
@@ -261,13 +261,13 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Zpráva odeslána. Čekám na potvrzení. Odesláno v %1
+
+ Zpráva odeslána. Čekám na potvrzení. Odesláno v {0}
-
- Zpráva odeslána. Odesláno v %1
+
+ Zpráva odeslána. Odesláno v {0}
@@ -276,8 +276,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Potvrzení o přijetí zprávy %1
+
+ Potvrzení o přijetí zprávy {0}
@@ -286,18 +286,18 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Rozesláno v %1
+
+ Rozesláno v {0}
-
- Problém: Obtížnost práce požadovaná adresátem je vyšší než Vámi povolené maximum. %1
+
+ Problém: Obtížnost práce požadovaná adresátem je vyšší než Vámi povolené maximum. {0}
-
- Problém: Šifrovací klíč adresáta je nepoužitelný. Zprávu nelze zašifrovat. %1
+
+ Problém: Šifrovací klíč adresáta je nepoužitelný. Zprávu nelze zašifrovat. {0}
@@ -306,8 +306,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Neznámý stav: %1 %2
+
+ Neznámý stav: {0} {1}
@@ -347,10 +347,10 @@ Please type the desired email address (including @mailchuck.com) below:
Své klíče můžete spravovat editováním souboru keys.dat, který najdete zde:
- %1
+ {0}
Je důležité si tento soubor zazálohovat.
@@ -366,10 +366,10 @@ Je důležité si tento soubor zazálohovat.
Své klíče můžete spravovat editováním souboru keys.dat, který najdete zde:
- %1
+ {0}
Je důležité si tento soubor zazálohovat. Přejete si tento soubor nyní otevřít? (Nezapomeňte zavřít Bitmessage předtím, než provedete jakékoli změny.)
@@ -434,8 +434,8 @@ Je důležité si tento soubor zazálohovat. Přejete si tento soubor nyní otev
-
- Kanál byl úspěšně vytvořen. Když chcete jiným lidem povolit připojit se k Vašemu kanálu, řekněte jim jméno kanálu a tuto adresu Bitmessage: %1. Tuto adresu také najdete v sekci "Vaše identity".
+
+ Kanál byl úspěšně vytvořen. Když chcete jiným lidem povolit připojit se k Vašemu kanálu, řekněte jim jméno kanálu a tuto adresu Bitmessage: {0}. Tuto adresu také najdete v sekci "Vaše identity".
@@ -502,53 +502,53 @@ Je důležité si tento soubor zazálohovat. Přejete si tento soubor nyní otev
-
- Zpráva, kterou se snažíte poslat, je o %1 bajtů delší, než je dovoleno. (Maximum je 261644 bajtů). Zkuste ji prosím před odesláním zkrátit.
+
+ Zpráva, kterou se snažíte poslat, je o {0} bajtů delší, než je dovoleno. (Maximum je 261644 bajtů). Zkuste ji prosím před odesláním zkrátit.
-
+
-
- Chyba: Adresy Bitmessage začínají na BM- Zkontroluje prosím %1
+
+ Chyba: Adresy Bitmessage začínají na BM- Zkontroluje prosím {0}
-
- Chyba: Adresa %1 nebyla správně opsána nebo zkopírována. Zkontrolujte ji prosím.
+
+ Chyba: Adresa {0} nebyla správně opsána nebo zkopírována. Zkontrolujte ji prosím.
-
- Chyba: Adresa %1 obsahuje neplatné znaky. Zkontrolujte ji prosím.
+
+ Chyba: Adresa {0} obsahuje neplatné znaky. Zkontrolujte ji prosím.
-
- Chyba: Verze adresy %1 je příliš vysoká. Buď používáte starou verzi Bitmessage a je čas na aktualizaci, nebo si Váš známý dělá legraci.
+
+ Chyba: Verze adresy {0} je příliš vysoká. Buď používáte starou verzi Bitmessage a je čas na aktualizaci, nebo si Váš známý dělá legraci.
-
- Chyba: Některá data zakódovaná v adrese %1 jsou příliš krátká. Možná je to chyba softwaru, který Váš známý používá.
+
+ Chyba: Některá data zakódovaná v adrese {0} jsou příliš krátká. Možná je to chyba softwaru, který Váš známý používá.
-
- Chyba: Některá data zakódovaná v adrese %1 jsou příliš dlouhá. Možná je to chyba softwaru, který Váš známý používá.
+
+ Chyba: Některá data zakódovaná v adrese {0} jsou příliš dlouhá. Možná je to chyba softwaru, který Váš známý používá.
-
- Chyba: Některá data zakódovaná v adrese %1 mají neplatný formát. Možná je to chyba softwaru, který Váš známý používá.
+
+ Chyba: Některá data zakódovaná v adrese {0} mají neplatný formát. Možná je to chyba softwaru, který Váš známý používá.
-
- Chyba: Nastal problém s adresou %1.
+
+ Chyba: Nastal problém s adresou {0}.
@@ -562,8 +562,8 @@ Je důležité si tento soubor zazálohovat. Přejete si tento soubor nyní otev
-
- Co se týče adresy %1, Bitmessage nerozumí jejímu číslu verze "%2". Možná byste měl(a) aktualizovat Bitmessage na nejnovější verzi.
+
+ Co se týče adresy {0}, Bitmessage nerozumí jejímu číslu verze "{1}". Možná byste měl(a) aktualizovat Bitmessage na nejnovější verzi.
@@ -572,8 +572,8 @@ Je důležité si tento soubor zazálohovat. Přejete si tento soubor nyní otev
-
- Co se týče adresy %1, Bitmessage neumí zpracovat její číslo proudu "%2". Možná byste měl(a) aktualizovat Bitmessage na nejnovější verzi.
+
+ Co se týče adresy {0}, Bitmessage neumí zpracovat její číslo proudu "{1}". Možná byste měl(a) aktualizovat Bitmessage na nejnovější verzi.
@@ -707,8 +707,8 @@ Je důležité si tento soubor zazálohovat. Přejete si tento soubor nyní otev
-
- Bitmessage nemůže najít Vaši adresu %1. Možná jste ji odstranil(a)?
+
+ Bitmessage nemůže najít Vaši adresu {0}. Možná jste ji odstranil(a)?
@@ -861,8 +861,8 @@ Are you sure you want to delete the channel?
-
- Používáte TCP port %1. (To lze změnit v nastavení).
+
+ Používáte TCP port {0}. (To lze změnit v nastavení).
@@ -1056,7 +1056,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1071,47 +1071,47 @@ Are you sure you want to delete the channel?
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1134,7 +1134,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1154,12 +1154,12 @@ Are you sure you want to delete the channel?
-
+
-
+
@@ -1169,7 +1169,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1194,7 +1194,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1214,7 +1214,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1226,17 +1226,17 @@ There is no required difficulty for version 2 addresses like this.
+Receiver's required difficulty: {0} and {1}
-
+
-
+
@@ -1246,7 +1246,7 @@ Receiver's required difficulty: %1 and %2
-
+
@@ -1261,12 +1261,12 @@ Receiver's required difficulty: %1 and %2
-
+
-
+
@@ -1629,27 +1629,27 @@ Možnost "Náhodné číslo" je nastavena jako výchozí, deterministi
-
+
-
+
-
+
-
+
-
+
diff --git a/src/translations/bitmessage_da.qm b/src/translations/bitmessage_da.qm
index e5588987..1b436601 100644
Binary files a/src/translations/bitmessage_da.qm and b/src/translations/bitmessage_da.qm differ
diff --git a/src/translations/bitmessage_da.ts b/src/translations/bitmessage_da.ts
index fcf80470..707967e7 100644
--- a/src/translations/bitmessage_da.ts
+++ b/src/translations/bitmessage_da.ts
@@ -241,8 +241,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- En af dine adresser, %1 er en gammel version 1-addresse. Version 1-addresser understøttes ikke længere. Må vi slette den?
+
+ En af dine adresser, {0} er en gammel version 1-addresse. Version 1-addresser understøttes ikke længere. Må vi slette den?
@@ -261,13 +261,13 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Besked afsendt. Afventer bekræftelse på modtagelse. Sendt %1
+
+ Besked afsendt. Afventer bekræftelse på modtagelse. Sendt {0}
-
- Besked sendt. Sendt %1
+
+ Besked sendt. Sendt {0}
@@ -276,8 +276,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Bekræftelse på modtagelse er modtaget %1
+
+ Bekræftelse på modtagelse er modtaget {0}
@@ -286,18 +286,18 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Afsendt %1
+
+ Afsendt {0}
-
- Problem: Beregningen som kræves af modtageren er mere besværlig end du accepterer. %1
+
+ Problem: Beregningen som kræves af modtageren er mere besværlig end du accepterer. {0}
-
- Problem: Modtagerens krypteringsnøgle virker ikke. Beskeden kunne ikke krypteres. %1
+
+ Problem: Modtagerens krypteringsnøgle virker ikke. Beskeden kunne ikke krypteres. {0}
@@ -306,8 +306,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Ukendt status: %1 %2
+
+ Ukendt status: {0} {1}
@@ -347,10 +347,10 @@ Please type the desired email address (including @mailchuck.com) below:
Du kan administrere dine nøgler ved at redigere keys.dat-filen i
-%1
+{0}
Det er vigtigt at tage backup af denne fil.
@@ -366,10 +366,10 @@ Det er vigtigt at tage backup af denne fil.
Du kan administrere dine nøgler ved at redigere keys.dat-filen i
-%1
+{0}
Det er vigtigt at tage backup af denne fil. (Sørg for at lukke Bitmessage før du foretager ændringer.)
@@ -434,8 +434,8 @@ Det er vigtigt at tage backup af denne fil. (Sørg for at lukke Bitmessage før
-
- Ny kanal oprettet. For at andre kan blive medlem skal du oplyse dem kanalnavnet og denne Bitmessage-adresse: %1. Denne adresse vises også i 'Dine identiteter'.
+
+ Ny kanal oprettet. For at andre kan blive medlem skal du oplyse dem kanalnavnet og denne Bitmessage-adresse: {0}. Denne adresse vises også i 'Dine identiteter'.
@@ -502,53 +502,53 @@ Det er vigtigt at tage backup af denne fil. (Sørg for at lukke Bitmessage før
-
- Beskeden som du prøver at sende er %1 byte for lang. (Den maksimale størrelse er 261644 byte). Prøv at gøre den kortere før afsendelsen.
+
+ Beskeden som du prøver at sende er {0} byte for lang. (Den maksimale størrelse er 261644 byte). Prøv at gøre den kortere før afsendelsen.
-
+
-
- Fejl: Bitmessage-adresser starter med BM- Check %1
+
+ Fejl: Bitmessage-adresser starter med BM- Check {0}
-
- Fejl: Adressen %1 er skrever eller kopieret forkert. Tjek den venligst.
+
+ Fejl: Adressen {0} er skrever eller kopieret forkert. Tjek den venligst.
-
- Fejl: Adressen %1 indeholder ugyldige tegn. Tjek den venligst.
+
+ Fejl: Adressen {0} indeholder ugyldige tegn. Tjek den venligst.
-
+
-
+
-
+
-
+
-
- Fejl: Der er noget galt med adressen %1.
+
+ Fejl: Der er noget galt med adressen {0}.
@@ -562,8 +562,8 @@ Det er vigtigt at tage backup af denne fil. (Sørg for at lukke Bitmessage før
-
- Vedrørende adressen %1, Bitmessage forstår ikke addreseversion %2. Måske bør du opgradere Bitmessage til den nyeste version.
+
+ Vedrørende adressen {0}, Bitmessage forstår ikke addreseversion {1}. Måske bør du opgradere Bitmessage til den nyeste version.
@@ -572,8 +572,8 @@ Det er vigtigt at tage backup af denne fil. (Sørg for at lukke Bitmessage før
-
- Vedrørende adressen %1, Bitmessage kan ikke håndtere flod nummer %2. Måske bør du opgradere Bitmessage til den nyeste version.
+
+ Vedrørende adressen {0}, Bitmessage kan ikke håndtere flod nummer {1}. Måske bør du opgradere Bitmessage til den nyeste version.
@@ -707,8 +707,8 @@ Det er vigtigt at tage backup af denne fil. (Sørg for at lukke Bitmessage før
-
- Bitmessage kan ikke finde din adresse %1. Måske har du fjernet den?
+
+ Bitmessage kan ikke finde din adresse {0}. Måske har du fjernet den?
@@ -865,8 +865,8 @@ Er du sikker på at du vil slette denne kanal?
-
- Du bruger TCP-port %1. (Dette kan ændres i indstillingerne).
+
+ Du bruger TCP-port {0}. (Dette kan ændres i indstillingerne).
@@ -1060,8 +1060,8 @@ Er du sikker på at du vil slette denne kanal?
-
- Zoom %1%
+
+ Zoom {0}%
@@ -1075,47 +1075,47 @@ Er du sikker på at du vil slette denne kanal?
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1136,7 +1136,7 @@ Er du sikker på at du vil slette denne kanal?
-
+
@@ -1156,12 +1156,12 @@ Er du sikker på at du vil slette denne kanal?
-
+
-
+
@@ -1171,7 +1171,7 @@ Er du sikker på at du vil slette denne kanal?
-
+
@@ -1196,7 +1196,7 @@ Er du sikker på at du vil slette denne kanal?
-
+
@@ -1216,7 +1216,7 @@ Er du sikker på at du vil slette denne kanal?
-
+
@@ -1228,17 +1228,17 @@ There is no required difficulty for version 2 addresses like this.
+Receiver's required difficulty: {0} and {1}
-
+
-
+
@@ -1248,7 +1248,7 @@ Receiver's required difficulty: %1 and %2
-
+
@@ -1263,12 +1263,12 @@ Receiver's required difficulty: %1 and %2
-
+
-
+
@@ -1631,27 +1631,27 @@ Som standard er tilfældige tal valgt, men der er både fordele og ulemper ved a
-
+
-
+
-
+
-
+
-
+
diff --git a/src/translations/bitmessage_de.qm b/src/translations/bitmessage_de.qm
index ef443a61..e42c1760 100644
Binary files a/src/translations/bitmessage_de.qm and b/src/translations/bitmessage_de.qm differ
diff --git a/src/translations/bitmessage_de.ts b/src/translations/bitmessage_de.ts
index 69cdd2a8..ff23a30c 100644
--- a/src/translations/bitmessage_de.ts
+++ b/src/translations/bitmessage_de.ts
@@ -314,8 +314,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Eine Ihrer Adressen, %1, ist eine alte Adresse der Version 1 und wird nicht mehr unterstützt. Soll sie jetzt gelöscht werden?
+
+ Eine Ihrer Adressen, {0}, ist eine alte Adresse der Version 1 und wird nicht mehr unterstützt. Soll sie jetzt gelöscht werden?
@@ -334,13 +334,13 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Nachricht gesendet. Warte auf Bestätigung. Zeitpunkt der Sendung: %1
+
+ Nachricht gesendet. Warte auf Bestätigung. Zeitpunkt der Sendung: {0}
-
- Nachricht gesendet. Zeitpunkt der Sendung: %1
+
+ Nachricht gesendet. Zeitpunkt der Sendung: {0}
@@ -349,8 +349,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Bestätigung der Nachricht erhalten %1
+
+ Bestätigung der Nachricht erhalten {0}
@@ -359,18 +359,18 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Rundruf um %1
+
+ Rundruf um {0}
-
- Problem: Die vom Empfänger geforderte Arbeit ist schwerer als Sie bereit sind, zu berechnen. %1
+
+ Problem: Die vom Empfänger geforderte Arbeit ist schwerer als Sie bereit sind, zu berechnen. {0}
-
- Problem: Der Verschlüsselungscode des Empfängers ist nicht in Ordnung. Nachricht konnte nicht verschlüsselt werden. %1
+
+ Problem: Der Verschlüsselungscode des Empfängers ist nicht in Ordnung. Nachricht konnte nicht verschlüsselt werden. {0}
@@ -379,8 +379,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Unbekannter Status: %1 %2
+
+ Unbekannter Status: {0} {1}
@@ -420,10 +420,10 @@ Please type the desired email address (including @mailchuck.com) below:
Sie können Ihre Schlüssel verwalten, indem Sie die keys.dat bearbeiten, die im Ordner
-%1 liegt.
+{0} liegt.
Es ist empfehlenswert, vorher ein Backup dieser Datei anzulegen.
@@ -439,10 +439,10 @@ Es ist empfehlenswert, vorher ein Backup dieser Datei anzulegen.
Sie können Ihre Schlüssel verwalten, indem Sie die keys.dat bearbeiten,
-die im Ordner %1 liegt.
+die im Ordner {0} liegt.
Es ist empfehlenswert, vorher ein Backup dieser Datei anzulegen. Möchten Sie die Datei jetzt öffnen?
(Stellen Sie sicher, dass Sie Bitmessage beendet haben, bevor Sie etwas ändern.)
@@ -508,7 +508,7 @@ Es ist empfehlenswert, vorher ein Backup dieser Datei anzulegen. Möchten Sie di
-
+
@@ -576,52 +576,52 @@ Es ist empfehlenswert, vorher ein Backup dieser Datei anzulegen. Möchten Sie di
-
- Die Nachricht, die Sie zu senden versuchen, ist %1 Byte zu lang. (Maximum 261.644 Bytes). Bitte verringern Sie ihre Größe vor dem Senden.
+
+ Die Nachricht, die Sie zu senden versuchen, ist {0} Byte zu lang. (Maximum 261.644 Bytes). Bitte verringern Sie ihre Größe vor dem Senden.
-
- Fehler: Ihr Konto war an keiner E-Mail Schnittstelle registriert. Registrierung als %1 wird versandt, bitte vor einem erneutem Sendeversuch auf die Registrierungsverarbeitung warten.
+
+ Fehler: Ihr Konto war an keiner E-Mail Schnittstelle registriert. Registrierung als {0} wird versandt, bitte vor einem erneutem Sendeversuch auf die Registrierungsverarbeitung warten.
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -636,8 +636,8 @@ Es ist empfehlenswert, vorher ein Backup dieser Datei anzulegen. Möchten Sie di
-
- Aufgrund der Adresse %1 kann Bitmessage Adressen mit der Version %2 nicht verarbeiten. Möglicherweise müssen Sie Bitmessage auf die aktuelle Version aktualisieren.
+
+ Aufgrund der Adresse {0} kann Bitmessage Adressen mit der Version {1} nicht verarbeiten. Möglicherweise müssen Sie Bitmessage auf die aktuelle Version aktualisieren.
@@ -646,8 +646,8 @@ Es ist empfehlenswert, vorher ein Backup dieser Datei anzulegen. Möchten Sie di
-
- Aufgrund der Adresse %1 kann Bitmessage den Datenstrom mit der Version %2 nicht verarbeiten. Möglicherweise müssen Sie Bitmessage auf die aktuelle Version aktualisieren.
+
+ Aufgrund der Adresse {0} kann Bitmessage den Datenstrom mit der Version {1} nicht verarbeiten. Möglicherweise müssen Sie Bitmessage auf die aktuelle Version aktualisieren.
@@ -781,8 +781,8 @@ Es ist empfehlenswert, vorher ein Backup dieser Datei anzulegen. Möchten Sie di
-
- Bitmessage kann Ihre Adresse %1 nicht finden. Haben Sie sie gelöscht?
+
+ Bitmessage kann Ihre Adresse {0} nicht finden. Haben Sie sie gelöscht?
@@ -939,7 +939,7 @@ Sind Sie sicher, dass Sie das Chan löschen möchten?
-
+
@@ -1134,8 +1134,8 @@ Sind Sie sicher, dass Sie das Chan löschen möchten?
-
- Zoom-Stufe %1%
+
+ Zoom-Stufe {0}%
@@ -1149,48 +1149,48 @@ Sind Sie sicher, dass Sie das Chan löschen möchten?
-
+
-
- Neue Version von PyBitmessage steht zur Verfügung: %1. Sie können sie von https://github.com/Bitmessage/PyBitmessage/releases/latest herunterladen.
+
+ Neue Version von PyBitmessage steht zur Verfügung: {0}. Sie können sie von https://github.com/Bitmessage/PyBitmessage/releases/latest herunterladen.
-
- Warte auf Abschluss von Berechnungen (PoW)... %1%
+
+ Warte auf Abschluss von Berechnungen (PoW)... {0}%
-
- PyBitmessage wird beendet... %1%
+
+ PyBitmessage wird beendet... {0}%
-
- Warte auf Versand von Objekten... %1%
+
+ Warte auf Versand von Objekten... {0}%
-
- Einstellungen werden gespeichert... %1%
+
+ Einstellungen werden gespeichert... {0}%
-
- Kern wird beendet... %1%
+
+ Kern wird beendet... {0}%
-
- Beende Benachrichtigungen... %1%
+
+ Beende Benachrichtigungen... {0}%
-
- Unmittelbar vor Beendung... %1%
+
+ Unmittelbar vor Beendung... {0}%
@@ -1204,8 +1204,8 @@ Sind Sie sicher, dass Sie das Chan löschen möchten?
-
- PyBitmessage wird beendet... %1%
+
+ PyBitmessage wird beendet... {0}%
@@ -1224,13 +1224,13 @@ Sind Sie sicher, dass Sie das Chan löschen möchten?
-
- Erzeuge %1 neue Addressen.
+
+ Erzeuge {0} neue Addressen.
-
- %1 befindet sich bereits unter Ihren Identitäten, wird nicht doppelt hinzugefügt.
+
+ {0} befindet sich bereits unter Ihren Identitäten, wird nicht doppelt hinzugefügt.
@@ -1239,7 +1239,7 @@ Sind Sie sicher, dass Sie das Chan löschen möchten?
-
+
@@ -1264,8 +1264,8 @@ Sind Sie sicher, dass Sie das Chan löschen möchten?
-
- Rundruf verschickt um %1
+
+ Rundruf verschickt um {0}
@@ -1284,7 +1284,7 @@ Sind Sie sicher, dass Sie das Chan löschen möchten?
-
+
Problem: Der Empfänger benutzt ein mobiles Gerät und erfordert eine unverschlüsselte Empfängeraddresse. Dies ist in Ihren Einstellungen jedoch nicht zulässig. 1%
@@ -1297,17 +1297,17 @@ Version-2-Addressen wie die des Empfängers haben keine Schweirigkeitserforderun
- Arbeit für Nachrichtenversand wird errichtet. Vom Empfänger geforderte Schwierigkeit: %1 und %2
+Receiver's required difficulty: {0} and {1}
+ Arbeit für Nachrichtenversand wird errichtet. Vom Empfänger geforderte Schwierigkeit: {0} und {1}
-
- Problem: Die vom Empfänger verlangte Arbeit (%1 und %2) ist schwieriger, als Sie in den Einstellungen erlaubt haben. %3
+
+ Problem: Die vom Empfänger verlangte Arbeit ({0} und {1}) ist schwieriger, als Sie in den Einstellungen erlaubt haben. {2}
-
+
Problem: Sie versuchen, eine Nachricht an sich zu versenden, aber Ihr Schlüssel befindet sich nicht in der keys.dat-Datei. Die Nachricht kann nicht verschlüsselt werden. 1%
@@ -1317,8 +1317,8 @@ Receiver's required difficulty: %1 and %2
-
- Nachricht gesendet. Auf Bestätigung wird gewartet. Zeitpunkt der Sendung: %1
+
+ Nachricht gesendet. Auf Bestätigung wird gewartet. Zeitpunkt der Sendung: {0}
@@ -1332,13 +1332,13 @@ Receiver's required difficulty: %1 and %2
-
- Nachfrage nach dem öffentlichen Schlüssel läuft, auf Antwort wird gewartet. Nachgefragt am %1
+
+ Nachfrage nach dem öffentlichen Schlüssel läuft, auf Antwort wird gewartet. Nachgefragt am {0}
-
- UPnP Port-Mapping eingerichtet auf Port %1
+
+ UPnP Port-Mapping eingerichtet auf Port {0}
@@ -1382,28 +1382,28 @@ Receiver's required difficulty: %1 and %2
-
- Kommunikationsfehler mit dem Proxy: %1. Bitte überprüfen Sie Ihre Netzwerkeinstellungen.
+
+ Kommunikationsfehler mit dem Proxy: {0}. Bitte überprüfen Sie Ihre Netzwerkeinstellungen.
-
- SOCKS5-Authentizierung fehlgeschlagen: %1. Bitte überprüfen Sie Ihre SOCKS5-Einstellungen.
+
+ SOCKS5-Authentizierung fehlgeschlagen: {0}. Bitte überprüfen Sie Ihre SOCKS5-Einstellungen.
-
- Die Uhrzeit ihres Computers, %1, ist möglicherweise falsch. Bitte überprüfen Sie Ihre einstellungen.
+
+ Die Uhrzeit ihres Computers, {0}, ist möglicherweise falsch. Bitte überprüfen Sie Ihre einstellungen.
-
- Der Name %1 wurde nicht gefunden.
+
+ Der Name {0} wurde nicht gefunden.
-
- Namecoin-abfrage fehlgeschlagen (%1)
+
+ Namecoin-abfrage fehlgeschlagen ({0})
@@ -1412,18 +1412,18 @@ Receiver's required difficulty: %1 and %2
-
- Der Name %1 beinhaltet keine gültige JSON-Daten.
+
+ Der Name {0} beinhaltet keine gültige JSON-Daten.
-
- Der Name %1 hat keine zugewiesene Bitmessageaddresse.
+
+ Der Name {0} hat keine zugewiesene Bitmessageaddresse.
-
- Erfolg! Namecoind Version %1 läuft.
+
+ Erfolg! Namecoind Version {0} läuft.
@@ -1481,53 +1481,53 @@ Willkommen zu einfachem und sicherem Bitmessage
-
- Fehler: Bitmessage Adressen starten mit BM- Bitte überprüfen Sie die Empfängeradresse %1
+
+ Fehler: Bitmessage Adressen starten mit BM- Bitte überprüfen Sie die Empfängeradresse {0}
-
- Fehler: Die Empfängeradresse %1 wurde nicht korrekt getippt oder kopiert. Bitte überprüfen.
+
+ Fehler: Die Empfängeradresse {0} wurde nicht korrekt getippt oder kopiert. Bitte überprüfen.
-
- Fehler: Die Empfängeradresse %1 beinhaltet ungültig Zeichen. Bitte überprüfen.
+
+ Fehler: Die Empfängeradresse {0} beinhaltet ungültig Zeichen. Bitte überprüfen.
-
- Fehler: Die Empfängerdresseversion von %1 ist zu hoch. Entweder Sie müssen Ihre Bitmessage Software aktualisieren oder Ihr Bekannter ist sehr clever.
+
+ Fehler: Die Empfängerdresseversion von {0} ist zu hoch. Entweder Sie müssen Ihre Bitmessage Software aktualisieren oder Ihr Bekannter ist sehr clever.
-
- Fehler: Einige Daten die in der Empfängerdresse %1 codiert sind, sind zu kurz. Es könnte sein, dass etwas mit der Software Ihres Bekannten nicht stimmt.
+
+ Fehler: Einige Daten die in der Empfängerdresse {0} codiert sind, sind zu kurz. Es könnte sein, dass etwas mit der Software Ihres Bekannten nicht stimmt.
-
- Fehler: Einige Daten die in der Empfängeradresse %1 codiert sind, sind zu lang. Es könnte sein, dass etwas mit der Software Ihres Bekannten nicht stimmt.
+
+ Fehler: Einige Daten die in der Empfängeradresse {0} codiert sind, sind zu lang. Es könnte sein, dass etwas mit der Software Ihres Bekannten nicht stimmt.
-
- Fehler: Einige codierte Daten in der Empfängeradresse %1 sind ungültig. Es könnte etwas mit der Software Ihres Bekannten sein.
+
+ Fehler: Einige codierte Daten in der Empfängeradresse {0} sind ungültig. Es könnte etwas mit der Software Ihres Bekannten sein.
-
- Fehler: Mit der Empfängeradresse %1 stimmt etwas nicht.
+
+ Fehler: Mit der Empfängeradresse {0} stimmt etwas nicht.
-
- Fehler: %1
+
+ Fehler: {0}
-
- Von %1
+
+ Von {0}
@@ -1572,7 +1572,7 @@ Willkommen zu einfachem und sicherem Bitmessage
- Den letzten %1 Rundruf von dieser Addresse anzeigen.Die letzten %1 Rundrufe von dieser Addresse anzeigen.
+ Den letzten {0} Rundruf von dieser Addresse anzeigen.Die letzten {0} Rundrufe von dieser Addresse anzeigen.
@@ -1619,8 +1619,8 @@ Willkommen zu einfachem und sicherem Bitmessage
-
- Der Link "%1" wird in Browser geöffnet. Es kann ein Sicherheitsrisiko darstellen, es könnte Sie de-anonymisieren oder schädliche Aktivitäten durchführen. Sind Sie sicher?
+
+ Der Link "{0}" wird in Browser geöffnet. Es kann ein Sicherheitsrisiko darstellen, es könnte Sie de-anonymisieren oder schädliche Aktivitäten durchführen. Sind Sie sicher?
@@ -1955,8 +1955,8 @@ Die Zufallszahlen-Option ist standardmässig gewählt, jedoch haben deterministi
-
- Sie benutzen TCP-Port %1 (Dieser kann in den Einstellungen verändert werden).
+
+ Sie benutzen TCP-Port {0} (Dieser kann in den Einstellungen verändert werden).
@@ -2008,28 +2008,28 @@ Die Zufallszahlen-Option ist standardmässig gewählt, jedoch haben deterministi
-
- Seit Start der Anwendung am %1
+
+ Seit Start der Anwendung am {0}
-
- Herunter: %1/s Insg.: %2
+
+ Herunter: {0}/s Insg.: {1}
-
- Hoch: %1/s Insg.: %2
+
+ Hoch: {0}/s Insg.: {1}
-
- Verbindungen insgesamt: %1
+
+ Verbindungen insgesamt: {0}
-
- Inventory lookups pro Sekunde: %1
+
+ Inventory lookups pro Sekunde: {0}
@@ -2194,8 +2194,8 @@ Die Zufallszahlen-Option ist standardmässig gewählt, jedoch haben deterministi
newchandialog
-
- Chan %1 erfolgreich erstellt/beigetreten
+
+ Chan {0} erfolgreich erstellt/beigetreten
diff --git a/src/translations/bitmessage_en.qm b/src/translations/bitmessage_en.qm
index 4751f4ca..71a25005 100644
Binary files a/src/translations/bitmessage_en.qm and b/src/translations/bitmessage_en.qm differ
diff --git a/src/translations/bitmessage_en.ts b/src/translations/bitmessage_en.ts
index 05e9cc4b..8525b52c 100644
--- a/src/translations/bitmessage_en.ts
+++ b/src/translations/bitmessage_en.ts
@@ -281,8 +281,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- One of your addresses, %1, is an old version 1 address. Version 1 addresses are no longer supported. May we delete it now?
+
+ One of your addresses, {0}, is an old version 1 address. Version 1 addresses are no longer supported. May we delete it now?
@@ -301,13 +301,13 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Message sent. Waiting for acknowledgement. Sent at %1
+
+ Message sent. Waiting for acknowledgement. Sent at {0}
-
- Message sent. Sent at %1
+
+ Message sent. Sent at {0}
@@ -316,8 +316,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Acknowledgement of the message received %1
+
+ Acknowledgement of the message received {0}
@@ -326,18 +326,18 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Broadcast on %1
+
+ Broadcast on {0}
-
- Problem: The work demanded by the recipient is more difficult than you are willing to do. %1
+
+ Problem: The work demanded by the recipient is more difficult than you are willing to do. {0}
-
- Problem: The recipient's encryption key is no good. Could not encrypt message. %1
+
+ Problem: The recipient's encryption key is no good. Could not encrypt message. {0}
@@ -346,8 +346,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Unknown status: %1 %2
+
+ Unknown status: {0} {1}
@@ -387,10 +387,10 @@ Please type the desired email address (including @mailchuck.com) below:
You may manage your keys by editing the keys.dat file stored in
- %1
+ {0}
It is important that you back up this file.
@@ -406,10 +406,10 @@ It is important that you back up this file.
You may manage your keys by editing the keys.dat file stored in
- %1
+ {0}
It is important that you back up this file. Would you like to open the file now? (Be sure to close Bitmessage before making any changes.)
@@ -474,8 +474,8 @@ It is important that you back up this file. Would you like to open the file now?
-
- Successfully created chan. To let others join your chan, give them the chan name and this Bitmessage address: %1. This address also appears in 'Your Identities'.
+
+ Successfully created chan. To let others join your chan, give them the chan name and this Bitmessage address: {0}. This address also appears in 'Your Identities'.
@@ -545,53 +545,53 @@ It is important that you back up this file. Would you like to open the file now?
-
- The message that you are trying to send is too long by %1 bytes. (The maximum is 261644 bytes). Please cut it down before sending.
+
+ The message that you are trying to send is too long by {0} bytes. (The maximum is 261644 bytes). Please cut it down before sending.
-
- Error: Your account wasn't registered at an email gateway. Sending registration now as %1, please wait for the registration to be processed before retrying sending.
+
+ Error: Your account wasn't registered at an email gateway. Sending registration now as {0}, please wait for the registration to be processed before retrying sending.
-
- Error: Bitmessage addresses start with BM- Please check %1
+
+ Error: Bitmessage addresses start with BM- Please check {0}
-
- Error: The address %1 is not typed or copied correctly. Please check it.
+
+ Error: The address {0} is not typed or copied correctly. Please check it.
-
- Error: The address %1 contains invalid characters. Please check it.
+
+ Error: The address {0} contains invalid characters. Please check it.
-
- Error: The address version in %1 is too high. Either you need to upgrade your Bitmessage software or your acquaintance is being clever.
+
+ Error: The address version in {0} is too high. Either you need to upgrade your Bitmessage software or your acquaintance is being clever.
-
- Error: Some data encoded in the address %1 is too short. There might be something wrong with the software of your acquaintance.
+
+ Error: Some data encoded in the address {0} is too short. There might be something wrong with the software of your acquaintance.
-
- Error: Some data encoded in the address %1 is too long. There might be something wrong with the software of your acquaintance.
+
+ Error: Some data encoded in the address {0} is too long. There might be something wrong with the software of your acquaintance.
-
- Error: Some data encoded in the address %1 is malformed. There might be something wrong with the software of your acquaintance.
+
+ Error: Some data encoded in the address {0} is malformed. There might be something wrong with the software of your acquaintance.
-
- Error: Something is wrong with the address %1.
+
+ Error: Something is wrong with the address {0}.
@@ -605,8 +605,8 @@ It is important that you back up this file. Would you like to open the file now?
-
- Concerning the address %1, Bitmessage cannot understand address version numbers of %2. Perhaps upgrade Bitmessage to the latest version.
+
+ Concerning the address {0}, Bitmessage cannot understand address version numbers of {1}. Perhaps upgrade Bitmessage to the latest version.
@@ -615,8 +615,8 @@ It is important that you back up this file. Would you like to open the file now?
-
- Concerning the address %1, Bitmessage cannot handle stream numbers of %2. Perhaps upgrade Bitmessage to the latest version.
+
+ Concerning the address {0}, Bitmessage cannot handle stream numbers of {1}. Perhaps upgrade Bitmessage to the latest version.
@@ -750,8 +750,8 @@ It is important that you back up this file. Would you like to open the file now?
-
- Bitmessage cannot find your address %1. Perhaps you removed it?
+
+ Bitmessage cannot find your address {0}. Perhaps you removed it?
@@ -908,8 +908,8 @@ Are you sure you want to delete the channel?
-
- You are using TCP port %1. (This can be changed in the settings).
+
+ You are using TCP port {0}. (This can be changed in the settings).
@@ -1103,8 +1103,8 @@ Are you sure you want to delete the channel?
-
- Zoom level %1%
+
+ Zoom level {0}%
@@ -1118,48 +1118,48 @@ Are you sure you want to delete the channel?
-
- Display the %1 recent broadcast(s) from this address.
+
+ Display the {0} recent broadcast(s) from this address.
-
- New version of PyBitmessage is available: %1. Download it from https://github.com/Bitmessage/PyBitmessage/releases/latest
+
+ New version of PyBitmessage is available: {0}. Download it from https://github.com/Bitmessage/PyBitmessage/releases/latest
-
- Waiting for PoW to finish... %1%
+
+ Waiting for PoW to finish... {0}%
-
- Shutting down Pybitmessage... %1%
+
+ Shutting down Pybitmessage... {0}%
-
- Waiting for objects to be sent... %1%
+
+ Waiting for objects to be sent... {0}%
-
- Saving settings... %1%
+
+ Saving settings... {0}%
-
- Shutting down core... %1%
+
+ Shutting down core... {0}%
-
- Stopping notifications... %1%
+
+ Stopping notifications... {0}%
-
- Shutdown imminent... %1%
+
+ Shutdown imminent... {0}%
@@ -1179,8 +1179,8 @@ Are you sure you want to delete the channel?
-
- Shutting down PyBitmessage... %1%
+
+ Shutting down PyBitmessage... {0}%
@@ -1199,13 +1199,13 @@ Are you sure you want to delete the channel?
-
- Generating %1 new addresses.
+
+ Generating {0} new addresses.
-
- %1 is already in 'Your Identities'. Not adding it again.
+
+ {0} is already in 'Your Identities'. Not adding it again.
@@ -1214,8 +1214,8 @@ Are you sure you want to delete the channel?
-
- SOCKS5 Authentication problem: %1
+
+ SOCKS5 Authentication problem: {0}
@@ -1239,8 +1239,8 @@ Are you sure you want to delete the channel?
-
- Broadcast sent on %1
+
+ Broadcast sent on {0}
@@ -1259,8 +1259,8 @@ Are you sure you want to delete the channel?
-
- Problem: Destination is a mobile device who requests that the destination be included in the message but this is disallowed in your settings. %1
+
+ Problem: Destination is a mobile device who requests that the destination be included in the message but this is disallowed in your settings. {0}
@@ -1272,19 +1272,19 @@ There is no required difficulty for version 2 addresses like this.
+Receiver's required difficulty: {0} and {1}
Doing work necessary to send message.
-Receiver's required difficulty: %1 and %2
+Receiver's required difficulty: {0} and {1}
-
- Problem: The work demanded by the recipient (%1 and %2) is more difficult than you are willing to do. %3
+
+ Problem: The work demanded by the recipient ({0} and {1}) is more difficult than you are willing to do. {2}
-
- Problem: You are trying to send a message to yourself or a chan but your encryption key could not be found in the keys.dat file. Could not encrypt message. %1
+
+ Problem: You are trying to send a message to yourself or a chan but your encryption key could not be found in the keys.dat file. Could not encrypt message. {0}
@@ -1293,8 +1293,8 @@ Receiver's required difficulty: %1 and %2
-
- Message sent. Waiting for acknowledgement. Sent on %1
+
+ Message sent. Waiting for acknowledgement. Sent on {0}
@@ -1308,13 +1308,13 @@ Receiver's required difficulty: %1 and %2
-
- Sending public key request. Waiting for reply. Requested at %1
+
+ Sending public key request. Waiting for reply. Requested at {0}
-
- UPnP port mapping established on port %1
+
+ UPnP port mapping established on port {0}
@@ -1703,28 +1703,28 @@ The 'Random Number' option is selected by default but deterministic ad
-
- Since startup on %1
+
+ Since startup on {0}
-
- Down: %1/s Total: %2
+
+ Down: {0}/s Total: {1}
-
- Up: %1/s Total: %2
+
+ Up: {0}/s Total: {1}
-
- Total Connections: %1
+
+ Total Connections: {0}
-
- Inventory lookups per second: %1
+
+ Inventory lookups per second: {0}
diff --git a/src/translations/bitmessage_en_pirate.qm b/src/translations/bitmessage_en_pirate.qm
index 69e6bde8..753e7e1a 100644
Binary files a/src/translations/bitmessage_en_pirate.qm and b/src/translations/bitmessage_en_pirate.qm differ
diff --git a/src/translations/bitmessage_en_pirate.ts b/src/translations/bitmessage_en_pirate.ts
index 69642a96..48f60e6c 100644
--- a/src/translations/bitmessage_en_pirate.ts
+++ b/src/translations/bitmessage_en_pirate.ts
@@ -241,7 +241,7 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
@@ -261,12 +261,12 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
-
+
@@ -276,7 +276,7 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
@@ -286,17 +286,17 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
-
+
-
+
@@ -306,7 +306,7 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
@@ -347,7 +347,7 @@ Please type the desired email address (including @mailchuck.com) below:
@@ -364,7 +364,7 @@ It is important that you back up this file.
@@ -430,7 +430,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -498,52 +498,52 @@ It is important that you back up this file. Would you like to open the file now?
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -558,7 +558,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -568,7 +568,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -703,7 +703,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -857,7 +857,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1052,7 +1052,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1067,47 +1067,47 @@ Are you sure you want to delete the channel?
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1128,7 +1128,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1148,12 +1148,12 @@ Are you sure you want to delete the channel?
-
+
-
+
@@ -1163,7 +1163,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1188,7 +1188,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1208,7 +1208,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1220,17 +1220,17 @@ There is no required difficulty for version 2 addresses like this.
+Receiver's required difficulty: {0} and {1}
-
+
-
+
@@ -1240,7 +1240,7 @@ Receiver's required difficulty: %1 and %2
-
+
@@ -1255,12 +1255,12 @@ Receiver's required difficulty: %1 and %2
-
+
-
+
@@ -1623,27 +1623,27 @@ T' 'Random Number' option be selected by default but deterministi
-
+
-
+
-
+
-
+
-
+
diff --git a/src/translations/bitmessage_eo.qm b/src/translations/bitmessage_eo.qm
index 77c20edf..76fac096 100644
Binary files a/src/translations/bitmessage_eo.qm and b/src/translations/bitmessage_eo.qm differ
diff --git a/src/translations/bitmessage_eo.ts b/src/translations/bitmessage_eo.ts
index 5707a390..835de58d 100644
--- a/src/translations/bitmessage_eo.ts
+++ b/src/translations/bitmessage_eo.ts
@@ -350,8 +350,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Iu de viaj adresoj, %1, estas malnova versio 1 adreso. Versioj 1 adresoj ne estas jam subtenataj. Ĉu ni povas forigi ĝin?
+
+ Iu de viaj adresoj, {0}, estas malnova versio 1 adreso. Versioj 1 adresoj ne estas jam subtenataj. Ĉu ni povas forigi ĝin?
@@ -370,13 +370,13 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Mesaĝo sendita. Atendado je konfirmo. Sendita je %1
+
+ Mesaĝo sendita. Atendado je konfirmo. Sendita je {0}
-
- Mesaĝo sendita. Sendita je %1
+
+ Mesaĝo sendita. Sendita je {0}
@@ -385,8 +385,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Ricevis konfirmon de la mesaĝo je %1
+
+ Ricevis konfirmon de la mesaĝo je {0}
@@ -395,18 +395,18 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Elsendo je %1
+
+ Elsendo je {0}
-
- Problemo: la demandita laboro de la ricevonto estas pli malfacila ol vi pretas fari. %1
+
+ Problemo: la demandita laboro de la ricevonto estas pli malfacila ol vi pretas fari. {0}
-
- Problemo: la ĉifroŝlosilo de la ricevonto estas rompita. Ne povis ĉifri la mesaĝon. %1
+
+ Problemo: la ĉifroŝlosilo de la ricevonto estas rompita. Ne povis ĉifri la mesaĝon. {0}
@@ -415,8 +415,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Nekonata stato: %1 %2
+
+ Nekonata stato: {0} {1}
@@ -456,10 +456,10 @@ Please type the desired email address (including @mailchuck.com) below:
Vi povas administri viajn ŝlosilojn per redakti la dosieron “keys.dat” en la dosierujo
-%1.
+{0}.
Estas grava, ke vi faru sekurkopion de tiu dosiero.
@@ -475,10 +475,10 @@ Estas grava, ke vi faru sekurkopion de tiu dosiero.
Vi povas administri viajn ŝlosilojn per redakti la dosieron “keys.dat” en la dosierujo
-%1.
+{0}.
Estas grava, ke vi faru sekurkopion de tiu dosiero. Ĉu vi volas malfermi la dosieron nun? (Bonvolu certigi ke Bitmesaĝo estas fermita antaŭ fari ŝanĝojn.)
@@ -543,7 +543,7 @@ Estas grava, ke vi faru sekurkopion de tiu dosiero. Ĉu vi volas malfermi la dos
-
+
@@ -611,52 +611,52 @@ Estas grava, ke vi faru sekurkopion de tiu dosiero. Ĉu vi volas malfermi la dos
-
- La mesaĝon kiun vi provis sendi estas tro longa je %1 bitokoj. (La maksimumo estas 261644 bitokoj.) Bonvolu mallongigi ĝin antaŭ sendado.
+
+ La mesaĝon kiun vi provis sendi estas tro longa je {0} bitokoj. (La maksimumo estas 261644 bitokoj.) Bonvolu mallongigi ĝin antaŭ sendado.
-
- Eraro: via konto ne estas registrita je retpoŝta kluzo. Registranta nun kiel %1, bonvolu atendi ĝis la registrado finos antaŭ vi reprovos sendi iun ajn.
+
+ Eraro: via konto ne estas registrita je retpoŝta kluzo. Registranta nun kiel {0}, bonvolu atendi ĝis la registrado finos antaŭ vi reprovos sendi iun ajn.
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -671,8 +671,8 @@ Estas grava, ke vi faru sekurkopion de tiu dosiero. Ĉu vi volas malfermi la dos
-
- Dum prilaborado de adreso adreso %1, Bitmesaĝo ne povas kompreni numerojn %2 de adresversioj. Eble ĝisdatigu Bitmesaĝon al la plej nova versio.
+
+ Dum prilaborado de adreso adreso {0}, Bitmesaĝo ne povas kompreni numerojn {1} de adresversioj. Eble ĝisdatigu Bitmesaĝon al la plej nova versio.
@@ -681,8 +681,8 @@ Estas grava, ke vi faru sekurkopion de tiu dosiero. Ĉu vi volas malfermi la dos
-
- Dum prilaborado de adreso %1, Bitmesaĝo ne povas priservi %2 fluojn numerojn. Eble ĝisdatigu Bitmesaĝon al la plej nova versio.
+
+ Dum prilaborado de adreso {0}, Bitmesaĝo ne povas priservi {1} fluojn numerojn. Eble ĝisdatigu Bitmesaĝon al la plej nova versio.
@@ -816,8 +816,8 @@ Estas grava, ke vi faru sekurkopion de tiu dosiero. Ĉu vi volas malfermi la dos
-
- Bitmesaĝo ne povas trovi vian adreson %1. Ĉu eble vi forviŝis ĝin?
+
+ Bitmesaĝo ne povas trovi vian adreson {0}. Ĉu eble vi forviŝis ĝin?
@@ -974,7 +974,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1169,8 +1169,8 @@ Are you sure you want to delete the channel?
-
- Pligrandigo: %1
+
+ Pligrandigo: {0}
@@ -1184,48 +1184,48 @@ Are you sure you want to delete the channel?
-
+
-
- La nova versio de PyBitmessage estas disponebla: %1. Elŝutu ĝin de https://github.com/Bitmessage/PyBitmessage/releases/latest
+
+ La nova versio de PyBitmessage estas disponebla: {0}. Elŝutu ĝin de https://github.com/Bitmessage/PyBitmessage/releases/latest
-
- Atendado ĝis laborpruvo finiĝos… %1%
+
+ Atendado ĝis laborpruvo finiĝos… {0}%
-
- Fermado de PyBitmessage… %1%
+
+ Fermado de PyBitmessage… {0}%
-
- Atendado ĝis objektoj estos senditaj… %1%
+
+ Atendado ĝis objektoj estos senditaj… {0}%
-
- Konservado de agordoj… %1%
+
+ Konservado de agordoj… {0}%
-
- Fermado de kerno… %1%
+
+ Fermado de kerno… {0}%
-
- Haltigado de sciigoj… %1%
+
+ Haltigado de sciigoj… {0}%
-
- Fermado tuj… %1%
+
+ Fermado tuj… {0}%
@@ -1239,8 +1239,8 @@ Are you sure you want to delete the channel?
-
- Fermado de PyBitmessage… %1%
+
+ Fermado de PyBitmessage… {0}%
@@ -1259,13 +1259,13 @@ Are you sure you want to delete the channel?
-
- Kreado de %1 novaj adresoj.
+
+ Kreado de {0} novaj adresoj.
-
- %1 jam estas en ‘Viaj Identigoj’. Ĝi ne estos aldonita ree.
+
+ {0} jam estas en ‘Viaj Identigoj’. Ĝi ne estos aldonita ree.
@@ -1274,7 +1274,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1299,8 +1299,8 @@ Are you sure you want to delete the channel?
-
- Elsendo sendita je %1
+
+ Elsendo sendita je {0}
@@ -1319,8 +1319,8 @@ Are you sure you want to delete the channel?
-
- Eraro: celadreso estas portebla aparato kiu necesas, ke la celadreso estu enhavita en la mesaĝo, sed tio estas malpermesita ne viaj agordoj. %1
+
+ Eraro: celadreso estas portebla aparato kiu necesas, ke la celadreso estu enhavita en la mesaĝo, sed tio estas malpermesita ne viaj agordoj. {0}
@@ -1332,19 +1332,19 @@ Malfacilaĵo ne estas bezonata por adresoj versioj 2, kiel tiu ĉi adreso.
+Receiver's required difficulty: {0} and {1}
Kalkulado de laborpruvo, kiu endas por sendi mesaĝon.
-Ricevonto postulas malfacilaĵon: %1 kaj %2
+Ricevonto postulas malfacilaĵon: {0} kaj {1}
-
- Eraro: la demandita laboro de la ricevonto (%1 kaj %2) estas pli malfacila ol vi pretas fari. %3
+
+ Eraro: la demandita laboro de la ricevonto ({0} kaj {1}) estas pli malfacila ol vi pretas fari. {2}
-
- Eraro: Vi provis sendi mesaĝon al vi mem aŭ al kanalo, tamen via ĉifroŝlosilo ne estas trovebla en la dosiero keys.dat. Mesaĝo ne povis esti ĉifrita. %1
+
+ Eraro: Vi provis sendi mesaĝon al vi mem aŭ al kanalo, tamen via ĉifroŝlosilo ne estas trovebla en la dosiero keys.dat. Mesaĝo ne povis esti ĉifrita. {0}
@@ -1353,8 +1353,8 @@ Ricevonto postulas malfacilaĵon: %1 kaj %2
-
- Mesaĝo sendita. Atendado je konfirmo. Sendita je %1
+
+ Mesaĝo sendita. Atendado je konfirmo. Sendita je {0}
@@ -1368,13 +1368,13 @@ Ricevonto postulas malfacilaĵon: %1 kaj %2
-
- Sendado de peto pri publika ĉifroŝlosilo. Atendado je respondo. Petis je %1
+
+ Sendado de peto pri publika ĉifroŝlosilo. Atendado je respondo. Petis je {0}
-
- UPnP pord-mapigo farita je pordo %1
+
+ UPnP pord-mapigo farita je pordo {0}
@@ -1418,18 +1418,18 @@ Ricevonto postulas malfacilaĵon: %1 kaj %2
-
- La nomo %1 ne trovita.
+
+ La nomo {0} ne trovita.
-
- La namecoin-peto fiaskis (%1)
+
+ La namecoin-peto fiaskis ({0})
-
- Nekonata tipo de namecoin-fasado: %1
+
+ Nekonata tipo de namecoin-fasado: {0}
@@ -1438,13 +1438,13 @@ Ricevonto postulas malfacilaĵon: %1 kaj %2
-
- La nomo %1 ne estas atribuita kun bitmesaĝa adreso.
+
+ La nomo {0} ne estas atribuita kun bitmesaĝa adreso.
-
- Sukceso! Namecoind versio %1 funkcias.
+
+ Sukceso! Namecoind versio {0} funkcias.
@@ -1507,53 +1507,53 @@ Bonvenon al facila kaj sekura Bitmesaĝo
-
- Eraro: bitmesaĝaj adresoj komenciĝas kun BM-. Bonvolu kontroli la adreson de ricevonto %1
+
+ Eraro: bitmesaĝaj adresoj komenciĝas kun BM-. Bonvolu kontroli la adreson de ricevonto {0}
-
- Eraro: la adreso de ricevonto %1 estas malprave tajpita aŭ kopiita. Bonvolu kontroli ĝin.
+
+ Eraro: la adreso de ricevonto {0} estas malprave tajpita aŭ kopiita. Bonvolu kontroli ĝin.
-
- Eraro: la adreso de ricevonto %1 enhavas malpermesatajn simbolojn. Bonvolu kontroli ĝin.
+
+ Eraro: la adreso de ricevonto {0} enhavas malpermesatajn simbolojn. Bonvolu kontroli ĝin.
-
- Eraro: la versio de adreso de ricevonto %1 estas tro alta. Eble vi devas ĝisdatigi vian bitmesaĝan programon aŭ via sagaca konato uzas alian programon.
+
+ Eraro: la versio de adreso de ricevonto {0} estas tro alta. Eble vi devas ĝisdatigi vian bitmesaĝan programon aŭ via sagaca konato uzas alian programon.
-
- Eraro: kelkaj datumoj koditaj en la adreso de ricevonto %1 estas tro mallongaj. Povus esti ke io en la programo de via konato malfunkcias.
+
+ Eraro: kelkaj datumoj koditaj en la adreso de ricevonto {0} estas tro mallongaj. Povus esti ke io en la programo de via konato malfunkcias.
-
- Eraro: kelkaj datumoj koditaj en la adreso de ricevonto %1 estas tro longaj. Povus esti ke io en la programo de via konato malfunkcias.
+
+ Eraro: kelkaj datumoj koditaj en la adreso de ricevonto {0} estas tro longaj. Povus esti ke io en la programo de via konato malfunkcias.
-
- Eraro: kelkaj datumoj koditaj en la adreso de ricevonto %1 estas misformitaj. Povus esti ke io en la programo de via konato malfunkcias.
+
+ Eraro: kelkaj datumoj koditaj en la adreso de ricevonto {0} estas misformitaj. Povus esti ke io en la programo de via konato malfunkcias.
-
- Eraro: io malĝustas kun la adreso de ricevonto %1.
+
+ Eraro: io malĝustas kun la adreso de ricevonto {0}.
-
- Eraro: %1
+
+ Eraro: {0}
-
- De %1
+
+ De {0}
@@ -1665,8 +1665,8 @@ Bonvenon al facila kaj sekura Bitmesaĝo
-
- La ligilo "%1" estos malfermita per foliumilo. Tio povas esti malsekura, ĝi povos malanonimigi vin aŭ elŝuti malicajn datumojn. Ĉu vi certas?
+
+ La ligilo "{0}" estos malfermita per foliumilo. Tio povas esti malsekura, ĝi povos malanonimigi vin aŭ elŝuti malicajn datumojn. Ĉu vi certas?
@@ -2001,8 +2001,8 @@ La “hazardnombra” adreso estas antaŭagordita, sed antaŭkalkuleblaj adresoj
-
- Vi uzas TCP-pordon %1 (tio ĉi estas ŝanĝebla en la agordoj).
+
+ Vi uzas TCP-pordon {0} (tio ĉi estas ŝanĝebla en la agordoj).
@@ -2054,28 +2054,28 @@ La “hazardnombra” adreso estas antaŭagordita, sed antaŭkalkuleblaj adresoj
-
- Ekde lanĉo de la programo je %1
+
+ Ekde lanĉo de la programo je {0}
-
- Elŝuto: %1/s Sume: %2
+
+ Elŝuto: {0}/s Sume: {1}
-
- Alŝuto: %1/s Sume: %2
+
+ Alŝuto: {0}/s Sume: {1}
-
- Ĉiuj konektoj: %1
+
+ Ĉiuj konektoj: {0}
-
- Petoj pri inventaro en sekundo: %1
+
+ Petoj pri inventaro en sekundo: {0}
@@ -2240,8 +2240,8 @@ La “hazardnombra” adreso estas antaŭagordita, sed antaŭkalkuleblaj adresoj
newchandialog
-
- Sukcese kreis / anigis al la kanalo %1
+
+ Sukcese kreis / anigis al la kanalo {0}
diff --git a/src/translations/bitmessage_fr.qm b/src/translations/bitmessage_fr.qm
index 8cb08a3a..d54bf164 100644
Binary files a/src/translations/bitmessage_fr.qm and b/src/translations/bitmessage_fr.qm differ
diff --git a/src/translations/bitmessage_fr.ts b/src/translations/bitmessage_fr.ts
index 149fd1ef..44fa0248 100644
--- a/src/translations/bitmessage_fr.ts
+++ b/src/translations/bitmessage_fr.ts
@@ -314,8 +314,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Une de vos adresses, %1, est une vieille adresse de la version 1. Les adresses de la version 1 ne sont plus supportées. Nous pourrions la supprimer maintenant?
+
+ Une de vos adresses, {0}, est une vieille adresse de la version 1. Les adresses de la version 1 ne sont plus supportées. Nous pourrions la supprimer maintenant?
@@ -334,13 +334,13 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Message envoyé. En attente de l’accusé de réception. Envoyé %1
+
+ Message envoyé. En attente de l’accusé de réception. Envoyé {0}
-
- Message envoyé. Envoyé %1
+
+ Message envoyé. Envoyé {0}
@@ -349,8 +349,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Accusé de réception reçu %1
+
+ Accusé de réception reçu {0}
@@ -359,18 +359,18 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Message de diffusion du %1
+
+ Message de diffusion du {0}
-
- Problème : Le travail demandé par le destinataire est plus difficile que ce que vous avez paramétré. %1
+
+ Problème : Le travail demandé par le destinataire est plus difficile que ce que vous avez paramétré. {0}
-
- Problème : la clé de chiffrement du destinataire n’est pas bonne. Il n’a pas été possible de chiffrer le message. %1
+
+ Problème : la clé de chiffrement du destinataire n’est pas bonne. Il n’a pas été possible de chiffrer le message. {0}
@@ -379,8 +379,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Statut inconnu : %1 %2
+
+ Statut inconnu : {0} {1}
@@ -420,9 +420,9 @@ Please type the desired email address (including @mailchuck.com) below:
- Vous pouvez éditer vos clés en éditant le fichier keys.dat stocké dans le répertoire %1.
+ Vous pouvez éditer vos clés en éditant le fichier keys.dat stocké dans le répertoire {0}.
Il est important de faire des sauvegardes de ce fichier.
@@ -438,9 +438,9 @@ Il est important de faire des sauvegardes de ce fichier.
- Vous pouvez éditer vos clés en éditant le fichier keys.dat stocké dans le répertoire %1. Il est important de faire des sauvegardes de ce fichier. Souhaitez-vous l’ouvrir maintenant? (Assurez-vous de fermer Bitmessage avant d’effectuer des changements.)
+ Vous pouvez éditer vos clés en éditant le fichier keys.dat stocké dans le répertoire {0}. Il est important de faire des sauvegardes de ce fichier. Souhaitez-vous l’ouvrir maintenant? (Assurez-vous de fermer Bitmessage avant d’effectuer des changements.)
@@ -504,7 +504,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -573,52 +573,52 @@ Le destinataire doit l’obtenir avant ce temps. Si votre client Bitmessage ne r
-
- Le message que vous essayez d’envoyer est trop long de %1 octets (le maximum est 261644 octets). Veuillez le réduire avant de l’envoyer.
+
+ Le message que vous essayez d’envoyer est trop long de {0} octets (le maximum est 261644 octets). Veuillez le réduire avant de l’envoyer.
-
- Erreur : votre compte n’a pas été inscrit à une passerelle de courrier électronique. Envoi de l’inscription maintenant en tant que %1, veuillez patienter tandis que l’inscription est en cours de traitement, avant de retenter l’envoi.
+
+ Erreur : votre compte n’a pas été inscrit à une passerelle de courrier électronique. Envoi de l’inscription maintenant en tant que {0}, veuillez patienter tandis que l’inscription est en cours de traitement, avant de retenter l’envoi.
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -633,8 +633,8 @@ Le destinataire doit l’obtenir avant ce temps. Si votre client Bitmessage ne r
-
- Concernant l’adresse %1, Bitmessage ne peut pas comprendre les numéros de version de %2. Essayez de mettre à jour Bitmessage vers la dernière version.
+
+ Concernant l’adresse {0}, Bitmessage ne peut pas comprendre les numéros de version de {1}. Essayez de mettre à jour Bitmessage vers la dernière version.
@@ -643,8 +643,8 @@ Le destinataire doit l’obtenir avant ce temps. Si votre client Bitmessage ne r
-
- Concernant l’adresse %1, Bitmessage ne peut pas supporter les nombres de flux de %2. Essayez de mettre à jour Bitmessage vers la dernière version.
+
+ Concernant l’adresse {0}, Bitmessage ne peut pas supporter les nombres de flux de {1}. Essayez de mettre à jour Bitmessage vers la dernière version.
@@ -778,8 +778,8 @@ Le destinataire doit l’obtenir avant ce temps. Si votre client Bitmessage ne r
-
- Bitmessage ne peut pas trouver votre adresse %1. Peut-être l’avez-vous supprimée?
+
+ Bitmessage ne peut pas trouver votre adresse {0}. Peut-être l’avez-vous supprimée?
@@ -936,7 +936,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1131,8 +1131,8 @@ Are you sure you want to delete the channel?
-
- Niveau de zoom %1%
+
+ Niveau de zoom {0}%
@@ -1146,48 +1146,48 @@ Are you sure you want to delete the channel?
-
+
-
- Une nouvelle version de PyBitmessage est disponible : %1. Veuillez la télécharger depuis https://github.com/Bitmessage/PyBitmessage/releases/latest
+
+ Une nouvelle version de PyBitmessage est disponible : {0}. Veuillez la télécharger depuis https://github.com/Bitmessage/PyBitmessage/releases/latest
-
- En attente de la fin de la PoW… %1%
+
+ En attente de la fin de la PoW… {0}%
-
- Pybitmessage en cours d’arrêt… %1%
+
+ Pybitmessage en cours d’arrêt… {0}%
-
- En attente de l’envoi des objets… %1%
+
+ En attente de l’envoi des objets… {0}%
-
- Enregistrement des paramètres… %1%
+
+ Enregistrement des paramètres… {0}%
-
- Cœur en cours d’arrêt… %1%
+
+ Cœur en cours d’arrêt… {0}%
-
- Arrêt des notifications… %1%
+
+ Arrêt des notifications… {0}%
-
- Arrêt imminent… %1%
+
+ Arrêt imminent… {0}%
@@ -1201,8 +1201,8 @@ Are you sure you want to delete the channel?
-
- PyBitmessage en cours d’arrêt… %1%
+
+ PyBitmessage en cours d’arrêt… {0}%
@@ -1221,13 +1221,13 @@ Are you sure you want to delete the channel?
-
- Production de %1 nouvelles adresses.
+
+ Production de {0} nouvelles adresses.
-
- %1 est déjà dans "Vos identités". Il ne sera pas ajouté de nouveau.
+
+ {0} est déjà dans "Vos identités". Il ne sera pas ajouté de nouveau.
@@ -1236,7 +1236,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1261,8 +1261,8 @@ Are you sure you want to delete the channel?
-
- Message de diffusion envoyé %1
+
+ Message de diffusion envoyé {0}
@@ -1281,8 +1281,8 @@ Are you sure you want to delete the channel?
-
- Problème : la destination est un dispositif mobile qui nécessite que la destination soit incluse dans le message mais ceci n’est pas autorisé dans vos paramètres. %1
+
+ Problème : la destination est un dispositif mobile qui nécessite que la destination soit incluse dans le message mais ceci n’est pas autorisé dans vos paramètres. {0}
@@ -1294,19 +1294,19 @@ Il n’y a pas de difficulté requise pour les adresses version 2 comme celle-ci
+Receiver's required difficulty: {0} and {1}
Travail en cours afin d’envoyer le message.
-Difficulté requise du destinataire : %1 et %2
+Difficulté requise du destinataire : {0} et {1}
-
- Problème : Le travail demandé par le destinataire (%1 and %2) est plus difficile que ce que vous avez paramétré. %3
+
+ Problème : Le travail demandé par le destinataire ({0} and {1}) est plus difficile que ce que vous avez paramétré. {2}
-
- Problème : Vous essayez d’envoyer un message à un canal ou à vous-même mais votre clef de chiffrement n’a pas été trouvée dans le fichier keys.dat. Le message ne peut pas être chiffré. %1
+
+ Problème : Vous essayez d’envoyer un message à un canal ou à vous-même mais votre clef de chiffrement n’a pas été trouvée dans le fichier keys.dat. Le message ne peut pas être chiffré. {0}
@@ -1315,8 +1315,8 @@ Difficulté requise du destinataire : %1 et %2
-
- Message envoyé. En attente de l’accusé de réception. Envoyé %1
+
+ Message envoyé. En attente de l’accusé de réception. Envoyé {0}
@@ -1330,13 +1330,13 @@ Difficulté requise du destinataire : %1 et %2
-
- Envoi d’une demande de clef publique. En attente d’une réponse. Demandée à %1
+
+ Envoi d’une demande de clef publique. En attente d’une réponse. Demandée à {0}
-
- Transfert de port UPnP établi sur le port %1
+
+ Transfert de port UPnP établi sur le port {0}
@@ -1380,13 +1380,13 @@ Difficulté requise du destinataire : %1 et %2
-
- Le nom %1 n'a pas été trouvé.
+
+ Le nom {0} n'a pas été trouvé.
-
- La requête Namecoin a échouée (%1)
+
+ La requête Namecoin a échouée ({0})
@@ -1395,18 +1395,18 @@ Difficulté requise du destinataire : %1 et %2
-
- Le nom %1 n'a aucune donnée JSON valide.
+
+ Le nom {0} n'a aucune donnée JSON valide.
-
- Le nom %1 n'a aucune adresse Bitmessage d'associée.
+
+ Le nom {0} n'a aucune adresse Bitmessage d'associée.
-
- Succès ! Namecoind version %1 en cours d'exécution.
+
+ Succès ! Namecoind version {0} en cours d'exécution.
@@ -1470,53 +1470,53 @@ Bienvenue dans le facile et sécurisé Bitmessage
-
- Erreur : Les adresses Bitmessage commencent par BM- Veuillez vérifier l'adresse du destinataire %1
+
+ Erreur : Les adresses Bitmessage commencent par BM- Veuillez vérifier l'adresse du destinataire {0}
-
- Erreur : L’adresse du destinataire %1 n’est pas correctement tapée ou recopiée. Veuillez la vérifier.
+
+ Erreur : L’adresse du destinataire {0} n’est pas correctement tapée ou recopiée. Veuillez la vérifier.
-
- Erreur : L’adresse du destinataire %1 contient des caractères invalides. Veuillez la vérifier.
+
+ Erreur : L’adresse du destinataire {0} contient des caractères invalides. Veuillez la vérifier.
-
- Erreur : la version de l’adresse destinataire %1 est trop élevée. Vous devez mettre à niveau votre logiciel Bitmessage ou alors celui de votre connaissance est plus intelligent.
+
+ Erreur : la version de l’adresse destinataire {0} est trop élevée. Vous devez mettre à niveau votre logiciel Bitmessage ou alors celui de votre connaissance est plus intelligent.
-
- Erreur : quelques données codées dans l’adresse destinataire %1 sont trop courtes. Il pourrait y avoir un soucis avec le logiciel de votre connaissance.
+
+ Erreur : quelques données codées dans l’adresse destinataire {0} sont trop courtes. Il pourrait y avoir un soucis avec le logiciel de votre connaissance.
-
- Erreur : quelques données codées dans l’adresse destinataire %1 sont trop longues. Il pourrait y avoir un soucis avec le logiciel de votre connaissance.
+
+ Erreur : quelques données codées dans l’adresse destinataire {0} sont trop longues. Il pourrait y avoir un soucis avec le logiciel de votre connaissance.
-
- Erreur : quelques données codées dans l’adresse destinataire %1 sont mal formées. Il pourrait y avoir un soucis avec le logiciel de votre connaissance.
+
+ Erreur : quelques données codées dans l’adresse destinataire {0} sont mal formées. Il pourrait y avoir un soucis avec le logiciel de votre connaissance.
-
- Erreur : quelque chose ne va pas avec l'adresse de destinataire %1.
+
+ Erreur : quelque chose ne va pas avec l'adresse de destinataire {0}.
-
- Erreur : %1
+
+ Erreur : {0}
-
- De %1
+
+ De {0}
@@ -1628,8 +1628,8 @@ Bienvenue dans le facile et sécurisé Bitmessage
-
- Le lien "%1" s'ouvrira dans un navigateur. Cela pourrait être un risque de sécurité, cela pourrait vous désanonymiser ou télécharger des données malveillantes. Êtes-vous sûr(e) ?
+
+ Le lien "{0}" s'ouvrira dans un navigateur. Cela pourrait être un risque de sécurité, cela pourrait vous désanonymiser ou télécharger des données malveillantes. Êtes-vous sûr(e) ?
@@ -1964,8 +1964,8 @@ L’option "Nombre Aléatoire" est sélectionnée par défaut mais les
-
- Vous utilisez le port TCP %1. (Ceci peut être changé dans les paramètres).
+
+ Vous utilisez le port TCP {0}. (Ceci peut être changé dans les paramètres).
@@ -2017,28 +2017,28 @@ L’option "Nombre Aléatoire" est sélectionnée par défaut mais les
-
- Démarré depuis le %1
+
+ Démarré depuis le {0}
-
- Téléchargées : %1/s Total : %2
+
+ Téléchargées : {0}/s Total : {1}
-
- Téléversées : %1/s Total : %2
+
+ Téléversées : {0}/s Total : {1}
-
- Total des connexions : %1
+
+ Total des connexions : {0}
-
- Consultations d’inventaire par seconde : %1
+
+ Consultations d’inventaire par seconde : {0}
@@ -2203,8 +2203,8 @@ L’option "Nombre Aléatoire" est sélectionnée par défaut mais les
newchandialog
-
- Le canal %1 a été rejoint ou créé avec succès.
+
+ Le canal {0} a été rejoint ou créé avec succès.
diff --git a/src/translations/bitmessage_it.qm b/src/translations/bitmessage_it.qm
index d38e68bc..8b2e9915 100644
Binary files a/src/translations/bitmessage_it.qm and b/src/translations/bitmessage_it.qm differ
diff --git a/src/translations/bitmessage_it.ts b/src/translations/bitmessage_it.ts
index dbefce30..229e02fa 100644
--- a/src/translations/bitmessage_it.ts
+++ b/src/translations/bitmessage_it.ts
@@ -279,8 +279,8 @@ Il gateway email non condurrà operazioni PGP a vostro nome. È possibile
-
- Uno dei tuoi indirizzi, %1, è un indirizzo vecchio versione 1. Gli indirizzi versione 1 non sono più supportati. Posso eliminarlo ora?
+
+ Uno dei tuoi indirizzi, {0}, è un indirizzo vecchio versione 1. Gli indirizzi versione 1 non sono più supportati. Posso eliminarlo ora?
@@ -299,13 +299,13 @@ Il gateway email non condurrà operazioni PGP a vostro nome. È possibile
-
+
-
- Messaggio inviato. Inviato a %1
+
+ Messaggio inviato. Inviato a {0}
@@ -314,7 +314,7 @@ Il gateway email non condurrà operazioni PGP a vostro nome. È possibile
-
+
@@ -324,17 +324,17 @@ Il gateway email non condurrà operazioni PGP a vostro nome. È possibile
-
+
-
+
-
+
@@ -344,7 +344,7 @@ Il gateway email non condurrà operazioni PGP a vostro nome. È possibile
-
+
@@ -385,7 +385,7 @@ Il gateway email non condurrà operazioni PGP a vostro nome. È possibile
@@ -402,7 +402,7 @@ It is important that you back up this file.
@@ -468,7 +468,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -536,52 +536,52 @@ It is important that you back up this file. Would you like to open the file now?
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -596,7 +596,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -606,7 +606,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -741,7 +741,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -895,7 +895,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1090,7 +1090,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1105,47 +1105,47 @@ Are you sure you want to delete the channel?
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1166,7 +1166,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1186,12 +1186,12 @@ Are you sure you want to delete the channel?
-
+
-
+
@@ -1201,7 +1201,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1226,7 +1226,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1246,7 +1246,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1258,17 +1258,17 @@ There is no required difficulty for version 2 addresses like this.
+Receiver's required difficulty: {0} and {1}
-
+
-
+
@@ -1278,7 +1278,7 @@ Receiver's required difficulty: %1 and %2
-
+
@@ -1293,12 +1293,12 @@ Receiver's required difficulty: %1 and %2
-
+
-
+
@@ -1660,27 +1660,27 @@ The 'Random Number' option is selected by default but deterministic ad
-
+
-
+
-
+
-
- Connessioni totali: %1
+
+ Connessioni totali: {0}
-
+
diff --git a/src/translations/bitmessage_ja.qm b/src/translations/bitmessage_ja.qm
index 77fa63d1..8637aa2e 100644
Binary files a/src/translations/bitmessage_ja.qm and b/src/translations/bitmessage_ja.qm differ
diff --git a/src/translations/bitmessage_ja.ts b/src/translations/bitmessage_ja.ts
index f11289f5..2b1ebe97 100644
--- a/src/translations/bitmessage_ja.ts
+++ b/src/translations/bitmessage_ja.ts
@@ -352,8 +352,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- %1は古いバージョン1のアドレスです。バージョン1のアドレスはサポートが終了しています。すぐに削除しますか?
+
+ {0}は古いバージョン1のアドレスです。バージョン1のアドレスはサポートが終了しています。すぐに削除しますか?
@@ -372,13 +372,13 @@ Please type the desired email address (including @mailchuck.com) below:
-
- メッセージを送信しました。 確認応答を待っています。 %1 で送信されました
+
+ メッセージを送信しました。 確認応答を待っています。 {0} で送信されました
-
- メッセージは送信されました。送信先: %1
+
+ メッセージは送信されました。送信先: {0}
@@ -387,8 +387,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- メッセージの確認を受け取りました %1
+
+ メッセージの確認を受け取りました {0}
@@ -397,18 +397,18 @@ Please type the desired email address (including @mailchuck.com) below:
-
- 配信: %1
+
+ 配信: {0}
-
- 問題: 受信者が要求している処理は現在あなたが設定しているよりも高い難易度です。 %1
+
+ 問題: 受信者が要求している処理は現在あなたが設定しているよりも高い難易度です。 {0}
-
- 問題: 受信者の暗号鍵は正当でない物です。メッセージを暗号化できません。 %1
+
+ 問題: 受信者の暗号鍵は正当でない物です。メッセージを暗号化できません。 {0}
@@ -417,8 +417,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- 不明なステータス: %1 %2
+
+ 不明なステータス: {0} {1}
@@ -458,9 +458,9 @@ Please type the desired email address (including @mailchuck.com) below:
- %1
+ {0}
に保存されているkeys.datファイルを編集することで鍵を管理できます。
このファイルをバックアップしておくことは重要です。
@@ -477,9 +477,9 @@ It is important that you back up this file.
- %1
+ {0}
に保存されているkeys.datファイルを編集することで鍵を管理できます。
ファイルをバックアップしておくことは重要です。すぐにファイルを開きますか?(必ず編集する前にBitmessageを終了してください)
@@ -545,7 +545,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -616,52 +616,52 @@ It is important that you back up this file. Would you like to open the file now?
-
- 送信しようとしているメッセージが %1 バイト長すぎます。 (最大は261644バイトです)。 送信する前に短くしてください。
+
+ 送信しようとしているメッセージが {0} バイト長すぎます。 (最大は261644バイトです)。 送信する前に短くしてください。
-
- エラー: アカウントがメールゲートウェイに登録されていません。 今 %1 として登録を送信しています。送信を再試行する前に、登録が処理されるのをお待ちください。
+
+ エラー: アカウントがメールゲートウェイに登録されていません。 今 {0} として登録を送信しています。送信を再試行する前に、登録が処理されるのをお待ちください。
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -676,8 +676,8 @@ It is important that you back up this file. Would you like to open the file now?
-
- アドレス %1 に接続しています。%2 のバージョン番号は処理できません。Bitmessageを最新のバージョンへアップデートしてください。
+
+ アドレス {0} に接続しています。{1} のバージョン番号は処理できません。Bitmessageを最新のバージョンへアップデートしてください。
@@ -686,8 +686,8 @@ It is important that you back up this file. Would you like to open the file now?
-
- アドレス %1 に接続しています。%2 のストリーム番号は処理できません。Bitmessageを最新のバージョンへアップデートしてください。
+
+ アドレス {0} に接続しています。{1} のストリーム番号は処理できません。Bitmessageを最新のバージョンへアップデートしてください。
@@ -821,8 +821,8 @@ It is important that you back up this file. Would you like to open the file now?
-
- アドレス %1 が見つかりません。既に削除していませんか?
+
+ アドレス {0} が見つかりません。既に削除していませんか?
@@ -979,7 +979,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1174,8 +1174,8 @@ Are you sure you want to delete the channel?
-
- ズーム レベル %1%
+
+ ズーム レベル {0}%
@@ -1189,48 +1189,48 @@ Are you sure you want to delete the channel?
-
+
-
- 新しいバージョンの PyBitmessage が利用可能です: %1。 https://github.com/Bitmessage/PyBitmessage/releases/latest からダウンロードしてください
+
+ 新しいバージョンの PyBitmessage が利用可能です: {0}。 https://github.com/Bitmessage/PyBitmessage/releases/latest からダウンロードしてください
-
- PoW(プルーフオブワーク)が完了するのを待っています... %1%
+
+ PoW(プルーフオブワーク)が完了するのを待っています... {0}%
-
- Pybitmessageをシャットダウンしています... %1%
+
+ Pybitmessageをシャットダウンしています... {0}%
-
- オブジェクトの送信待ち... %1%
+
+ オブジェクトの送信待ち... {0}%
-
- 設定を保存しています... %1%
+
+ 設定を保存しています... {0}%
-
- コアをシャットダウンしています... %1%
+
+ コアをシャットダウンしています... {0}%
-
- 通知を停止しています... %1%
+
+ 通知を停止しています... {0}%
-
- すぐにシャットダウンします... %1%
+
+ すぐにシャットダウンします... {0}%
@@ -1244,8 +1244,8 @@ Are you sure you want to delete the channel?
-
- PyBitmessageをシャットダウンしています... %1%
+
+ PyBitmessageをシャットダウンしています... {0}%
@@ -1264,13 +1264,13 @@ Are you sure you want to delete the channel?
-
- %1 の新しいアドレスを生成しています。
+
+ {0} の新しいアドレスを生成しています。
-
- %1はすでに「アドレス一覧」にあります。 もう一度追加できません。
+
+ {0}はすでに「アドレス一覧」にあります。 もう一度追加できません。
@@ -1279,7 +1279,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1304,8 +1304,8 @@ Are you sure you want to delete the channel?
-
- 配信が送信されました %1
+
+ 配信が送信されました {0}
@@ -1324,8 +1324,8 @@ Are you sure you want to delete the channel?
-
- 問題: メッセージに含まれた宛先のリクエストはモバイルデバイスですが、設定では許可されていません。 %1
+
+ 問題: メッセージに含まれた宛先のリクエストはモバイルデバイスですが、設定では許可されていません。 {0}
@@ -1337,18 +1337,18 @@ There is no required difficulty for version 2 addresses like this.
+Receiver's required difficulty: {0} and {1}
メッセージの送信に必要な処理を行っています。
-受信者の必要な難易度: %1 および %2
+受信者の必要な難易度: {0} および {1}
-
- 問題: 受信者が要求している処理 (%1 および %2) は、現在あなたが設定しているよりも高い難易度です。 %3
+
+ 問題: 受信者が要求している処理 ({0} および {1}) は、現在あなたが設定しているよりも高い難易度です。 {2}
-
+
問題: あなた自身またはチャンネルにメッセージを送信しようとしていますが、暗号鍵がkeys.datファイルに見つかりませんでした。 メッセージを暗号化できませんでした。 %1
@@ -1358,8 +1358,8 @@ Receiver's required difficulty: %1 and %2
-
- メッセージを送信しました。 確認応答を待っています。 %1 で送信しました
+
+ メッセージを送信しました。 確認応答を待っています。 {0} で送信しました
@@ -1373,13 +1373,13 @@ Receiver's required difficulty: %1 and %2
-
- 公開鍵のリクエストを送信しています。 返信を待っています。 %1 でリクエストしました
+
+ 公開鍵のリクエストを送信しています。 返信を待っています。 {0} でリクエストしました
-
- ポート%1でUPnPポートマッピングが確立しました
+
+ ポート{0}でUPnPポートマッピングが確立しました
@@ -1423,18 +1423,18 @@ Receiver's required difficulty: %1 and %2
-
- 名前 %1 が見つかりませんでした。
+
+ 名前 {0} が見つかりませんでした。
-
- namecoin のクエリに失敗しました (%1)
+
+ namecoin のクエリに失敗しました ({0})
-
- 不明な namecoin インターフェースタイプ: %1
+
+ 不明な namecoin インターフェースタイプ: {0}
@@ -1443,13 +1443,13 @@ Receiver's required difficulty: %1 and %2
-
- 名前 %1 は関連付けられた Bitmessage アドレスがありません。
+
+ 名前 {0} は関連付けられた Bitmessage アドレスがありません。
-
- 成功! Namecoind バージョン %1 が実行中。
+
+ 成功! Namecoind バージョン {0} が実行中。
@@ -1513,53 +1513,53 @@ Receiver's required difficulty: %1 and %2
-
- エラー: BitmessageのアドレスはBM-で始まります。 受信者のアドレス %1 を確認してください
+
+ エラー: BitmessageのアドレスはBM-で始まります。 受信者のアドレス {0} を確認してください
-
- エラー: 受信者のアドレス %1 は正しく入力、またはコピーされていません。確認して下さい。
+
+ エラー: 受信者のアドレス {0} は正しく入力、またはコピーされていません。確認して下さい。
-
- エラー: 受信者のアドレス %1 は不正な文字を含んでいます。確認して下さい。
+
+ エラー: 受信者のアドレス {0} は不正な文字を含んでいます。確認して下さい。
-
- エラー: 受信者アドレスのバージョン %1 は高すぎます。 Bitmessageソフトウェアをアップグレードする必要があるか、連絡先が賢明になっているかのいずれかです。
+
+ エラー: 受信者アドレスのバージョン {0} は高すぎます。 Bitmessageソフトウェアをアップグレードする必要があるか、連絡先が賢明になっているかのいずれかです。
-
- エラー: アドレス %1 でエンコードされたデータが短すぎます。連絡先のソフトウェアが何かしら誤っている可能性があります。
+
+ エラー: アドレス {0} でエンコードされたデータが短すぎます。連絡先のソフトウェアが何かしら誤っている可能性があります。
-
- エラー: 受信者のアドレス %1 でエンコードされたデータが短すぎます。連絡先のソフトウェアが何かしら誤っている可能性があります。
+
+ エラー: 受信者のアドレス {0} でエンコードされたデータが短すぎます。連絡先のソフトウェアが何かしら誤っている可能性があります。
-
- エラー: 受信者のアドレス %1 でエンコードされたデータの一部が不正です。連絡先のソフトウェアが何かしら誤っている可能性があります。
+
+ エラー: 受信者のアドレス {0} でエンコードされたデータの一部が不正です。連絡先のソフトウェアが何かしら誤っている可能性があります。
-
- エラー: 受信者のアドレス %1 には何かしら誤りがあります。
+
+ エラー: 受信者のアドレス {0} には何かしら誤りがあります。
-
- エラー: %1
+
+ エラー: {0}
-
- 送信元 %1
+
+ 送信元 {0}
@@ -1671,8 +1671,8 @@ Receiver's required difficulty: %1 and %2
-
- リンク "%1" はブラウザで開きます。 セキュリティリスクの可能性があります。匿名性がなくなったり、悪意のあるデータをダウンロードする可能性があります。 よろしいですか?
+
+ リンク "{0}" はブラウザで開きます。 セキュリティリスクの可能性があります。匿名性がなくなったり、悪意のあるデータをダウンロードする可能性があります。 よろしいですか?
@@ -2006,8 +2006,8 @@ The 'Random Number' option is selected by default but deterministic ad
-
- 使用中のポート %1 (設定で変更できます)。
+
+ 使用中のポート {0} (設定で変更できます)。
@@ -2059,28 +2059,28 @@ The 'Random Number' option is selected by default but deterministic ad
-
- 起動日時 %1
+
+ 起動日時 {0}
-
- ダウン: %1/秒 合計: %2
+
+ ダウン: {0}/秒 合計: {1}
-
- アップ: %1/秒 合計: %2
+
+ アップ: {0}/秒 合計: {1}
-
- 接続数: %1
+
+ 接続数: {0}
-
- 毎秒のインベントリ検索: %1
+
+ 毎秒のインベントリ検索: {0}
@@ -2245,8 +2245,8 @@ The 'Random Number' option is selected by default but deterministic ad
newchandialog
-
- チャンネル %1 を正常に作成 / 参加しました
+
+ チャンネル {0} を正常に作成 / 参加しました
diff --git a/src/translations/bitmessage_nb.ts b/src/translations/bitmessage_nb.ts
index 21f641c0..0ee74d6a 100644
--- a/src/translations/bitmessage_nb.ts
+++ b/src/translations/bitmessage_nb.ts
@@ -240,7 +240,7 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
@@ -250,12 +250,12 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
-
+
@@ -275,12 +275,12 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
-
+
@@ -290,7 +290,7 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
@@ -300,17 +300,17 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
-
+
-
+
@@ -320,7 +320,7 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
@@ -361,7 +361,7 @@ Please type the desired email address (including @mailchuck.com) below:
@@ -378,7 +378,7 @@ It is important that you back up this file.
@@ -444,7 +444,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -512,52 +512,52 @@ It is important that you back up this file. Would you like to open the file now?
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -572,7 +572,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -582,7 +582,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -722,7 +722,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -876,7 +876,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1081,7 +1081,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1096,7 +1096,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1449,47 +1449,47 @@ The 'Random Number' option is selected by default but deterministic ad
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/src/translations/bitmessage_nl.qm b/src/translations/bitmessage_nl.qm
index 72a7ade2..94ba1524 100644
Binary files a/src/translations/bitmessage_nl.qm and b/src/translations/bitmessage_nl.qm differ
diff --git a/src/translations/bitmessage_nl.ts b/src/translations/bitmessage_nl.ts
index 3e7c1640..dd77549e 100644
--- a/src/translations/bitmessage_nl.ts
+++ b/src/translations/bitmessage_nl.ts
@@ -242,7 +242,7 @@ Voer het gewenste e-mail adres (inclusief @mailchuck.com) hieronder in:
-
+
@@ -262,13 +262,13 @@ Voer het gewenste e-mail adres (inclusief @mailchuck.com) hieronder in:
-
- Bericht verzonden. Wachten op bevestiging. Verzonden op %1
+
+ Bericht verzonden. Wachten op bevestiging. Verzonden op {0}
-
- Bericht verzonden. Verzonden op %1
+
+ Bericht verzonden. Verzonden op {0}
@@ -277,8 +277,8 @@ Voer het gewenste e-mail adres (inclusief @mailchuck.com) hieronder in:
-
- Bevestiging van het bericht ontvangen op %1
+
+ Bevestiging van het bericht ontvangen op {0}
@@ -287,17 +287,17 @@ Voer het gewenste e-mail adres (inclusief @mailchuck.com) hieronder in:
-
+
-
+
-
+
@@ -307,8 +307,8 @@ Voer het gewenste e-mail adres (inclusief @mailchuck.com) hieronder in:
-
- Status onbekend: %1 %2
+
+ Status onbekend: {0} {1}
@@ -348,7 +348,7 @@ Voer het gewenste e-mail adres (inclusief @mailchuck.com) hieronder in:
@@ -365,7 +365,7 @@ It is important that you back up this file.
@@ -431,7 +431,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -499,52 +499,52 @@ It is important that you back up this file. Would you like to open the file now?
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -559,7 +559,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -569,7 +569,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -704,7 +704,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -858,7 +858,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1053,7 +1053,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1068,47 +1068,47 @@ Are you sure you want to delete the channel?
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1129,7 +1129,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1149,12 +1149,12 @@ Are you sure you want to delete the channel?
-
+
-
+
@@ -1164,7 +1164,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1189,7 +1189,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1209,7 +1209,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1221,17 +1221,17 @@ There is no required difficulty for version 2 addresses like this.
+Receiver's required difficulty: {0} and {1}
-
+
-
+
@@ -1241,7 +1241,7 @@ Receiver's required difficulty: %1 and %2
-
+
@@ -1256,12 +1256,12 @@ Receiver's required difficulty: %1 and %2
-
+
-
+
@@ -1623,27 +1623,27 @@ The 'Random Number' option is selected by default but deterministic ad
-
+
-
+
-
+
-
+
-
+
diff --git a/src/translations/bitmessage_no.qm b/src/translations/bitmessage_no.qm
index 493d09ef..9f2d9efb 100644
Binary files a/src/translations/bitmessage_no.qm and b/src/translations/bitmessage_no.qm differ
diff --git a/src/translations/bitmessage_no.ts b/src/translations/bitmessage_no.ts
index bb1d5278..d0ab3946 100644
--- a/src/translations/bitmessage_no.ts
+++ b/src/translations/bitmessage_no.ts
@@ -241,8 +241,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- En av dine gamle adresser er av den første typen og derfor ikke lenger støttet: %1. Derfor kan den vel slettes?
+
+ En av dine gamle adresser er av den første typen og derfor ikke lenger støttet: {0}. Derfor kan den vel slettes?
@@ -261,13 +261,13 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Beskjed sendt. Venter på bekreftelse. Sendt %1
+
+ Beskjed sendt. Venter på bekreftelse. Sendt {0}
-
- Beskjed sendt. Sendt %1
+
+ Beskjed sendt. Sendt {0}
@@ -276,8 +276,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Bekreftelse på beskjeden mottatt %1
+
+ Bekreftelse på beskjeden mottatt {0}
@@ -286,18 +286,18 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Kringkasting på %1
+
+ Kringkasting på {0}
-
- Problem: Det nødvendige arbeidet som kreves utført av mottaker er mer krevende enn det som er satt som akseptabelt. %1
+
+ Problem: Det nødvendige arbeidet som kreves utført av mottaker er mer krevende enn det som er satt som akseptabelt. {0}
-
- Problem: Mottakerens nøkkel kunne ikke brukes til å kryptere beskjeden. %1
+
+ Problem: Mottakerens nøkkel kunne ikke brukes til å kryptere beskjeden. {0}
@@ -306,8 +306,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Ukjent status: %1 %2
+
+ Ukjent status: {0} {1}
@@ -347,10 +347,10 @@ Please type the desired email address (including @mailchuck.com) below:
Du kan administrere nøklene dine ved å endre filen keys.dat lagret i
- %1
+ {0}
Det er viktig at du tar en sikkerhetskopi av denne filen.
@@ -366,10 +366,10 @@ Det er viktig at du tar en sikkerhetskopi av denne filen.
Du kan administrere dine nøkler ved å endre på filen keys.dat lagret i
- %1
+ {0}
Det er viktig at du tar sikkerhetskopi av denne filen. Vil du åpne denne filen nå? (Vær sikker på å få avsluttet Bitmessage før du gjør endringer.)
@@ -434,8 +434,8 @@ Det er viktig at du tar sikkerhetskopi av denne filen. Vil du åpne denne filen
-
- Opprettet ny kanal. For å la andre delta i din nye kanal gir du dem dem kanalnavnet og denne Bitmessage-adressen: %1. Denne adressen vises også i 'Dine identiteter'.
+
+ Opprettet ny kanal. For å la andre delta i din nye kanal gir du dem dem kanalnavnet og denne Bitmessage-adressen: {0}. Denne adressen vises også i 'Dine identiteter'.
@@ -502,53 +502,53 @@ Det er viktig at du tar sikkerhetskopi av denne filen. Vil du åpne denne filen
-
+
-
+
-
- Feil: Bitmessage-adresser begynner med BM-. Vennligst sjekk %1
+
+ Feil: Bitmessage-adresser begynner med BM-. Vennligst sjekk {0}
-
- Feil: Adressen %1 er skrevet eller kopiert inn feil. Vennligst sjekk den.
+
+ Feil: Adressen {0} er skrevet eller kopiert inn feil. Vennligst sjekk den.
-
- Feil: Adressen %1 innerholder ugyldige tegn. Vennligst sjekk den.
+
+ Feil: Adressen {0} innerholder ugyldige tegn. Vennligst sjekk den.
-
- Feil: Typenummeret for adressen %1 er for høy. Enten trenger du å oppgradere Bitmessaage-programvaren eller så er det fordi kontakten din har funnet på noe smart.
+
+ Feil: Typenummeret for adressen {0} er for høy. Enten trenger du å oppgradere Bitmessaage-programvaren eller så er det fordi kontakten din har funnet på noe smart.
-
- Feil: Noen av de kodede dataene i adressen %1 er for korte. Det kan hende det er noe galt med programvaren til kontakten din.
+
+ Feil: Noen av de kodede dataene i adressen {0} er for korte. Det kan hende det er noe galt med programvaren til kontakten din.
-
- Feil: Noen av de kodede dataene i adressen %1 er for lange. Det kan hende det er noe galt med programvaren til kontakten din.
+
+ Feil: Noen av de kodede dataene i adressen {0} er for lange. Det kan hende det er noe galt med programvaren til kontakten din.
-
+
-
- Feil: Noe er galt med adressen %1.
+
+ Feil: Noe er galt med adressen {0}.
@@ -562,8 +562,8 @@ Det er viktig at du tar sikkerhetskopi av denne filen. Vil du åpne denne filen
-
- Angående adressen %1, Bitmessage forstår ikke adressetypenumre for %2. Oppdater Bitmessage til siste versjon.
+
+ Angående adressen {0}, Bitmessage forstår ikke adressetypenumre for {1}. Oppdater Bitmessage til siste versjon.
@@ -572,8 +572,8 @@ Det er viktig at du tar sikkerhetskopi av denne filen. Vil du åpne denne filen
-
- Angående adressen %1, Bitmessage kan ikke håndtere strømnumre for %2. Oppdater Bitmessage til siste utgivelse.
+
+ Angående adressen {0}, Bitmessage kan ikke håndtere strømnumre for {1}. Oppdater Bitmessage til siste utgivelse.
@@ -707,8 +707,8 @@ Det er viktig at du tar sikkerhetskopi av denne filen. Vil du åpne denne filen
-
- Bitmessage kan ikke finne adressen %1. Kanskje du fjernet den?
+
+ Bitmessage kan ikke finne adressen {0}. Kanskje du fjernet den?
@@ -861,8 +861,8 @@ Are you sure you want to delete the channel?
-
- Du benytter TCP-port %1. (Dette kan endres på i innstillingene).
+
+ Du benytter TCP-port {0}. (Dette kan endres på i innstillingene).
@@ -1056,8 +1056,8 @@ Are you sure you want to delete the channel?
-
- Zoom nivå %1%
+
+ Zoom nivå {0}%
@@ -1071,47 +1071,47 @@ Are you sure you want to delete the channel?
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1132,7 +1132,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1152,12 +1152,12 @@ Are you sure you want to delete the channel?
-
+
-
+
@@ -1167,7 +1167,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1192,7 +1192,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1212,7 +1212,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1224,17 +1224,17 @@ There is no required difficulty for version 2 addresses like this.
+Receiver's required difficulty: {0} and {1}
-
+
-
+
@@ -1244,7 +1244,7 @@ Receiver's required difficulty: %1 and %2
-
+
@@ -1259,12 +1259,12 @@ Receiver's required difficulty: %1 and %2
-
+
-
+
@@ -1627,27 +1627,27 @@ The 'Random Number' option is selected by default but deterministic ad
-
- Siden oppstart på %1
+
+ Siden oppstart på {0}
-
- Ned: %1/s Totalt: %2
+
+ Ned: {0}/s Totalt: {1}
-
- Opp: %1/s Totalt: %2
+
+ Opp: {0}/s Totalt: {1}
-
- Antall tilkoblinger: %1
+
+ Antall tilkoblinger: {0}
-
+
diff --git a/src/translations/bitmessage_pl.qm b/src/translations/bitmessage_pl.qm
index fb31e8d5..215ad8cf 100644
Binary files a/src/translations/bitmessage_pl.qm and b/src/translations/bitmessage_pl.qm differ
diff --git a/src/translations/bitmessage_pl.ts b/src/translations/bitmessage_pl.ts
index 89c6162e..ee8a3e89 100644
--- a/src/translations/bitmessage_pl.ts
+++ b/src/translations/bitmessage_pl.ts
@@ -354,8 +354,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Jeden z adresów, %1, jest starym adresem wersji 1. Adresy tej wersji nie są już wspierane. Usunąć go?
+
+ Jeden z adresów, {0}, jest starym adresem wersji 1. Adresy tej wersji nie są już wspierane. Usunąć go?
@@ -374,13 +374,13 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Wiadomość wysłana. Oczekiwanie na potwierdzenie odbioru. Wysłano o %1
+
+ Wiadomość wysłana. Oczekiwanie na potwierdzenie odbioru. Wysłano o {0}
-
- Wiadomość wysłana. Wysłano o %1
+
+ Wiadomość wysłana. Wysłano o {0}
@@ -389,8 +389,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Otrzymano potwierdzenie odbioru wiadomości %1
+
+ Otrzymano potwierdzenie odbioru wiadomości {0}
@@ -399,18 +399,18 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Wysłana o %1
+
+ Wysłana o {0}
-
- Problem: dowód pracy wymagany przez odbiorcę jest trudniejszy niż zaakceptowany przez Ciebie. %1
+
+ Problem: dowód pracy wymagany przez odbiorcę jest trudniejszy niż zaakceptowany przez Ciebie. {0}
-
- Problem: klucz szyfrujący odbiorcy jest nieprawidłowy. Nie można zaszyfrować wiadomości. %1
+
+ Problem: klucz szyfrujący odbiorcy jest nieprawidłowy. Nie można zaszyfrować wiadomości. {0}
@@ -419,8 +419,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Nieznany status: %1 %2
+
+ Nieznany status: {0} {1}
@@ -460,10 +460,10 @@ Please type the desired email address (including @mailchuck.com) below:
Możesz zarządzać swoimi kluczami edytując plik keys.dat znajdujący się
-%1
+{0}
Zaleca się zrobienie kopii zapasowej tego pliku.
@@ -479,10 +479,10 @@ Zaleca się zrobienie kopii zapasowej tego pliku.
Możesz zarządzać swoimi kluczami edytując plik keys.dat znajdujący się
-%1
+{0}
Zaleca się zrobienie kopii zapasowej tego pliku. Czy chcesz otworzyć ten plik teraz? (Zamknij Bitmessage przed wprowadzeniem jakichkolwiek zmian.)
@@ -547,7 +547,7 @@ Zaleca się zrobienie kopii zapasowej tego pliku. Czy chcesz otworzyć ten plik
-
+
@@ -618,52 +618,52 @@ Zwykle 4-5 dniowy TTL jest odpowiedni.
-
- Wiadomość jest za długa o %1 bajtów (maksymalna długość wynosi 261644 bajty). Przed wysłaniem należy ją skrócić.
+
+ Wiadomość jest za długa o {0} bajtów (maksymalna długość wynosi 261644 bajty). Przed wysłaniem należy ją skrócić.
-
- Błąd: Twoje konto nie było zarejestrowane w bramce poczty. Rejestrowanie jako %1, proszę poczekać na zakończenie procesu przed ponowną próbą wysłania wiadomości.
+
+ Błąd: Twoje konto nie było zarejestrowane w bramce poczty. Rejestrowanie jako {0}, proszę poczekać na zakończenie procesu przed ponowną próbą wysłania wiadomości.
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -678,8 +678,8 @@ Zwykle 4-5 dniowy TTL jest odpowiedni.
-
- Odnośnie adresu %1, Bitmessage nie potrafi odczytać wersji adresu %2. Może uaktualnij Bitmessage do najnowszej wersji.
+
+ Odnośnie adresu {0}, Bitmessage nie potrafi odczytać wersji adresu {1}. Może uaktualnij Bitmessage do najnowszej wersji.
@@ -688,8 +688,8 @@ Zwykle 4-5 dniowy TTL jest odpowiedni.
-
- Odnośnie adresu %1, Bitmessage nie potrafi operować na strumieniu adresu %2. Może uaktualnij Bitmessage do najnowszej wersji.
+
+ Odnośnie adresu {0}, Bitmessage nie potrafi operować na strumieniu adresu {1}. Może uaktualnij Bitmessage do najnowszej wersji.
@@ -823,8 +823,8 @@ Zwykle 4-5 dniowy TTL jest odpowiedni.
-
- Bitmessage nie może odnaleźć Twojego adresu %1. Może go usunąłeś?
+
+ Bitmessage nie może odnaleźć Twojego adresu {0}. Może go usunąłeś?
@@ -981,7 +981,7 @@ Czy na pewno chcesz usunąć ten kanał?
-
+
@@ -1176,8 +1176,8 @@ Czy na pewno chcesz usunąć ten kanał?
-
- Poziom powiększenia %1%
+
+ Poziom powiększenia {0}%
@@ -1191,48 +1191,48 @@ Czy na pewno chcesz usunąć ten kanał?
-
+
-
- Nowa wersja Bitmessage jest dostępna: %1. Pobierz ją z https://github.com/Bitmessage/PyBitmessage/releases/latest
+
+ Nowa wersja Bitmessage jest dostępna: {0}. Pobierz ją z https://github.com/Bitmessage/PyBitmessage/releases/latest
-
- Oczekiwanie na wykonanie dowodu pracy… %1%
+
+ Oczekiwanie na wykonanie dowodu pracy… {0}%
-
- Zamykanie PyBitmessage… %1%
+
+ Zamykanie PyBitmessage… {0}%
-
- Oczekiwanie na wysłanie obiektów… %1%
+
+ Oczekiwanie na wysłanie obiektów… {0}%
-
- Zapisywanie ustawień… %1%
+
+ Zapisywanie ustawień… {0}%
-
- Zamykanie rdzenia programu… %1%
+
+ Zamykanie rdzenia programu… {0}%
-
- Zatrzymywanie powiadomień… %1%
+
+ Zatrzymywanie powiadomień… {0}%
-
- Zaraz zamknę… %1%
+
+ Zaraz zamknę… {0}%
@@ -1246,8 +1246,8 @@ Czy na pewno chcesz usunąć ten kanał?
-
- Zamykanie PyBitmessage… %1%
+
+ Zamykanie PyBitmessage… {0}%
@@ -1266,13 +1266,13 @@ Czy na pewno chcesz usunąć ten kanał?
-
- Generowanie %1 nowych adresów.
+
+ Generowanie {0} nowych adresów.
-
- %1 jest już w 'Twoich tożsamościach'. Nie zostanie tu dodany.
+
+ {0} jest już w 'Twoich tożsamościach'. Nie zostanie tu dodany.
@@ -1281,7 +1281,7 @@ Czy na pewno chcesz usunąć ten kanał?
-
+
@@ -1306,8 +1306,8 @@ Czy na pewno chcesz usunąć ten kanał?
-
- Wysłano: %1
+
+ Wysłano: {0}
@@ -1326,8 +1326,8 @@ Czy na pewno chcesz usunąć ten kanał?
-
- Problem: adres docelowy jest urządzeniem przenośnym, które wymaga, aby adres docelowy był zawarty w wiadomości, ale jest to zabronione w Twoich ustawieniach. %1
+
+ Problem: adres docelowy jest urządzeniem przenośnym, które wymaga, aby adres docelowy był zawarty w wiadomości, ale jest to zabronione w Twoich ustawieniach. {0}
@@ -1339,19 +1339,19 @@ Nie ma wymaganej trudności dla adresów w wersji 2, takich jak ten adres.
+Receiver's required difficulty: {0} and {1}
Wykonywanie dowodu pracy niezbędnego do wysłania wiadomości.
-Odbiorca wymaga trudności: %1 i %2
+Odbiorca wymaga trudności: {0} i {1}
-
- Problem: dowód pracy wymagany przez odbiorcę (%1 i %2) jest trudniejszy niż chciałbyś wykonać. %3
+
+ Problem: dowód pracy wymagany przez odbiorcę ({0} i {1}) jest trudniejszy niż chciałbyś wykonać. {2}
-
- Problem: próbujesz wysłać wiadomość do siebie lub na kanał, ale Twój klucz szyfrujący nie został znaleziony w pliku keys.dat. Nie można zaszyfrować wiadomości. %1
+
+ Problem: próbujesz wysłać wiadomość do siebie lub na kanał, ale Twój klucz szyfrujący nie został znaleziony w pliku keys.dat. Nie można zaszyfrować wiadomości. {0}
@@ -1360,8 +1360,8 @@ Odbiorca wymaga trudności: %1 i %2
-
- Wiadomość wysłana. Oczekiwanie na potwierdzenie odbioru. Wysłano o %1
+
+ Wiadomość wysłana. Oczekiwanie na potwierdzenie odbioru. Wysłano o {0}
@@ -1375,13 +1375,13 @@ Odbiorca wymaga trudności: %1 i %2
-
- Wysyłanie prośby o klucz publiczny. Oczekiwanie na odpowiedź. Zapytano o %1
+
+ Wysyłanie prośby o klucz publiczny. Oczekiwanie na odpowiedź. Zapytano o {0}
-
- Mapowanie portów UPnP wykonano na porcie %1
+
+ Mapowanie portów UPnP wykonano na porcie {0}
@@ -1425,18 +1425,18 @@ Odbiorca wymaga trudności: %1 i %2
-
- Ksywka %1 nie została znaleziona.
+
+ Ksywka {0} nie została znaleziona.
-
- Zapytanie namecoin nie powiodło się (%1)
+
+ Zapytanie namecoin nie powiodło się ({0})
-
- Nieznany typ interfejsu namecoin: %1
+
+ Nieznany typ interfejsu namecoin: {0}
@@ -1445,13 +1445,13 @@ Odbiorca wymaga trudności: %1 i %2
-
- Ksywka %1 nie ma powiązanego adresu Bitmessage.
+
+ Ksywka {0} nie ma powiązanego adresu Bitmessage.
-
- Namecoind wersja %1 działa poprawnie!
+
+ Namecoind wersja {0} działa poprawnie!
@@ -1514,53 +1514,53 @@ Witamy w przyjaznym i bezpiecznym Bitmessage
-
- Błąd: adresy Bitmessage zaczynają się od BM-. Proszę sprawdzić adres odbiorcy %1.
+
+ Błąd: adresy Bitmessage zaczynają się od BM-. Proszę sprawdzić adres odbiorcy {0}.
-
- Błąd: adres odbiorcy %1 nie został skopiowany lub przepisany poprawnie. Proszę go sprawdzić.
+
+ Błąd: adres odbiorcy {0} nie został skopiowany lub przepisany poprawnie. Proszę go sprawdzić.
-
- Błąd: adres odbiorcy %1 zawiera nieprawidłowe znaki. Proszę go sprawdzić.
+
+ Błąd: adres odbiorcy {0} zawiera nieprawidłowe znaki. Proszę go sprawdzić.
-
- Błąd: wersja adresu odbiorcy %1 jest za wysoka. Musisz albo zaktualizować Twoje oprogramowanie Bitmessage, albo twój znajomy Cię trolluje.
+
+ Błąd: wersja adresu odbiorcy {0} jest za wysoka. Musisz albo zaktualizować Twoje oprogramowanie Bitmessage, albo twój znajomy Cię trolluje.
-
- Błąd: niektóre dane zakodowane w adresie odbiorcy %1 są zbyt krótkie. Być może coś nie działa należycie w programie Twojego znajomego.
+
+ Błąd: niektóre dane zakodowane w adresie odbiorcy {0} są zbyt krótkie. Być może coś nie działa należycie w programie Twojego znajomego.
-
- Błąd: niektóre dane zakodowane w adresie odbiorcy %1 są zbyt długie. Być może coś nie działa należycie w programie Twojego znajomego.
+
+ Błąd: niektóre dane zakodowane w adresie odbiorcy {0} są zbyt długie. Być może coś nie działa należycie w programie Twojego znajomego.
-
- Błąd: niektóre dane zakodowane w adresie odbiorcy %1 są uszkodzone. Być może coś nie działa należycie w programie Twojego znajomego.
+
+ Błąd: niektóre dane zakodowane w adresie odbiorcy {0} są uszkodzone. Być może coś nie działa należycie w programie Twojego znajomego.
-
- Błąd: coś jest nie tak z adresem odbiorcy %1.
+
+ Błąd: coś jest nie tak z adresem odbiorcy {0}.
-
- Błąd: %1
+
+ Błąd: {0}
-
- Od %1
+
+ Od {0}
@@ -1672,8 +1672,8 @@ Witamy w przyjaznym i bezpiecznym Bitmessage
-
- Odnośnik "%1" zostanie otwarty w przeglądarce. Może to spowodować zagrożenie bezpieczeństwa, może on ujawnić Twoją anonimowość lub pobrać złośliwe dane. Czy jesteś pewien?
+
+ Odnośnik "{0}" zostanie otwarty w przeglądarce. Może to spowodować zagrożenie bezpieczeństwa, może on ujawnić Twoją anonimowość lub pobrać złośliwe dane. Czy jesteś pewien?
@@ -2008,8 +2008,8 @@ Generowanie adresów „losowych” jest wybrane domyślnie, jednak deterministy
-
- Btimessage używa portu TCP %1. (Można go zmienić w ustawieniach).
+
+ Btimessage używa portu TCP {0}. (Można go zmienić w ustawieniach).
@@ -2061,28 +2061,28 @@ Generowanie adresów „losowych” jest wybrane domyślnie, jednak deterministy
-
- Od startu programu o %1
+
+ Od startu programu o {0}
-
- Pobieranie: %1/s W całości: %2
+
+ Pobieranie: {0}/s W całości: {1}
-
- Wysyłanie: %1/s W całości: %2
+
+ Wysyłanie: {0}/s W całości: {1}
-
- Wszystkich połączeń: %1
+
+ Wszystkich połączeń: {0}
-
- Zapytań o elementy na sekundę: %1
+
+ Zapytań o elementy na sekundę: {0}
@@ -2247,8 +2247,8 @@ Generowanie adresów „losowych” jest wybrane domyślnie, jednak deterministy
newchandialog
-
- Pomyślnie utworzono / dołączono do kanału %1
+
+ Pomyślnie utworzono / dołączono do kanału {0}
diff --git a/src/translations/bitmessage_pt.qm b/src/translations/bitmessage_pt.qm
index 9c6b3402..6a8aed93 100644
Binary files a/src/translations/bitmessage_pt.qm and b/src/translations/bitmessage_pt.qm differ
diff --git a/src/translations/bitmessage_pt.ts b/src/translations/bitmessage_pt.ts
index 8c43b926..7aeed231 100644
--- a/src/translations/bitmessage_pt.ts
+++ b/src/translations/bitmessage_pt.ts
@@ -241,7 +241,7 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
@@ -261,12 +261,12 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Mensagem enviada. Aguardando confirmação. Enviada a %1
+
+ Mensagem enviada. Aguardando confirmação. Enviada a {0}
-
+
Mensagem enviada. Enviada a 1%
@@ -276,7 +276,7 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
@@ -286,17 +286,17 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
-
+
-
+
@@ -306,7 +306,7 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
@@ -347,7 +347,7 @@ Please type the desired email address (including @mailchuck.com) below:
@@ -364,7 +364,7 @@ It is important that you back up this file.
@@ -430,7 +430,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -498,52 +498,52 @@ It is important that you back up this file. Would you like to open the file now?
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -558,7 +558,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -568,7 +568,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -703,7 +703,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -857,7 +857,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1052,7 +1052,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1067,47 +1067,47 @@ Are you sure you want to delete the channel?
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1128,7 +1128,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1148,12 +1148,12 @@ Are you sure you want to delete the channel?
-
+
-
+
@@ -1163,7 +1163,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1188,7 +1188,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1208,7 +1208,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1220,17 +1220,17 @@ There is no required difficulty for version 2 addresses like this.
+Receiver's required difficulty: {0} and {1}
-
+
-
+
@@ -1240,7 +1240,7 @@ Receiver's required difficulty: %1 and %2
-
+
@@ -1255,12 +1255,12 @@ Receiver's required difficulty: %1 and %2
-
+
-
+
@@ -1622,27 +1622,27 @@ The 'Random Number' option is selected by default but deterministic ad
-
+
-
+
-
+
-
+
-
+
diff --git a/src/translations/bitmessage_ru.qm b/src/translations/bitmessage_ru.qm
index 8c0269b9..2642035b 100644
Binary files a/src/translations/bitmessage_ru.qm and b/src/translations/bitmessage_ru.qm differ
diff --git a/src/translations/bitmessage_ru.ts b/src/translations/bitmessage_ru.ts
index 4a80f62e..0fac3766 100644
--- a/src/translations/bitmessage_ru.ts
+++ b/src/translations/bitmessage_ru.ts
@@ -314,8 +314,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Один из Ваших адресов, %1, является устаревшим адресом версии 1. Адреса версии 1 больше не поддерживаются. Хотите ли Вы удалить его сейчас?
+
+ Один из Ваших адресов, {0}, является устаревшим адресом версии 1. Адреса версии 1 больше не поддерживаются. Хотите ли Вы удалить его сейчас?
@@ -334,13 +334,13 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Сообщение отправлено. Ожидаем подтверждения. Отправлено в %1
+
+ Сообщение отправлено. Ожидаем подтверждения. Отправлено в {0}
-
- Сообщение отправлено в %1
+
+ Сообщение отправлено в {0}
@@ -349,8 +349,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Доставлено в %1
+
+ Доставлено в {0}
@@ -359,18 +359,18 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Рассылка на %1
+
+ Рассылка на {0}
-
- Проблема: Ваш получатель требует более сложных вычислений, чем максимум, указанный в Ваших настройках. %1
+
+ Проблема: Ваш получатель требует более сложных вычислений, чем максимум, указанный в Ваших настройках. {0}
-
- Проблема: ключ получателя неправильный. Невозможно зашифровать сообщение. %1
+
+ Проблема: ключ получателя неправильный. Невозможно зашифровать сообщение. {0}
@@ -379,8 +379,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Неизвестный статус: %1 %2
+
+ Неизвестный статус: {0} {1}
@@ -421,10 +421,10 @@ Please type the desired email address (including @mailchuck.com) below:
Вы можете управлять Вашими ключами, редактируя файл keys.dat, находящийся в
- %1
+ {0}
Создайте резервную копию этого файла перед тем как будете его редактировать.
@@ -442,7 +442,7 @@ It is important that you back up this file.
@@ -508,7 +508,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -579,52 +579,52 @@ It is important that you back up this file. Would you like to open the file now?
-
- Сообщение, которое вы пытаетесь отправить, длиннее максимально допустимого на %1 байт. (Максимально допустимое значение 261644 байта). Пожалуйста, сократите сообщение перед отправкой.
+
+ Сообщение, которое вы пытаетесь отправить, длиннее максимально допустимого на {0} байт. (Максимально допустимое значение 261644 байта). Пожалуйста, сократите сообщение перед отправкой.
-
- Ошибка: ваш аккаунт не зарегистрирован на Email-шлюзе. Отправка регистрации %1, пожалуйста, подождите пока процесс регистрации не завершится, прежде чем попытаться отправить сообщение заново.
+
+ Ошибка: ваш аккаунт не зарегистрирован на Email-шлюзе. Отправка регистрации {0}, пожалуйста, подождите пока процесс регистрации не завершится, прежде чем попытаться отправить сообщение заново.
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -639,8 +639,8 @@ It is important that you back up this file. Would you like to open the file now?
-
- По поводу адреса %1: Bitmessage не поддерживает адреса версии %2. Возможно вам нужно обновить клиент Bitmessage.
+
+ По поводу адреса {0}: Bitmessage не поддерживает адреса версии {1}. Возможно вам нужно обновить клиент Bitmessage.
@@ -649,8 +649,8 @@ It is important that you back up this file. Would you like to open the file now?
-
- По поводу адреса %1: Bitmessage не поддерживает поток номер %2. Возможно вам нужно обновить клиент Bitmessage.
+
+ По поводу адреса {0}: Bitmessage не поддерживает поток номер {1}. Возможно вам нужно обновить клиент Bitmessage.
@@ -784,8 +784,8 @@ It is important that you back up this file. Would you like to open the file now?
-
- Bitmessage не может найти Ваш адрес %1. Возможно Вы удалили его?
+
+ Bitmessage не может найти Ваш адрес {0}. Возможно Вы удалили его?
@@ -942,7 +942,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1137,8 +1137,8 @@ Are you sure you want to delete the channel?
-
- Увеличение %1%
+
+ Увеличение {0}%
@@ -1152,48 +1152,48 @@ Are you sure you want to delete the channel?
-
+
-
- Доступна новая версия PyBitmessage: %1. Загрузите её: https://github.com/Bitmessage/PyBitmessage/releases/latest
+
+ Доступна новая версия PyBitmessage: {0}. Загрузите её: https://github.com/Bitmessage/PyBitmessage/releases/latest
-
- Ожидание окончания PoW... %1%
+
+ Ожидание окончания PoW... {0}%
-
- Завершение PyBitmessage... %1%
+
+ Завершение PyBitmessage... {0}%
-
- Ожидание отправки объектов... %1%
+
+ Ожидание отправки объектов... {0}%
-
- Сохранение настроек... %1%
+
+ Сохранение настроек... {0}%
-
- Завершение работы ядра... %1%
+
+ Завершение работы ядра... {0}%
-
- Остановка сервиса уведомлений... %1%
+
+ Остановка сервиса уведомлений... {0}%
-
- Завершение вот-вот произойдет... %1%
+
+ Завершение вот-вот произойдет... {0}%
@@ -1207,8 +1207,8 @@ Are you sure you want to delete the channel?
-
- Завершение PyBitmessage... %1%
+
+ Завершение PyBitmessage... {0}%
@@ -1227,13 +1227,13 @@ Are you sure you want to delete the channel?
-
- Создание %1 новых адресов.
+
+ Создание {0} новых адресов.
-
- %1 уже имеется в ваших адресах. Не добавляю его снова.
+
+ {0} уже имеется в ваших адресах. Не добавляю его снова.
@@ -1242,7 +1242,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1267,8 +1267,8 @@ Are you sure you want to delete the channel?
-
- Рассылка отправлена на %1
+
+ Рассылка отправлена на {0}
@@ -1287,8 +1287,8 @@ Are you sure you want to delete the channel?
-
- Проблема: адресат является мобильным устройством, которое требует, чтобы адрес назначения был включен в сообщение, однако, это запрещено в ваших настройках. %1
+
+ Проблема: адресат является мобильным устройством, которое требует, чтобы адрес назначения был включен в сообщение, однако, это запрещено в ваших настройках. {0}
@@ -1300,19 +1300,19 @@ There is no required difficulty for version 2 addresses like this.
+Receiver's required difficulty: {0} and {1}
Выполнение работы, требуемой для отправки сообщения.
-Получатель запросил сложность: %1 и %2
+Получатель запросил сложность: {0} и {1}
-
- Проблема: сложность, затребованная получателем (%1 и %2) гораздо больше, чем вы готовы сделать. %3
+
+ Проблема: сложность, затребованная получателем ({0} и {1}) гораздо больше, чем вы готовы сделать. {2}
-
- Проблема: вы пытаетесь отправить сообщение самому себе или в чан, но ваш ключ шифрования не найден в файле ключей keys.dat. Невозможно зашифровать сообщение. %1
+
+ Проблема: вы пытаетесь отправить сообщение самому себе или в чан, но ваш ключ шифрования не найден в файле ключей keys.dat. Невозможно зашифровать сообщение. {0}
@@ -1321,8 +1321,8 @@ Receiver's required difficulty: %1 and %2
-
- Отправлено. Ожидаем подтверждения. Отправлено в %1
+
+ Отправлено. Ожидаем подтверждения. Отправлено в {0}
@@ -1336,13 +1336,13 @@ Receiver's required difficulty: %1 and %2
-
- Отправка запроса открытого ключа шифрования. Ожидание ответа. Запрошено в %1
+
+ Отправка запроса открытого ключа шифрования. Ожидание ответа. Запрошено в {0}
-
- Распределение портов UPnP завершилось выделением порта %1
+
+ Распределение портов UPnP завершилось выделением порта {0}
@@ -1386,13 +1386,13 @@ Receiver's required difficulty: %1 and %2
-
- Имя %1 не найдено.
+
+ Имя {0} не найдено.
-
- Запрос к namecoin не удался (%1).
+
+ Запрос к namecoin не удался ({0}).
@@ -1401,18 +1401,18 @@ Receiver's required difficulty: %1 and %2
-
- Имя %1 не содержит корректных данных JSON.
+
+ Имя {0} не содержит корректных данных JSON.
-
- Имя %1 не имеет связанного адреса Bitmessage.
+
+ Имя {0} не имеет связанного адреса Bitmessage.
-
- Успех! Namecoind версии %1 работает.
+
+ Успех! Namecoind версии {0} работает.
@@ -1475,53 +1475,53 @@ Receiver's required difficulty: %1 and %2
-
- Ошибка: адреса Bitmessage начинаются с "BM-". Пожалуйста, проверьте адрес получателя %1.
+
+ Ошибка: адреса Bitmessage начинаются с "BM-". Пожалуйста, проверьте адрес получателя {0}.
-
- Ошибка: адрес получателя %1 набран или скопирован неправильно. Пожалуйста, проверьте его.
+
+ Ошибка: адрес получателя {0} набран или скопирован неправильно. Пожалуйста, проверьте его.
-
- Ошибка: адрес получателя %1 содержит недопустимые символы. Пожалуйста, проверьте его.
+
+ Ошибка: адрес получателя {0} содержит недопустимые символы. Пожалуйста, проверьте его.
-
- Ошибка: версия адреса получателя %1 слишком высокая. Либо вам нужно обновить программу Bitmessage, либо ваш знакомый - умник.
+
+ Ошибка: версия адреса получателя {0} слишком высокая. Либо вам нужно обновить программу Bitmessage, либо ваш знакомый - умник.
-
- Ошибка: часть данных, закодированных в адресе получателя %1 слишком короткая. Видимо, что-то не так с программой, используемой вашим знакомым.
+
+ Ошибка: часть данных, закодированных в адресе получателя {0} слишком короткая. Видимо, что-то не так с программой, используемой вашим знакомым.
-
- Ошибка: часть данных, закодированных в адресе получателя %1 слишком длинная. Видимо, что-то не так с программой, используемой вашим знакомым.
+
+ Ошибка: часть данных, закодированных в адресе получателя {0} слишком длинная. Видимо, что-то не так с программой, используемой вашим знакомым.
-
- Ошибка: часть данных, закодированных в адресе получателя %1 сформирована неправильно. Видимо, что-то не так с программой, используемой вашим знакомым.
+
+ Ошибка: часть данных, закодированных в адресе получателя {0} сформирована неправильно. Видимо, что-то не так с программой, используемой вашим знакомым.
-
- Ошибка: что-то не так с адресом получателя %1.
+
+ Ошибка: что-то не так с адресом получателя {0}.
-
- Ошибка: %1
+
+ Ошибка: {0}
-
- От %1
+
+ От {0}
@@ -1566,7 +1566,7 @@ Receiver's required difficulty: %1 and %2
- Показать %1 прошлую рассылку с этого адреса.Показать %1 прошлых рассылки с этого адреса.Показать %1 прошлых рассылок с этого адреса.Показать %1 прошлых рассылок с этого адреса.
+ Показать {0} прошлую рассылку с этого адреса.Показать {0} прошлых рассылки с этого адреса.Показать {0} прошлых рассылок с этого адреса.Показать {0} прошлых рассылок с этого адреса.
@@ -1613,8 +1613,8 @@ Receiver's required difficulty: %1 and %2
-
- Ссылка "%1" откроется в браузере. Это может быть угрозой безопасности, например деанонимизировать вас или привести к скачиванию вредоносных данных. Вы уверены?
+
+ Ссылка "{0}" откроется в браузере. Это может быть угрозой безопасности, например деанонимизировать вас или привести к скачиванию вредоносных данных. Вы уверены?
@@ -1948,8 +1948,8 @@ The 'Random Number' option is selected by default but deterministic ad
-
- Вы используете TCP порт %1. (Его можно поменять в настройках).
+
+ Вы используете TCP порт {0}. (Его можно поменять в настройках).
@@ -2001,28 +2001,28 @@ The 'Random Number' option is selected by default but deterministic ad
-
- С начала работы, %1
+
+ С начала работы, {0}
-
- Загрузка: %1/s Всего: %2
+
+ Загрузка: {0}/s Всего: {1}
-
- Отправка: %1/s Всего: %2
+
+ Отправка: {0}/s Всего: {1}
-
- Всего соединений: %1
+
+ Всего соединений: {0}
-
- Поисков в каталоге в секунду: %1
+
+ Поисков в каталоге в секунду: {0}
@@ -2187,8 +2187,8 @@ The 'Random Number' option is selected by default but deterministic ad
newchandialog
-
- Успешно создан / подключен чан %1
+
+ Успешно создан / подключен чан {0}
diff --git a/src/translations/bitmessage_sk.qm b/src/translations/bitmessage_sk.qm
index 26c2a24d..b963125f 100644
Binary files a/src/translations/bitmessage_sk.qm and b/src/translations/bitmessage_sk.qm differ
diff --git a/src/translations/bitmessage_sk.ts b/src/translations/bitmessage_sk.ts
index 8c3b0209..c80d23dd 100644
--- a/src/translations/bitmessage_sk.ts
+++ b/src/translations/bitmessage_sk.ts
@@ -311,8 +311,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Jedna z vašich adries, %1, je stará verzia adresy, 1. Verzie adresy 1 už nie sú podporované. Odstrániť ju teraz?
+
+ Jedna z vašich adries, {0}, je stará verzia adresy, 1. Verzie adresy 1 už nie sú podporované. Odstrániť ju teraz?
@@ -331,13 +331,13 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Správa odoslaná. Čakanie na potvrdenie. Odoslaná %1
+
+ Správa odoslaná. Čakanie na potvrdenie. Odoslaná {0}
-
- Správa odoslaná. Odoslaná %1
+
+ Správa odoslaná. Odoslaná {0}
@@ -346,8 +346,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Potvrdenie prijatia správy %1
+
+ Potvrdenie prijatia správy {0}
@@ -356,18 +356,18 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
Rozoslané 1%
-
- Problém: práca požadovná príjemcom je oveľa ťažšia, než je povolené v nastaveniach. %1
+
+ Problém: práca požadovná príjemcom je oveľa ťažšia, než je povolené v nastaveniach. {0}
-
- Problém: šifrovací kľúč príjemcu je nesprávny. Nie je možné zašifrovať správu. %1
+
+ Problém: šifrovací kľúč príjemcu je nesprávny. Nie je možné zašifrovať správu. {0}
@@ -376,8 +376,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- Neznámy stav: %1 %2
+
+ Neznámy stav: {0} {1}
@@ -417,10 +417,10 @@ Please type the desired email address (including @mailchuck.com) below:
Kľúče môžete spravovať úpravou súboru keys.dat, ktorý je uložený v adresári
-%1
+{0}
Tento súbor je dôležité zálohovať.
@@ -436,10 +436,10 @@ Tento súbor je dôležité zálohovať.
Kľúče môžete spravovať úpravou súboru keys.dat, ktorý je uložený v adresári
-%1
+{0}
Tento súbor je dôležité zálohovať. Chcete tento súbor teraz otvoriť? (Nezabudnite zatvoriť Bitmessage pred vykonaním akýchkoľvek zmien.)
@@ -504,7 +504,7 @@ Tento súbor je dôležité zálohovať. Chcete tento súbor teraz otvoriť? (Ne
-
+
@@ -572,52 +572,52 @@ Tento súbor je dôležité zálohovať. Chcete tento súbor teraz otvoriť? (Ne
-
- Správa, ktorú skúšate poslať, má %1 bajtov naviac. (Maximum je 261 644 bajtov). Prosím pred odoslaním skrátiť.
+
+ Správa, ktorú skúšate poslať, má {0} bajtov naviac. (Maximum je 261 644 bajtov). Prosím pred odoslaním skrátiť.
-
- Chyba: Váš účet nebol registrovaný na e-mailovej bráne. Skúšam registrovať ako %1, prosím počkajte na spracovanie registrácie pred opakovaným odoslaním správy.
+
+ Chyba: Váš účet nebol registrovaný na e-mailovej bráne. Skúšam registrovať ako {0}, prosím počkajte na spracovanie registrácie pred opakovaným odoslaním správy.
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -632,8 +632,8 @@ Tento súbor je dôležité zálohovať. Chcete tento súbor teraz otvoriť? (Ne
-
- Čo sa týka adresy %1, Bitmessage nepozná číslo verzie adresy %2. Možno by ste mali upgradenúť Bitmessage na najnovšiu verziu.
+
+ Čo sa týka adresy {0}, Bitmessage nepozná číslo verzie adresy {1}. Možno by ste mali upgradenúť Bitmessage na najnovšiu verziu.
@@ -642,8 +642,8 @@ Tento súbor je dôležité zálohovať. Chcete tento súbor teraz otvoriť? (Ne
-
- Čo sa týka adresy %1, Bitmessage nespracováva číslo prúdu %2. Možno by ste mali upgradenúť Bitmessage na najnovšiu verziu.
+
+ Čo sa týka adresy {0}, Bitmessage nespracováva číslo prúdu {1}. Možno by ste mali upgradenúť Bitmessage na najnovšiu verziu.
@@ -777,8 +777,8 @@ Tento súbor je dôležité zálohovať. Chcete tento súbor teraz otvoriť? (Ne
-
- Bitmessage nemôže nájsť vašu adresu %1. Možno ste ju odstránili?
+
+ Bitmessage nemôže nájsť vašu adresu {0}. Možno ste ju odstránili?
@@ -935,7 +935,7 @@ Ste si istý, že chcete kanál odstrániť?
-
+
@@ -1130,8 +1130,8 @@ Ste si istý, že chcete kanál odstrániť?
-
- Úroveň priblíženia %1%
+
+ Úroveň priblíženia {0}%
@@ -1145,48 +1145,48 @@ Ste si istý, že chcete kanál odstrániť?
-
+
-
- K dispozícii je nová verzia PyBitmessage: %1. Môžete ju stiahnuť na https://github.com/Bitmessage/PyBitmessage/releases/latest
+
+ K dispozícii je nová verzia PyBitmessage: {0}. Môžete ju stiahnuť na https://github.com/Bitmessage/PyBitmessage/releases/latest
-
- Čakám na ukončenie práce... %1%
+
+ Čakám na ukončenie práce... {0}%
-
- Ukončujem PyBitmessage... %1%
+
+ Ukončujem PyBitmessage... {0}%
-
- Čakám na odoslanie objektov... %1%
+
+ Čakám na odoslanie objektov... {0}%
-
- Ukladám nastavenia... %1%
+
+ Ukladám nastavenia... {0}%
-
- Ukončujem jadro... %1%
+
+ Ukončujem jadro... {0}%
-
- Zastavujem oznámenia... %1%
+
+ Zastavujem oznámenia... {0}%
-
- Posledná fáza ukončenia... %1%
+
+ Posledná fáza ukončenia... {0}%
@@ -1200,8 +1200,8 @@ Ste si istý, že chcete kanál odstrániť?
-
- Ukončujem PyBitmessage... %1%
+
+ Ukončujem PyBitmessage... {0}%
@@ -1220,13 +1220,13 @@ Ste si istý, že chcete kanál odstrániť?
-
- Vytváram %1 nových adries.
+
+ Vytváram {0} nových adries.
-
- %1 sa už nachádza medzi vášmi identitami, nepridávam dvojmo.
+
+ {0} sa už nachádza medzi vášmi identitami, nepridávam dvojmo.
@@ -1235,7 +1235,7 @@ Ste si istý, že chcete kanál odstrániť?
-
+
@@ -1260,8 +1260,8 @@ Ste si istý, že chcete kanál odstrániť?
-
- Rozoslané %1
+
+ Rozoslané {0}
@@ -1280,8 +1280,8 @@ Ste si istý, že chcete kanál odstrániť?
-
- Problém: adresa príjemcu je na mobilnom zariadení a požaduje, aby správy obsahovali nezašifrovanú adresu príjemcu. Vaše nastavenia však túto možnost nemajú povolenú. %1
+
+ Problém: adresa príjemcu je na mobilnom zariadení a požaduje, aby správy obsahovali nezašifrovanú adresu príjemcu. Vaše nastavenia však túto možnost nemajú povolenú. {0}
@@ -1293,19 +1293,19 @@ Adresy verzie dva, ako táto, nepožadujú obtiažnosť.
+Receiver's required difficulty: {0} and {1}
Vykonávam prácu potrebnú na odoslanie správy.
-Priímcova požadovaná obtiažnosť: %1 a %2
+Priímcova požadovaná obtiažnosť: {0} a {1}
-
- Problém: Práca požadovná príjemcom (%1 a %2) je obtiažnejšia, ako máte povolené. %3
+
+ Problém: Práca požadovná príjemcom ({0} a {1}) je obtiažnejšia, ako máte povolené. {2}
-
- Problém: skúšate odslať správu sami sebe, ale nemôžem nájsť šifrovací kľúč v súbore keys.dat. Nemožno správu zašifrovať: %1
+
+ Problém: skúšate odslať správu sami sebe, ale nemôžem nájsť šifrovací kľúč v súbore keys.dat. Nemožno správu zašifrovať: {0}
@@ -1314,8 +1314,8 @@ Priímcova požadovaná obtiažnosť: %1 a %2
-
- Správa odoslaná. Čakanie na potvrdenie. Odoslaná %1
+
+ Správa odoslaná. Čakanie na potvrdenie. Odoslaná {0}
@@ -1329,13 +1329,13 @@ Priímcova požadovaná obtiažnosť: %1 a %2
-
- Odosielam požiadavku na verejný kľúč. Čakám na odpoveď. Vyžiadaný %1
+
+ Odosielam požiadavku na verejný kľúč. Čakám na odpoveď. Vyžiadaný {0}
-
- Mapovanie portov UPnP vytvorené na porte %1
+
+ Mapovanie portov UPnP vytvorené na porte {0}
@@ -1379,28 +1379,28 @@ Priímcova požadovaná obtiažnosť: %1 a %2
-
- Problém komunikácie s proxy: %1. Prosím skontrolujte nastavenia siete.
+
+ Problém komunikácie s proxy: {0}. Prosím skontrolujte nastavenia siete.
-
- Problém autentikácie SOCKS5: %1. Prosím skontrolujte nastavenia SOCKS5.
+
+ Problém autentikácie SOCKS5: {0}. Prosím skontrolujte nastavenia SOCKS5.
-
- Čas na vašom počítači, %1, možno nie je správny. Prosím, skontrolujete nastavenia.
+
+ Čas na vašom počítači, {0}, možno nie je správny. Prosím, skontrolujete nastavenia.
-
+
Meno % nenájdené.
-
- Dotaz prostredníctvom namecoinu zlyhal (%1)
+
+ Dotaz prostredníctvom namecoinu zlyhal ({0})
@@ -1409,18 +1409,18 @@ Priímcova požadovaná obtiažnosť: %1 a %2
-
- Meno %1 neobsahuje planté JSON dáta.
+
+ Meno {0} neobsahuje planté JSON dáta.
-
- Meno %1 nemá priradenú žiadnu adresu Bitmessage.
+
+ Meno {0} nemá priradenú žiadnu adresu Bitmessage.
-
- Úspech! Namecoind verzia %1 spustený.
+
+ Úspech! Namecoind verzia {0} spustený.
@@ -1479,53 +1479,53 @@ Vitajte v jednoduchom a bezpečnom Bitmessage
-
- Chyba: Bitmessage adresy začínajú s BM- Prosím skontrolujte adresu príjemcu %1
+
+ Chyba: Bitmessage adresy začínajú s BM- Prosím skontrolujte adresu príjemcu {0}
-
- Chyba: adresa príjemcu %1 nie je na správne napísaná alebo skopírovaná. Prosím skontrolujte ju.
+
+ Chyba: adresa príjemcu {0} nie je na správne napísaná alebo skopírovaná. Prosím skontrolujte ju.
-
- Chyba: adresa príjemcu %1 obsahuje neplatné znaky. Prosím skontrolujte ju.
+
+ Chyba: adresa príjemcu {0} obsahuje neplatné znaky. Prosím skontrolujte ju.
-
- Chyba: verzia adresy príjemcu %1 je príliš veľká. Buď musíte aktualizovať program Bitmessage alebo váš známy s vami žartuje.
+
+ Chyba: verzia adresy príjemcu {0} je príliš veľká. Buď musíte aktualizovať program Bitmessage alebo váš známy s vami žartuje.
-
- Chyba: niektoré údaje zakódované v adrese príjemcu %1 sú príliš krátke. Softér vášho známeho možno nefunguje správne.
+
+ Chyba: niektoré údaje zakódované v adrese príjemcu {0} sú príliš krátke. Softér vášho známeho možno nefunguje správne.
-
- Chyba: niektoré údaje zakódované v adrese príjemcu %1 sú príliš dlhé. Softvér vášho známeho možno nefunguje správne.
+
+ Chyba: niektoré údaje zakódované v adrese príjemcu {0} sú príliš dlhé. Softvér vášho známeho možno nefunguje správne.
-
- Chyba: niektoré údaje zakódované v adrese príjemcu %1 sú poškodené. Softvér vášho známeho možno nefunguje správne.
+
+ Chyba: niektoré údaje zakódované v adrese príjemcu {0} sú poškodené. Softvér vášho známeho možno nefunguje správne.
-
- Chyba: niečo s adresou príjemcu %1 je nie je v poriadku.
+
+ Chyba: niečo s adresou príjemcu {0} je nie je v poriadku.
-
- Chyba: %1
+
+ Chyba: {0}
-
- Od %1
+
+ Od {0}
@@ -1570,7 +1570,7 @@ Vitajte v jednoduchom a bezpečnom Bitmessage
- Zobraziť poslednú %1 hromadnú správu z tejto adresy.Zobraziť posledné %1 hromadné správy z tejto adresy.Zobraziť posledných %1 hromadných správ z tejto adresy.
+ Zobraziť poslednú {0} hromadnú správu z tejto adresy.Zobraziť posledné {0} hromadné správy z tejto adresy.Zobraziť posledných {0} hromadných správ z tejto adresy.
@@ -1617,8 +1617,8 @@ Vitajte v jednoduchom a bezpečnom Bitmessage
-
- Odkaz "%1" bude otvorený v prehliadači. Tento úkon môže predstavovať bezpečnostné riziko a Vás deanonymizovať, alebo vykonať škodlivú činnost. Ste si istý?
+
+ Odkaz "{0}" bude otvorený v prehliadači. Tento úkon môže predstavovať bezpečnostné riziko a Vás deanonymizovať, alebo vykonať škodlivú činnost. Ste si istý?
@@ -1953,8 +1953,8 @@ Predvoľba je pomocou generátora náhodných čísiel, ale deterministické adr
-
- Používate port TCP %1. (Možno zmeniť v nastaveniach).
+
+ Používate port TCP {0}. (Možno zmeniť v nastaveniach).
@@ -2006,28 +2006,28 @@ Predvoľba je pomocou generátora náhodných čísiel, ale deterministické adr
-
- Od spustenia %1
+
+ Od spustenia {0}
-
- Prijatých: %1/s Spolu: %2
+
+ Prijatých: {0}/s Spolu: {1}
-
- Odoslaných: %1/s Spolu: %2
+
+ Odoslaných: {0}/s Spolu: {1}
-
- Spojení spolu: %1
+
+ Spojení spolu: {0}
-
- Vyhľadaní v inventári za sekundu: %1
+
+ Vyhľadaní v inventári za sekundu: {0}
@@ -2192,8 +2192,8 @@ Predvoľba je pomocou generátora náhodných čísiel, ale deterministické adr
newchandialog
-
- Kanál %1 úspešne vytvorený/pripojený
+
+ Kanál {0} úspešne vytvorený/pripojený
diff --git a/src/translations/bitmessage_sv.ts b/src/translations/bitmessage_sv.ts
index 015546b3..8b854d5d 100644
--- a/src/translations/bitmessage_sv.ts
+++ b/src/translations/bitmessage_sv.ts
@@ -240,7 +240,7 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
@@ -260,12 +260,12 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
-
+
@@ -275,7 +275,7 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
@@ -285,17 +285,17 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
-
+
-
+
@@ -305,7 +305,7 @@ Please type the desired email address (including @mailchuck.com) below:
-
+
@@ -346,7 +346,7 @@ Please type the desired email address (including @mailchuck.com) below:
@@ -363,7 +363,7 @@ It is important that you back up this file.
@@ -429,7 +429,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -497,52 +497,52 @@ It is important that you back up this file. Would you like to open the file now?
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -557,7 +557,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -567,7 +567,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -702,7 +702,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -856,7 +856,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1051,7 +1051,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1066,47 +1066,47 @@ Are you sure you want to delete the channel?
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1121,7 +1121,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1141,12 +1141,12 @@ Are you sure you want to delete the channel?
-
+
-
+
@@ -1156,7 +1156,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1181,7 +1181,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1201,7 +1201,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1213,17 +1213,17 @@ There is no required difficulty for version 2 addresses like this.
+Receiver's required difficulty: {0} and {1}
-
+
-
+
@@ -1233,7 +1233,7 @@ Receiver's required difficulty: %1 and %2
-
+
@@ -1248,12 +1248,12 @@ Receiver's required difficulty: %1 and %2
-
+
-
+
@@ -1601,27 +1601,27 @@ The 'Random Number' option is selected by default but deterministic ad
-
+
-
+
-
+
-
+
-
+
diff --git a/src/translations/bitmessage_zh_cn.ts b/src/translations/bitmessage_zh_cn.ts
index 474f8c6c..534e2f7a 100644
--- a/src/translations/bitmessage_zh_cn.ts
+++ b/src/translations/bitmessage_zh_cn.ts
@@ -352,8 +352,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- 您的地址中的一个, %1,是一个过时的版本1地址. 版本1地址已经不再受到支持了. 我们可以将它删除掉么?
+
+ 您的地址中的一个, {0},是一个过时的版本1地址. 版本1地址已经不再受到支持了. 我们可以将它删除掉么?
@@ -372,13 +372,13 @@ Please type the desired email address (including @mailchuck.com) below:
-
- 消息已经发送. 正在等待回执. 发送于 %1
+
+ 消息已经发送. 正在等待回执. 发送于 {0}
-
- 消息已经发送. 发送于 %1
+
+ 消息已经发送. 发送于 {0}
@@ -387,8 +387,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- 消息的回执已经收到于 %1
+
+ 消息的回执已经收到于 {0}
@@ -397,18 +397,18 @@ Please type the desired email address (including @mailchuck.com) below:
-
- 已经广播于 %1
+
+ 已经广播于 {0}
-
- 错误: 收件人要求的做工量大于我们的最大接受做工量。 %1
+
+ 错误: 收件人要求的做工量大于我们的最大接受做工量。 {0}
-
- 错误: 收件人的加密密钥是无效的。不能加密消息。 %1
+
+ 错误: 收件人的加密密钥是无效的。不能加密消息。 {0}
@@ -417,8 +417,8 @@ Please type the desired email address (including @mailchuck.com) below:
-
- 未知状态: %1 %2
+
+ 未知状态: {0} {1}
@@ -458,9 +458,9 @@ Please type the desired email address (including @mailchuck.com) below:
- 您可以通过编辑储存在 %1 的 keys.dat 来编辑密钥。备份这个文件十分重要。
+ 您可以通过编辑储存在 {0} 的 keys.dat 来编辑密钥。备份这个文件十分重要。
@@ -475,9 +475,9 @@ It is important that you back up this file.
- 您可以通过编辑储存在 %1 的 keys.dat 来编辑密钥。备份这个文件十分重要。您现在想打开这个文件么?(请在进行任何修改前关闭比特信)
+ 您可以通过编辑储存在 {0} 的 keys.dat 来编辑密钥。备份这个文件十分重要。您现在想打开这个文件么?(请在进行任何修改前关闭比特信)
@@ -541,7 +541,7 @@ It is important that you back up this file. Would you like to open the file now?
-
+
@@ -610,52 +610,52 @@ It is important that you back up this file. Would you like to open the file now?
-
+
您正在尝试发送的信息已超过 %1 个字节太长(最大为261644个字节),发送前请先缩短一些。
-
+
错误: 您的帐户没有在电子邮件网关注册。现在发送注册为%1, 注册正在处理请稍候重试发送.
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -670,8 +670,8 @@ It is important that you back up this file. Would you like to open the file now?
-
- 地址 %1 的地址版本号 %2 无法被比特信理解。也许您应该升级您的比特信到最新版本。
+
+ 地址 {0} 的地址版本号 {1} 无法被比特信理解。也许您应该升级您的比特信到最新版本。
@@ -680,8 +680,8 @@ It is important that you back up this file. Would you like to open the file now?
-
- 地址 %1 的节点流序号 %2 无法被比特信所理解。也许您应该升级您的比特信到最新版本。
+
+ 地址 {0} 的节点流序号 {1} 无法被比特信所理解。也许您应该升级您的比特信到最新版本。
@@ -815,8 +815,8 @@ It is important that you back up this file. Would you like to open the file now?
-
- 比特信无法找到您的地址 %1 ,也许您已经把它删掉了?
+
+ 比特信无法找到您的地址 {0} ,也许您已经把它删掉了?
@@ -973,7 +973,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1168,7 +1168,7 @@ Are you sure you want to delete the channel?
-
+
缩放级别%1%
@@ -1183,48 +1183,48 @@ Are you sure you want to delete the channel?
-
+
-
- PyBitmessage的新版本可用: %1. 从https://github.com/Bitmessage/PyBitmessage/releases/latest下载
+
+ PyBitmessage的新版本可用: {0}. 从https://github.com/Bitmessage/PyBitmessage/releases/latest下载
-
- 等待PoW完成...%1%
+
+ 等待PoW完成...{0}%
-
- 关闭Pybitmessage ...%1%
+
+ 关闭Pybitmessage ...{0}%
-
- 等待要发送对象...%1%
+
+ 等待要发送对象...{0}%
-
- 保存设置...%1%
+
+ 保存设置...{0}%
-
- 关闭核心...%1%
+
+ 关闭核心...{0}%
-
- 停止通知...%1%
+
+ 停止通知...{0}%
-
- 关闭即将来临...%1%
+
+ 关闭即将来临...{0}%
@@ -1238,8 +1238,8 @@ Are you sure you want to delete the channel?
-
- 关闭PyBitmessage...%1%
+
+ 关闭PyBitmessage...{0}%
@@ -1258,13 +1258,13 @@ Are you sure you want to delete the channel?
-
- 生成%1个新地址.
+
+ 生成{0}个新地址.
-
- %1已经在'您的身份'. 不必重新添加.
+
+ {0}已经在'您的身份'. 不必重新添加.
@@ -1273,7 +1273,7 @@ Are you sure you want to delete the channel?
-
+
@@ -1298,8 +1298,8 @@ Are you sure you want to delete the channel?
-
- 广播发送%1
+
+ 广播发送{0}
@@ -1318,8 +1318,8 @@ Are you sure you want to delete the channel?
-
- 问题:对方是移动设备,并且对方的地址包含在此消息中,但是您的设置禁止了。 %1
+
+ 问题:对方是移动设备,并且对方的地址包含在此消息中,但是您的设置禁止了。 {0}
@@ -1331,19 +1331,19 @@ There is no required difficulty for version 2 addresses like this.
+Receiver's required difficulty: {0} and {1}
做必要的工作, 以发送短信.
-接收者的要求难度: %1与%2
+接收者的要求难度: {0}与{1}
-
- 问题: 由接收者(%1%2)要求的工作量比您愿意做的工作量來得更困难. %3
+
+ 问题: 由接收者({0}{1})要求的工作量比您愿意做的工作量來得更困难. {2}
-
- 问题: 您正在尝试将信息发送给自己或频道, 但您的加密密钥无法在keys.dat文件中找到. 无法加密信息. %1
+
+ 问题: 您正在尝试将信息发送给自己或频道, 但您的加密密钥无法在keys.dat文件中找到. 无法加密信息. {0}
@@ -1352,8 +1352,8 @@ Receiver's required difficulty: %1 and %2
-
- 信息发送. 等待确认. 已发送%1
+
+ 信息发送. 等待确认. 已发送{0}
@@ -1367,13 +1367,13 @@ Receiver's required difficulty: %1 and %2
-
- 发送公钥的请求. 等待回复. 请求在%1
+
+ 发送公钥的请求. 等待回复. 请求在{0}
-
- UPnP端口映射建立在端口%1
+
+ UPnP端口映射建立在端口{0}
@@ -1417,18 +1417,18 @@ Receiver's required difficulty: %1 and %2
-
- 名字%1未找到。
+
+ 名字{0}未找到。
-
- 域名币查询失败(%1)
+
+ 域名币查询失败({0})
-
- 未知的 Namecoin 界面类型: %1
+
+ 未知的 Namecoin 界面类型: {0}
@@ -1437,13 +1437,13 @@ Receiver's required difficulty: %1 and %2
-
- 名字%1没有关联比特信地址。
+
+ 名字{0}没有关联比特信地址。
-
- 成功!域名币系统%1运行中。
+
+ 成功!域名币系统{0}运行中。
@@ -1506,53 +1506,53 @@ Receiver's required difficulty: %1 and %2
-
- 错误:Bitmessage地址是以BM-开头的,请检查收信地址%1.
+
+ 错误:Bitmessage地址是以BM-开头的,请检查收信地址{0}.
-
- 错误:收信地址%1未填写或复制错误。请检查。
+
+ 错误:收信地址{0}未填写或复制错误。请检查。
-
- 错误:收信地址%1还有非法字符。请检查。
+
+ 错误:收信地址{0}还有非法字符。请检查。
-
- 错误:收信地址 %1 版本太高。要么您需要更新您的软件,要么对方需要降级 。
+
+ 错误:收信地址 {0} 版本太高。要么您需要更新您的软件,要么对方需要降级 。
-
- 错误:收信地址%1编码数据太短。可能对方使用的软件有问题。
+
+ 错误:收信地址{0}编码数据太短。可能对方使用的软件有问题。
-
+
错误:
-
- 错误:收信地址%1编码数据太长。可能对方使用的软件有问题。
+
+ 错误:收信地址{0}编码数据太长。可能对方使用的软件有问题。
-
- 错误:收信地址%1有问题。
+
+ 错误:收信地址{0}有问题。
-
- 错误:%1
+
+ 错误:{0}
-
- 来自 %1
+
+ 来自 {0}
@@ -1664,8 +1664,8 @@ Receiver's required difficulty: %1 and %2
-
- 此链接“%1”将在浏览器中打开。可能会有安全风险,可能会暴露您或下载恶意数据。确定吗?
+
+ 此链接“{0}”将在浏览器中打开。可能会有安全风险,可能会暴露您或下载恶意数据。确定吗?
@@ -1999,8 +1999,8 @@ The 'Random Number' option is selected by default but deterministic ad
-
- 您正在使用TCP端口 %1 。(可以在设置中修改)。
+
+ 您正在使用TCP端口 {0} 。(可以在设置中修改)。
@@ -2052,28 +2052,28 @@ The 'Random Number' option is selected by default but deterministic ad
-
- 自从%1启动
+
+ 自从{0}启动
-
- 下: %1/秒 总计: %2
+
+ 下: {0}/秒 总计: {1}
-
- 上: %1/秒 总计: %2
+
+ 上: {0}/秒 总计: {1}
-
- 总的连接数: %1
+
+ 总的连接数: {0}
-
- 每秒库存查询: %1
+
+ 每秒库存查询: {0}
@@ -2238,8 +2238,8 @@ The 'Random Number' option is selected by default but deterministic ad
newchandialog
-
- 成功创建或加入频道%1
+
+ 成功创建或加入频道{0}
diff --git a/src/translations/noarg.sh b/src/translations/noarg.sh
new file mode 100755
index 00000000..50d45d32
--- /dev/null
+++ b/src/translations/noarg.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+files=`ls *.ts`
+tmp_file=/tmp/noarg.sh.txt
+for file in $files; do
+ cat $file | sed 's/%1/{0}/g' | sed 's/%2/{1}/g' | sed 's/%3/{2}/g' > $tmp_file
+ mv $tmp_file $file
+done
diff --git a/src/translations/update.sh b/src/translations/update.sh
new file mode 100755
index 00000000..b3221486
--- /dev/null
+++ b/src/translations/update.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+lrelease-qt4 bitmessage.pro
diff --git a/src/upnp.py b/src/upnp.py
index 42ff0c6d..ab8bb9ff 100644
--- a/src/upnp.py
+++ b/src/upnp.py
@@ -268,9 +268,12 @@ class uPnPThread(StoppableThread):
with knownnodes.knownNodesLock:
knownnodes.addKnownNode(
1, self_peer, is_self=True)
- queues.UISignalQueue.put(('updateStatusBar', tr._translate(
- "MainWindow", 'UPnP port mapping established on port %1'
- ).arg(str(self.extPort))))
+ queues.UISignalQueue.put((
+ 'updateStatusBar', tr._translate(
+ "MainWindow",
+ "UPnP port mapping established on port {0}"
+ ).format(self.extPort)
+ ))
break
except socket.timeout:
pass
diff --git a/stdeb.cfg b/stdeb.cfg
index 0d4cfbcb..f337a9fe 100644
--- a/stdeb.cfg
+++ b/stdeb.cfg
@@ -2,8 +2,8 @@
Package: pybitmessage
Section: net
Build-Depends: dh-python, libssl-dev, python-all-dev, python-setuptools, python-six
-Depends: openssl, python-setuptools
-Recommends: apparmor, python-msgpack, python-qt4, python-stem, tor
+Depends: openssl, python-setuptools, python-six
+Recommends: apparmor, python-msgpack, python-pyqt5, python-stem, tor
Suggests: python-pyopencl, python-jsonrpclib, python-defusedxml, python-qrcode
Suite: bionic
Setup-Env-Vars: DEB_BUILD_OPTIONS=nocheck