aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui/root.py
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-10-28 20:15:30 +0200
committerWojtek Kosior <koszko@koszko.org>2022-10-28 20:15:30 +0200
commit43ed7392cdfc734a4304284906b9d0d503381841 (patch)
tree5d78662357507aac0820825a8ace0859c395779d /src/hydrilla/proxy/web_ui/root.py
parent2a622842c38f1f9df2aee6af28bf9932d05a2ef0 (diff)
downloadhaketilo-hydrilla-43ed7392cdfc734a4304284906b9d0d503381841.tar.gz
haketilo-hydrilla-43ed7392cdfc734a4304284906b9d0d503381841.zip
[proxy] make it possible to export embedded documentation as standalone .html files and include these in the binary release tarball
Diffstat (limited to 'src/hydrilla/proxy/web_ui/root.py')
-rw-r--r--src/hydrilla/proxy/web_ui/root.py8
1 files changed, 2 insertions, 6 deletions
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'
)