nixpkgs/pkgs/applications/office/fava/flask-babel.patch
2023-02-03 17:29:01 +08:00

15 lines
428 B
Diff

diff --git a/src/fava/application.py b/src/fava/application.py
index 811c1de4..19de051a 100644
--- a/src/fava/application.py
+++ b/src/fava/application.py
@@ -148,8 +148,7 @@ def get_locale() -> str | None:
return request.accept_languages.best_match(["en"] + LANGUAGES)
-BABEL = Babel(app)
-BABEL.localeselector(get_locale)
+BABEL = Babel(app, locale_selector=get_locale)
for function in template_filters.FILTERS: