From dc854b0695dc97b1fe70d9302c096c3288fab62c Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 9 Oct 2022 13:50:58 +0800 Subject: [PATCH] bugfix --- kivyblocks/baseWidget.py | 7 +++---- kivyblocks/version.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/kivyblocks/baseWidget.py b/kivyblocks/baseWidget.py index a5eda1d..c8fde32 100755 --- a/kivyblocks/baseWidget.py +++ b/kivyblocks/baseWidget.py @@ -632,20 +632,18 @@ class Slider(Carousel): w = bk.widgetBuild(desc) self.add_widget(w) -i18n = None - class I18nWidget(PressableText): lang = StringProperty(None) def __init__(self, **kw): super().__init__(**kw) - if i18n is None: - i18n = I18n() + i18n = I18n() self.lang = i18n.lang def on_lang(self, *args): self.otext = self.lang def on_press(self, *args): + i18n = I18n() langs = i18n.get_languages() data = [ {'lang':l} for l in langs ] mdd = MyDropDown(textField='lang', valueField='lang', @@ -657,5 +655,6 @@ class I18nWidget(PressableText): def selected_lang(self, o, v): lang = v[0] self.lang = lang + i18n = I18n() i18n.changeLang(self.lang) diff --git a/kivyblocks/version.py b/kivyblocks/version.py index 09006f0..98a4617 100644 --- a/kivyblocks/version.py +++ b/kivyblocks/version.py @@ -1 +1 @@ -__version__ = '0.3.25' +__version__ = '0.3.26'