aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrilla/proxy/web_ui')
-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'
)