From 180480099926946de19e6f5db8296fc5b56683dc Mon Sep 17 00:00:00 2001 From: SomberNight Date: Wed, 21 Feb 2018 16:08:32 +0100 Subject: [PATCH] fix #3941 follow-up d971a75ef80d2a50a1ba942c60865a3159624ffc --- gui/kivy/i18n.py | 7 ++++--- gui/kivy/uix/ui_screens/network.kv | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gui/kivy/i18n.py b/gui/kivy/i18n.py index 1eb005f98..733249d3e 100644 --- a/gui/kivy/i18n.py +++ b/gui/kivy/i18n.py @@ -1,21 +1,22 @@ import gettext + class _(str): observers = set() lang = None - def __new__(cls, s, *args, **kwargs): + def __new__(cls, s): if _.lang is None: _.switch_lang('en') - t = _.translate(s, *args, **kwargs) + t = _.translate(s) o = super(_, cls).__new__(cls, t) o.source_text = s return o @staticmethod def translate(s, *args, **kwargs): - return _.lang(s).format(*args, **kwargs) + return _.lang(s) @staticmethod def bind(label): diff --git a/gui/kivy/uix/ui_screens/network.kv b/gui/kivy/uix/ui_screens/network.kv index db5f0ed28..f499618a8 100644 --- a/gui/kivy/uix/ui_screens/network.kv +++ b/gui/kivy/uix/ui_screens/network.kv @@ -11,7 +11,7 @@ Popup: height: self.minimum_height padding: '10dp' SettingsItem: - value: _("{} 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 {}', 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