diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2021-02-21 22:11:19 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2021-02-21 22:11:19 +0300 |
commit | 31b4ffde30681a0a1945ab8ca26672b600fc312b (patch) | |
tree | 263b3e5fe9fa3025e7eb5ae23e0b08cdf0388c27 | |
parent | f726cdc9a9bbb240c12bdaf666d3dee021c3b9cd (diff) | |
download | yaroslavps.com-31b4ffde30681a0a1945ab8ca26672b600fc312b.tar.gz yaroslavps.com-31b4ffde30681a0a1945ab8ca26672b600fc312b.zip |
Small translation modifications to templates.
-rw-r--r-- | config.toml | 3 | ||||
-rw-r--r-- | templates/base.html | 13 | ||||
-rw-r--r-- | 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 @@ <span class="icon"><img src="/svg/icons/git.svg"/></span> </a> </div> + {% if lang == "ru" %} + <p> + Это русскоязычная версия сайта. Если вам интересно + прочитать больше, взгляньте на + <a href="/">англоязычную версию сайта</a>. + </p> + {% elif lang == "es" %} + <p> + Ésta es la versión en español de mi sitio. Si les + interesa leer más, denle un vistazo al sitio + <a href="/">en inglés</a>. + </p> + {% endif %} </div> </div> {% 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 @@ </p> {% endif %} {% if page.translations | length > 1 %} +<p class="publish-date"> +{{ trans(key="also_read", lang=lang) }} {% for trans in page.translations %} {% if trans.lang != lang %} {% if trans.lang == "ru" %} -<p class="publish-date"> - Доступно на русском: <a href="{{ trans.permalink }}">{{ trans.title }}</a> -</p> + <a href="{{ trans.permalink }}">Русский</a>. {% elif trans.lang == "es" %} -<p class="publish-date"> - Disponible en español: <a href="{{ trans.permalink }}">{{ trans.title }}</a> -</p> + <a href="{{ trans.permalink }}">Español</a>. {% else %} -<p class="publish-date"> - Available in English: <a href="{{ trans.permalink }}">{{ trans.title }}</a> -</p> + <a href="{{ trans.permalink }}">English</a>. {% endif %} {% endif %} {% endfor %} +</p> {% endif %} {% endblock %} {% block content %} |