From 31b4ffde30681a0a1945ab8ca26672b600fc312b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Sun, 21 Feb 2021 22:11:19 +0300 Subject: Small translation modifications to templates. --- config.toml | 3 +++ templates/base.html | 13 +++++++++++++ templates/page.html | 15 ++++++--------- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/config.toml b/config.toml index cd0ef5d..b0061bc 100644 --- a/config.toml +++ b/config.toml @@ -30,6 +30,7 @@ recipes_title = "Yaroslav's recipe book" published = "Published" published_on = "on" edited = "Last edited" +also_read = "This text is also available in other languages: " [translations.es] full_name = "Yaroslav de la Peña Smirnov" @@ -39,6 +40,7 @@ recipes_title = "Recetario de Yaroslav" published = "Publicado el" published_on = "en:" edited = "Última edición: " +also_read = "Este texto está disponible en otros idiomas: " [translations.ru] full_name = "Ярослав де ла Пенья Смирнов" @@ -48,5 +50,6 @@ recipes_title = "Книга рецептов Ярослава" published = "Опубликовано" published_on = "в: " edited = "Отредакировано: " +also_read = "Данный текст также доступен на других языках: " [extra] diff --git a/templates/base.html b/templates/base.html index 010677b..908e93c 100644 --- a/templates/base.html +++ b/templates/base.html @@ -157,6 +157,19 @@ + {% if lang == "ru" %} +

+ Это русскоязычная версия сайта. Если вам интересно + прочитать больше, взгляньте на + англоязычную версию сайта. +

+ {% elif lang == "es" %} +

+ Ésta es la versión en español de mi sitio. Si les + interesa leer más, denle un vistazo al sitio + en inglés. +

+ {% endif %} {% endblock %} diff --git a/templates/page.html b/templates/page.html index 06dca0b..4cf03c7 100644 --- a/templates/page.html +++ b/templates/page.html @@ -31,23 +31,20 @@

{% endif %} {% if page.translations | length > 1 %} +

+{{ trans(key="also_read", lang=lang) }} {% for trans in page.translations %} {% if trans.lang != lang %} {% if trans.lang == "ru" %} -

- Доступно на русском: {{ trans.title }} -

+ Русский. {% elif trans.lang == "es" %} -

- Disponible en español: {{ trans.title }} -

+ Español. {% else %} -

- Available in English: {{ trans.title }} -

+ English. {% endif %} {% endif %} {% endfor %} +

{% endif %} {% endblock %} {% block content %} -- cgit v1.2.3