aboutsummaryrefslogtreecommitdiff
path: root/templates/404.html
diff options
context:
space:
mode:
authorJieiku2023-09-26 18:46:53 -0700
committerJieiku2023-09-26 18:46:53 -0700
commitf5d32f6032ea172d0f1076b1fa04c96c9205285b (patch)
treecb87b51826639c73a9f2055b011445819329263a /templates/404.html
parent0e3727b97a6297ac9cdbbf3753a301c182e356d6 (diff)
downloadabridge-f5d32f6032ea172d0f1076b1fa04c96c9205285b.tar.gz
abridge-f5d32f6032ea172d0f1076b1fa04c96c9205285b.tar.bz2
abridge-f5d32f6032ea172d0f1076b1fa04c96c9205285b.zip
i18n translation system refactor
Diffstat (limited to 'templates/404.html')
-rw-r--r--templates/404.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/templates/404.html b/templates/404.html
index 07f32b3..fee5607 100644
--- a/templates/404.html
+++ b/templates/404.html
@@ -26,7 +26,10 @@
{# Iterate through each language and display the localised 404 message #}
{%- for lcode, language in config.languages -%}
{%- if lcode != config.default_language -%}
- <p>{{ trans(key="404_not_found", lang=lcode) }}. {% if config.build_search_index %}{{ trans(key="404_try_search", lang=lcode) }}{% endif %} <a href="{{ config.base_url }}/{{ lcode }}/{%- if uglyurls %}index.html{%- endif %}">{{ trans(key="404_go_home", lang=lcode) }}</a>.</p>
+ {%- set i18n_404 = load_data(path="i18n/" ~ lcode ~ '.toml', required=false) -%}
+ {%- if not i18n_404 -%}{%- set i18n_404 = load_data(path="themes/abridge/i18n/" ~ lcode ~ ".toml", required=false) -%}{%- endif %}
+
+ <p>{{ macros::translate(key="404_not_found", default="404_not_found", i18n=i18n_404) }}{{ macros::translate(key="full_stop", default=".", i18n=i18n_404) }} {% if config.build_search_index %}{{ macros::translate(key="404_try_search", default="Try searching or", i18n=i18n_404) }}{% endif %} <a href="{{ config.base_url }}/{{ lcode }}/{%- if uglyurls %}index.html{%- endif %}">{{ macros::translate(key="404_go_home", default="go to homepage", i18n=i18n_404) }}</a>{{ macros::translate(key="full_stop", default=".", i18n=i18n_404) }}</p>
{%- endif -%}
{%- endfor -%}
</div>