depot/third_party/nixpkgs/pkgs/applications/office/fava/flask-babel.patch
Default email 4bac34ead1 Project import generated by Copybara.
GitOrigin-RevId: 724bfc0892363087709bd3a5a1666296759154b1
2023-02-09 12:40:11 +01:00

14 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: