use string.format instead of old style (%) formatting
This commit is contained in:
@@ -442,11 +442,11 @@ class DeviceMgr(ThreadJob, PrintError):
|
||||
# The user input has wrong PIN or passphrase, or cancelled input,
|
||||
# or it is not pairable
|
||||
raise DeviceUnpairableError(
|
||||
_('Electrum cannot pair with your %s.\n\n'
|
||||
_('Electrum cannot pair with your {}.\n\n'
|
||||
'Before you request bitcoins to be sent to addresses in this '
|
||||
'wallet, ensure you can pair with your device, or that you have '
|
||||
'its seed (and passphrase, if any). Otherwise all bitcoins you '
|
||||
'receive will be unspendable.') % plugin.device)
|
||||
'receive will be unspendable.').format(plugin.device))
|
||||
|
||||
def unpaired_device_infos(self, handler, plugin, devices=None):
|
||||
'''Returns a list of DeviceInfo objects: one for each connected,
|
||||
@@ -472,9 +472,9 @@ class DeviceMgr(ThreadJob, PrintError):
|
||||
infos = self.unpaired_device_infos(handler, plugin, devices)
|
||||
if infos:
|
||||
break
|
||||
msg = _('Please insert your %s. Verify the cable is '
|
||||
msg = _('Please insert your {}. Verify the cable is '
|
||||
'connected and that no other application is using it.\n\n'
|
||||
'Try to connect again?') % plugin.device
|
||||
'Try to connect again?').format(plugin.device)
|
||||
if not handler.yes_no_question(msg):
|
||||
raise UserCancelled()
|
||||
devices = None
|
||||
@@ -484,7 +484,7 @@ class DeviceMgr(ThreadJob, PrintError):
|
||||
for info in infos:
|
||||
if info.label == keystore.label:
|
||||
return info
|
||||
msg = _("Please select which %s device to use:") % plugin.device
|
||||
msg = _("Please select which {} device to use:").format(plugin.device)
|
||||
descriptions = [info.label + ' (%s)'%(_("initialized") if info.initialized else _("wiped")) for info in infos]
|
||||
c = handler.query_choice(msg, descriptions)
|
||||
if c is None:
|
||||
|
||||
Reference in New Issue
Block a user