diff --git a/pkgs/applications/office/fava/default.nix b/pkgs/applications/office/fava/default.nix index 822ef3da2216..ce6988e6e61b 100644 --- a/pkgs/applications/office/fava/default.nix +++ b/pkgs/applications/office/fava/default.nix @@ -10,7 +10,14 @@ python3.pkgs.buildPythonApplication rec { sha256 = "sha256-Uw8UIJa+Dtsy+o31I1ynLyhZrFNX42NFRXu1O2ISbzU="; }; - pythonRelaxDeps = [ "cheroot" ]; + patches = [ + ./flask-babel.patch + ]; + + pythonRelaxDeps = [ + "cheroot" + "Flask-Babel" + ]; nativeBuildInputs = with python3.pkgs; [ setuptools-scm pythonRelaxDepsHook ]; diff --git a/pkgs/applications/office/fava/flask-babel.patch b/pkgs/applications/office/fava/flask-babel.patch new file mode 100644 index 000000000000..739be6327ca8 --- /dev/null +++ b/pkgs/applications/office/fava/flask-babel.patch @@ -0,0 +1,14 @@ +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: