From cb8069fc6e08379eb248c75429dc29c5c35fba58 Mon Sep 17 00:00:00 2001 From: welpo Date: Tue, 12 Sep 2023 21:00:51 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9A=B0=EF=B8=8F=20chore(translate):=20remove?= =?UTF-8?q?=20outdated=20comment=20(#145)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/macros/translate.html | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/templates/macros/translate.html b/templates/macros/translate.html index c6880ff..cf71cd0 100644 --- a/templates/macros/translate.html +++ b/templates/macros/translate.html @@ -1,24 +1,3 @@ -{# -Macro: translate -Purpose: Translate text strings based on the current language setting. -Parameters: -- key: The key used to look up the translation in the loaded language data. -- language_strings: The loaded language data (from a .toml file). -- default: The default text to use if a translation is not found. - -Usage: -Use this macro to translate text in templates. The macro looks for the -translation based on the given 'key' in 'language_strings'. If not found, -it falls back to using the 'default' text. - -Note: -The 'language_strings' are loaded in base.html based on the current language -from files in the 'i18n' folder. - -Example: -{{ macros_translate::translate(key="site_source", language_strings=language_strings, default="Site source", language_strings=language_strings) }} -#} - {% macro translate(key, language_strings="", default="") %} {{- language_strings[key] | default(value=default) | safe -}} {% endmacro %}