replace remained arg() with format()
This commit is contained in:
parent
218cc9723c
commit
b12c7cd9bb
|
@ -64,8 +64,8 @@ class IconGlossaryDialog(QtWidgets.QDialog):
|
|||
|
||||
self.labelPortNumber.setText(_translate(
|
||||
"iconGlossaryDialog",
|
||||
"You are using TCP port %1. (This can be changed in the settings)."
|
||||
).arg(config.getint('bitmessagesettings', 'port')))
|
||||
"You are using TCP port {0}. (This can be changed in the settings)."
|
||||
).format(config.getint('bitmessagesettings', 'port')))
|
||||
self.setFixedSize(QtWidgets.QWidget.sizeHint(self))
|
||||
|
||||
|
||||
|
|
|
@ -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,8 +135,8 @@ 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):
|
||||
"""
|
||||
|
@ -164,7 +164,7 @@ class namecoinConnection(object):
|
|||
"success",
|
||||
_translate(
|
||||
"MainWindow",
|
||||
"Success! Namecoind version %1 running.").arg(
|
||||
"Success! Namecoind version {0} running.").format(
|
||||
versStr.decode("utf-8", "ignore")))
|
||||
|
||||
elif self.nmctype == "nmcontrol":
|
||||
|
|
|
@ -138,9 +138,9 @@ 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):
|
||||
"""
|
||||
|
|
|
@ -269,8 +269,8 @@ class uPnPThread(StoppableThread):
|
|||
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))))
|
||||
"MainWindow", 'UPnP port mapping established on port {0}'
|
||||
).format(self.extPort)))
|
||||
break
|
||||
except socket.timeout:
|
||||
pass
|
||||
|
|
Reference in New Issue
Block a user