From d79309e498cdc1358c81367ce2a93a5731e517d1 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sun, 18 Feb 2024 02:41:40 +0300 Subject: web_kbn: use i18n in j2 templates --- bin/web_kbn.py | 2 +- web/kbn_templates/base.j2 | 2 +- web/kbn_templates/cams.j2 | 2 +- web/kbn_templates/index.j2 | 22 +++++++++++----------- web/kbn_templates/inverter.j2 | 6 +++--- web/kbn_templates/modems.j2 | 2 +- web/kbn_templates/pump.j2 | 12 ++++++------ web/kbn_templates/sms.j2 | 14 +++++++------- 8 files changed, 31 insertions(+), 31 deletions(-) diff --git a/bin/web_kbn.py b/bin/web_kbn.py index 9a99ab3..bf17046 100644 --- a/bin/web_kbn.py +++ b/bin/web_kbn.py @@ -190,7 +190,7 @@ class WebSite(http.HTTPServer): ) env = aiohttp_jinja2.get_env(self.app) - def filter_lang(key, unit): + def filter_lang(key, unit='web_kbn'): strings = Translation(unit) return strings.get()[key] diff --git a/web/kbn_templates/base.j2 b/web/kbn_templates/base.j2 index e2e29e3..dc1fd58 100644 --- a/web/kbn_templates/base.j2 +++ b/web/kbn_templates/base.j2 @@ -1,7 +1,7 @@ {% macro breadcrumbs(history) %}