From 60dca20224317e4881e927695b224d6438716775 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Aug 30 2024 07:47:54 +0000 Subject: Fix code to run with flask_babel 3.0 See https://github.com/python-babel/flask-babel/releases/tag/v3.0.0 --- diff --git a/fedocal/__init__.py b/fedocal/__init__.py index 6a7fe8a..0ad5c63 100644 --- a/fedocal/__init__.py +++ b/fedocal/__init__.py @@ -155,7 +155,6 @@ work. return decorated_function -@babel.localeselector def get_locale(): """try to guess the language from the user accept header the browser transmits""" @@ -166,6 +165,7 @@ def get_locale(): ) except ImportError: return 'en' +babel.init_app(APP, locale_selector=get_locale) @APP.context_processor