♻️ refactor(translation): streamline translation logic with macro

This commit is contained in:
welpo 2023-09-01 23:14:05 +02:00
parent 3344f80539
commit 67caafd848
No known key found for this signature in database
GPG key ID: A2F978CF4EC1F5A6
18 changed files with 74 additions and 103 deletions

View file

@ -8,7 +8,7 @@
<div class="toc-container">
{% if header %}
<h3>{%- if lang != config.default_language %} {{ trans(key="table_of_contents" | safe, lang=lang) }} {% else %} Table of Contents {% endif %}</h3>
<h3>{{ macros_translate::translate(key="table_of_contents", default="Table of Contents") }}</h3>
{% endif %}
<ul>