From 3f888c39d22486b8f1832f970b798edf2e5d5387 Mon Sep 17 00:00:00 2001 From: augustin64 Date: Sat, 27 Jan 2024 12:25:52 +0100 Subject: [PATCH] Add html `lang` attribute --- partitioncloud/__init__.py | 2 +- partitioncloud/templates/base.html | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/partitioncloud/__init__.py b/partitioncloud/__init__.py index afbf031..f52e80c 100644 --- a/partitioncloud/__init__.py +++ b/partitioncloud/__init__.py @@ -153,7 +153,7 @@ def inject_default_variables(): """Inject the version number in the template variables""" if __version__ == "unknown": return {"version": ''} - return {"version": __version__} + return {"version": __version__, "lang": get_locale()} @app.after_request diff --git a/partitioncloud/templates/base.html b/partitioncloud/templates/base.html index 3f3a208..142aa4b 100644 --- a/partitioncloud/templates/base.html +++ b/partitioncloud/templates/base.html @@ -1,9 +1,12 @@ - + + + + {% block title %}{% endblock %} - PartitionCloud