diff --git a/gui/kivy/i18n.py b/gui/kivy/i18n.py index 32a442ed..bee7e94c 100644 --- a/gui/kivy/i18n.py +++ b/gui/kivy/i18n.py @@ -18,16 +18,11 @@ class _(str): return _.lang(s).format(args, kwargs) @staticmethod - def bind(label, arg): - if not isinstance(label.text, _): - return - if label.bound: - return + def bind(label): try: _.observers.add(label) except: pass - label.bound = True # garbage collection new = set() for label in _.observers: diff --git a/gui/kivy/main.kv b/gui/kivy/main.kv index a41e64d9..6ea50176 100644 --- a/gui/kivy/main.kv +++ b/gui/kivy/main.kv @@ -13,7 +13,7 @@ font_name: 'Roboto' font_size: '16sp' bound: False - on_text: _.bind(self, args[1]) + on_text: if isinstance(self.text, _) and not self.bound: self.bound=True; _.bind(self) on_focus: app._focused_widget = root