tkivy: fix i18n with unicode - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit ac88ae9c7fa7e2612dfa62b492825248d4b16294 (DIR) parent 3cbde4c39878de03e95a9cc213f9cea0ed9c81e5 (HTM) Author: ThomasV <thomasv@electrum.org> Date: Sun, 12 Mar 2017 10:47:02 +0100 kivy: fix i18n with unicode Diffstat: M gui/kivy/i18n.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- (DIR) diff --git a/gui/kivy/i18n.py b/gui/kivy/i18n.py t@@ -1,6 +1,6 @@ import gettext -class _(str): +class _(unicode): observers = set() lang = None t@@ -15,7 +15,9 @@ class _(str): @staticmethod def translate(s, *args, **kwargs): - return _.lang(s).format(args, kwargs) + tr = _.lang(s).format(args, kwargs) + tr = tr.decode('utf8') + return tr @staticmethod def bind(label):