taler-merchant-demos

Python-based Frontends for the Demonstration Web site
Log | Files | Refs | Submodules | README | LICENSE

commit 91001dd6f624dd82bed78d0a48aba48cef7b2e8e
parent f67188392ae5169a839923a75f8c6d6615652b25
Author: Florian Dold <florian@dold.me>
Date:   Thu, 30 Oct 2025 11:27:38 +0100

set locale_selector in a way that works with current flask-babel

Diffstat:
Mtalermerchantdemos/blog/blog.py | 3+--
Mtalermerchantdemos/donations/donations.py | 3+--
Mtalermerchantdemos/landing/landing.py | 3+--
3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/talermerchantdemos/blog/blog.py b/talermerchantdemos/blog/blog.py @@ -73,8 +73,7 @@ SUBSCRIPTION_SLUG_PREFIX = "blog_abo_" BABEL_TRANSLATION_DIRECTORIES = "../translations" app.config.from_object(__name__) -babel = Babel(app) -babel.localeselector(get_locale) +babel = Babel(app, locale_selector=get_locale) logger.info("Using translations from:" + ":".join(list(babel.translation_directories))) translations = [str(translation) for translation in babel.list_translations()] diff --git a/talermerchantdemos/donations/donations.py b/talermerchantdemos/donations/donations.py @@ -50,8 +50,7 @@ app.secret_key = base64.b64encode(os.urandom(64)).decode("utf-8") app.config.from_object(__name__) -babel = Babel(app) -babel.localeselector(get_locale) +babel = Babel(app, locale_selector=get_locale) config = load_taler_config() diff --git a/talermerchantdemos/landing/landing.py b/talermerchantdemos/landing/landing.py @@ -58,8 +58,7 @@ BABEL_TRANSLATION_DIRECTORIES = "../translations" app.config.from_object(__name__) -babel = Babel(app) -babel.localeselector(get_locale) +babel = Babel(app, locale_selector=get_locale) LOGGER.info("Using translations from:" + ":".join(list(babel.translation_directories))) translations = [str(translation) for translation in babel.list_translations()]