format a few strings with str.format(). fix #3405
This commit is contained in:
parent
73cb6a8735
commit
bc7051372f
|
@ -527,10 +527,10 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard):
|
|||
grid.addWidget(m_label, 1, 0)
|
||||
grid.addWidget(m_edit, 1, 1)
|
||||
def on_m(m):
|
||||
m_label.setText(_('Require %d signatures')%m)
|
||||
m_label.setText(_('Require {0} signatures').format(m))
|
||||
cw.set_m(m)
|
||||
def on_n(n):
|
||||
n_label.setText(_('From %d cosigners')%n)
|
||||
n_label.setText(_('From {0} cosigners').format(n))
|
||||
cw.set_n(n)
|
||||
m_edit.setMaximum(n)
|
||||
n_edit.valueChanged.connect(on_n)
|
||||
|
|
|
@ -355,14 +355,14 @@ class NetworkChoiceLayout(object):
|
|||
height_str = "%d "%(self.network.get_local_height()) + _('blocks')
|
||||
self.height_label.setText(height_str)
|
||||
n = len(self.network.get_interfaces())
|
||||
status = _("Connected to %d nodes.")%n if n else _("Not connected")
|
||||
status = _("Connected to {0} nodes.").format(n) if n else _("Not connected")
|
||||
self.status_label.setText(status)
|
||||
chains = self.network.get_blockchains()
|
||||
if len(chains)>1:
|
||||
chain = self.network.blockchain()
|
||||
checkpoint = chain.get_checkpoint()
|
||||
name = chain.get_name()
|
||||
msg = _('Chain split detected at block %d')%checkpoint + '\n'
|
||||
msg = _('Chain split detected at block {0}').format(checkpoint) + '\n'
|
||||
msg += (_('You are following branch') if auto_connect else _('Your server is on branch'))+ ' ' + name
|
||||
msg += ' (%d %s)' % (chain.get_branch_size(), _('blocks'))
|
||||
else:
|
||||
|
|
|
@ -35,7 +35,7 @@ from .qrtextedit import ShowQRTextEdit, ScanQRTextEdit
|
|||
def seed_warning_msg(seed):
|
||||
return ''.join([
|
||||
"<p>",
|
||||
_("Please save these %d words on paper (order is important). "),
|
||||
_("Please save these {0} words on paper (order is important). "),
|
||||
_("This seed will allow you to recover your wallet in case "
|
||||
"of computer failure."),
|
||||
"</p>",
|
||||
|
@ -45,7 +45,7 @@ def seed_warning_msg(seed):
|
|||
"<li>" + _("Never type it on a website.") + "</li>",
|
||||
"<li>" + _("Do not store it electronically.") + "</li>",
|
||||
"</ul>"
|
||||
]) % len(seed.split())
|
||||
]).format(len(seed.split()))
|
||||
|
||||
|
||||
class SeedLayout(QVBoxLayout):
|
||||
|
|
Loading…
Reference in New Issue