use string.format instead of old style (%) formatting
This commit is contained in:
@@ -135,7 +135,7 @@ Builder.load_string('''
|
||||
height: self.minimum_height
|
||||
Label:
|
||||
color: root.text_color
|
||||
text: _('From %d cosigners')%n.value
|
||||
text: _('From {} cosigners').format(n.value)
|
||||
Slider:
|
||||
id: n
|
||||
range: 2, 5
|
||||
@@ -143,7 +143,7 @@ Builder.load_string('''
|
||||
value: 2
|
||||
Label:
|
||||
color: root.text_color
|
||||
text: _('Require %d signatures')%m.value
|
||||
text: _('Require {} signatures').format(m.value)
|
||||
Slider:
|
||||
id: m
|
||||
range: 1, n.value
|
||||
|
||||
@@ -112,7 +112,7 @@ class TxDialog(Factory.Popup):
|
||||
if timestamp:
|
||||
self.date_str = datetime.fromtimestamp(timestamp).isoformat(' ')[:-3]
|
||||
elif exp_n:
|
||||
self.date_str = _('Within %d blocks') % exp_n if exp_n > 0 else _('unknown (low fee)')
|
||||
self.date_str = _('Within {} blocks').format(exp_n) if exp_n > 0 else _('unknown (low fee)')
|
||||
else:
|
||||
self.date_str = ''
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Popup:
|
||||
height: self.minimum_height
|
||||
padding: '10dp'
|
||||
SettingsItem:
|
||||
value: _("%d connections.")% app.num_nodes if app.num_nodes else _("Not connected")
|
||||
value: _("{} connections.").format(app.num_nodes) if app.num_nodes else _("Not connected")
|
||||
title: _("Status") + ': ' + self.value
|
||||
description: _("Connections with Electrum servers")
|
||||
action: lambda x: None
|
||||
@@ -46,7 +46,7 @@ Popup:
|
||||
|
||||
CardSeparator
|
||||
SettingsItem:
|
||||
title: _('Fork detected at block %d')%app.blockchain_checkpoint if app.num_chains>1 else _('No fork detected')
|
||||
title: _('Fork detected at block {}').format(app.blockchain_checkpoint) if app.num_chains>1 else _('No fork detected')
|
||||
fork_description: (_('You are following branch') if app.auto_connect else _("Your server is on branch")) + ' ' + app.blockchain_name
|
||||
description: self.fork_description if app.num_chains>1 else _('Connected nodes are on the same chain')
|
||||
action: app.choose_blockchain_dialog
|
||||
|
||||
Reference in New Issue
Block a user