diff --git a/electrum/slip39.py b/electrum/slip39.py
index 6ab1d776c..ab07fb486 100644
--- a/electrum/slip39.py
+++ b/electrum/slip39.py
@@ -297,11 +297,11 @@ def process_mnemonics(mnemonics: List[str]) -> Tuple[bool, str]:
common_params = shares[0].common_parameters()
for share in shares:
if share.common_parameters() != common_params:
- error_text = _("Share") + ' #%d ' % share.index + _("is not part of the current set.")
+ error_text = _("Share #{} is not part of the current set.").format(share.index)
return None, _ERROR_STYLE % error_text
for other in groups[share.group_index]:
if share.member_index == other.member_index:
- error_text = _("Share") + ' #%d ' % share.index + _("is a duplicate of share") + ' #%d.' % other.index
+ error_text = _("Share #{} is a duplicate of share #{}.").format(share.index, other.index)
return None, _ERROR_STYLE % error_text
groups[share.group_index].add(share)
@@ -319,7 +319,8 @@ def process_mnemonics(mnemonics: List[str]) -> Tuple[bool, str]:
group_count = shares[0].group_count
status = ''
if group_count > 1:
- status += _('Completed') + ' %d ' % groups_completed + _('of') + ' %d ' % group_threshold + _('groups needed:
')
+ status += _('Completed {} of {} groups needed').format(f"{groups_completed}", f"{group_threshold}")
+ status += ":
"
for group_index in range(group_count):
group_prefix = _make_group_prefix(identifier, iteration_exponent, group_index, group_threshold, group_count)
@@ -368,11 +369,11 @@ def _make_group_prefix(identifier, iteration_exponent, group_index, group_thresh
def _group_status(group: Set[Share], group_prefix) -> str:
len(group)
if not group:
- return _EMPTY + '0 ' + _('shares from group') + ' ' + group_prefix + '.
'
+ return _EMPTY + _('{} shares from group {}').format('0 ', f'{group_prefix}') + f'.
'
else:
share = next(iter(group))
icon = _FINISHED if len(group) >= share.member_threshold else _INPROGRESS
- return icon + '%d ' % len(group) + _('of') + ' %d ' % share.member_threshold + _('shares needed from group') + ' %s.
' % group_prefix
+ return icon + _('{} of {} shares needed from group {}').format(f'{len(group)}', f'{share.member_threshold}', f'{group_prefix}') + f'.
'
"""