From 43ed7392cdfc734a4304284906b9d0d503381841 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Fri, 28 Oct 2022 20:15:30 +0200 Subject: [proxy] make it possible to export embedded documentation as standalone .html files and include these in the binary release tarball --- src/hydrilla/proxy/web_ui/root.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/hydrilla/proxy/web_ui/root.py') diff --git a/src/hydrilla/proxy/web_ui/root.py b/src/hydrilla/proxy/web_ui/root.py index 4eea860..4915e51 100644 --- a/src/hydrilla/proxy/web_ui/root.py +++ b/src/hydrilla/proxy/web_ui/root.py @@ -188,14 +188,10 @@ def home_doc(page: str) -> str: if page not in self_doc.page_names: flask.abort(404) - locale = translations.select_best_locale() - if locale == translations.default_locale: - prefix = '' - else: - prefix = f'{locale}/' + locale = translations.select_best_locale(self_doc.available_locales) return flask.render_template( - f'{prefix}{page}.html.jinja', + f'{locale}/{page}.html.jinja', doc_output = 'html_hkt_mitm_it' ) -- cgit v1.2.3