mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 03:12:51 +00:00
fava: support flask-babel 3
This commit is contained in:
parent
89fae351e4
commit
5545f930a2
@ -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 ];
|
||||
|
||||
|
14
pkgs/applications/office/fava/flask-babel.patch
Normal file
14
pkgs/applications/office/fava/flask-babel.patch
Normal file
@ -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:
|
Loading…
Reference in New Issue
Block a user