From 4107aceab1d22cc4614afaa3d0779d4aee3469b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20de=20la=20Pe=C3=B1a=20Smirnov?= Date: Sat, 20 Feb 2021 17:49:03 +0300 Subject: Translated to Russian and Spanish Translated all templates so that the site is available in Russian and Spanish once more. I am still not committed to write/translate everything in three different languages, but there have been some things that I've been meaning to write in Russian. --- config.toml | 34 +++++- content/food/_index.es.md | 7 ++ content/food/_index.ru.md | 7 ++ content/food/archive.es.md | 6 ++ content/food/archive.ru.md | 6 ++ content/weblog/_index.es.md | 7 ++ content/weblog/_index.ru.md | 7 ++ content/weblog/archive.es.md | 6 ++ content/weblog/archive.ru.md | 6 ++ sass/css/yaroslavps.scss | 11 +- templates/base.html | 234 ++++++++++++++++++++++++++++-------------- templates/food_archive.html | 42 ++++++-- templates/index.html | 156 ++++++++++++++++++++++------ templates/page.html | 52 +++++++--- templates/weblog.html | 120 ++++++++++++++-------- templates/weblog_archive.html | 42 ++++++-- 16 files changed, 555 insertions(+), 188 deletions(-) create mode 100644 content/food/_index.es.md create mode 100644 content/food/_index.ru.md create mode 100644 content/food/archive.es.md create mode 100644 content/food/archive.ru.md create mode 100644 content/weblog/_index.es.md create mode 100644 content/weblog/_index.ru.md create mode 100644 content/weblog/archive.es.md create mode 100644 content/weblog/archive.ru.md diff --git a/config.toml b/config.toml index db8019c..803a9ab 100644 --- a/config.toml +++ b/config.toml @@ -5,7 +5,7 @@ generate_feed = false feed_filename = "feed.xml" compile_sass = true -build_search_index = true +build_search_index = false highlight_code = true highlight_theme = "ayu-dark" @@ -16,8 +16,36 @@ taxonomies = [ default_language = "en" languages = [ - {code = "es", search = true, feed = false}, - {code = "ru", search = true, feed = false}, + {code = "es", feed = false}, + {code = "ru", feed = false}, ] +[translations] + +[translations.en] +full_name = "Yaroslav de la Peña Smirnov" +first_name = "Yaroslav" +weblog_title = "Yaroslav's weblog" +recipes_title = "Yaroslav's recipe book" +published = "Published" +published_on = "on" +edited = "Last edited" + +[translations.es] +full_name = "Yaroslav de la Peña Smirnov" +first_name = "Yaroslav" +weblog_title = "Weblog de Yaroslav" +recipes_title = "Recetario de Yaroslav" +published = "Publicado el" +published_on = "en:" +edited = "Última edición: " + +[translations.ru] +full_name = "Ярослав де ла Пенья Смирнов" +first_name = "Ярослав" +weblog_title = "Веб-журнал Ярослава" +recipes_title = "Книга рецептов Ярослава" +published = "Опубликовано" +published_on = "в: " + [extra] diff --git a/content/food/_index.es.md b/content/food/_index.es.md new file mode 100644 index 0000000..ecb844f --- /dev/null +++ b/content/food/_index.es.md @@ -0,0 +1,7 @@ ++++ +title = "A collection of recipes by Yaroslav de la Peña Smirnov" +sort_by = "date" +template = "weblog.html" +paginate_by = 10 +generate_feed = true ++++ diff --git a/content/food/_index.ru.md b/content/food/_index.ru.md new file mode 100644 index 0000000..ecb844f --- /dev/null +++ b/content/food/_index.ru.md @@ -0,0 +1,7 @@ ++++ +title = "A collection of recipes by Yaroslav de la Peña Smirnov" +sort_by = "date" +template = "weblog.html" +paginate_by = 10 +generate_feed = true ++++ diff --git a/content/food/archive.es.md b/content/food/archive.es.md new file mode 100644 index 0000000..940ab0c --- /dev/null +++ b/content/food/archive.es.md @@ -0,0 +1,6 @@ ++++ +sort_by = "date" +template = "food_archive.html" +paginate_by = 0 ++++ + diff --git a/content/food/archive.ru.md b/content/food/archive.ru.md new file mode 100644 index 0000000..940ab0c --- /dev/null +++ b/content/food/archive.ru.md @@ -0,0 +1,6 @@ ++++ +sort_by = "date" +template = "food_archive.html" +paginate_by = 0 ++++ + diff --git a/content/weblog/_index.es.md b/content/weblog/_index.es.md new file mode 100644 index 0000000..5120004 --- /dev/null +++ b/content/weblog/_index.es.md @@ -0,0 +1,7 @@ ++++ +title = "Un weblog escrito por Yaroslav de la Peña Smirnov" +sort_by = "date" +template = "weblog.html" +paginate_by = 10 +generate_feed = true ++++ diff --git a/content/weblog/_index.ru.md b/content/weblog/_index.ru.md new file mode 100644 index 0000000..b8c0142 --- /dev/null +++ b/content/weblog/_index.ru.md @@ -0,0 +1,7 @@ ++++ +title = "Веб-журнал Ярослава де ла Пенья Смирнова" +sort_by = "date" +template = "weblog.html" +paginate_by = 10 +generate_feed = true ++++ diff --git a/content/weblog/archive.es.md b/content/weblog/archive.es.md new file mode 100644 index 0000000..c90f85f --- /dev/null +++ b/content/weblog/archive.es.md @@ -0,0 +1,6 @@ ++++ +sort_by = "date" +template = "weblog_archive.html" +paginate_by = 0 ++++ + diff --git a/content/weblog/archive.ru.md b/content/weblog/archive.ru.md new file mode 100644 index 0000000..c90f85f --- /dev/null +++ b/content/weblog/archive.ru.md @@ -0,0 +1,6 @@ ++++ +sort_by = "date" +template = "weblog_archive.html" +paginate_by = 0 ++++ + diff --git a/sass/css/yaroslavps.scss b/sass/css/yaroslavps.scss index 8f5eeef..51afb2b 100644 --- a/sass/css/yaroslavps.scss +++ b/sass/css/yaroslavps.scss @@ -229,18 +229,19 @@ h2 > span.publish-date { @media (max-width: 768px){ .landing-page-container { - font-size: 1em; + font-size: 1em; } .header-container, .content-container, .sidebar-container { - grid-column-start: 1; - grid-column-end: 3; + grid-column-start: 1; + grid-column-end: 3; } .sidebar-container { - grid-row-start: auto; - grid-row-end: auto; + grid-row-start: auto; + grid-row-end: auto; + background-color: #00000000; } } diff --git a/templates/base.html b/templates/base.html index d8f27ba..010677b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,83 +1,165 @@ {% set permalink = "/weblog/" %} {% if section %} - {% set permalink = section.permalink %} + {% set permalink = section.permalink %} {% elif page %} - {% set permalink = page.permalink %} + {% set permalink = page.permalink %} {% endif %} - - - - - {% block title %} - {{ config.title }} - {% endblock %} - - - - - {% block extrahead %} - {% endblock %} - - -
- {% block page %} -
- {% block header %} -

Yaroslav de la Peña Smirnov

- {% endblock %} -
-
- {% block content %} - {% endblock %} -
- - {% endblock %} -
- + + + + + {% block title %} + {{ config.title }} + {% endblock %} + + + + + {% block extrahead %} + {% endblock %} + + +
+ {% block page %} +
+ {% block header %} +

Yaroslav de la Peña Smirnov

+ {% endblock %} +
+
+ {% block content %} + {% endblock %} +
+ + {% endblock %} +
+ diff --git a/templates/food_archive.html b/templates/food_archive.html index b298815..e8dab8e 100644 --- a/templates/food_archive.html +++ b/templates/food_archive.html @@ -1,20 +1,42 @@ {% extends "base.html" %} {% block title %} +{% if lang == "ru" %} +Архив рецептов - Книга рецептов Ярослава +{% elif lang == "es" %} +Archivo del recetario - Recetario de Yaroslav +{% else %} Recipe archive - Yaroslav's recipe book +{% endif %} {% endblock %} {% block header %} -

Yaroslav's recipe archive

+

+ {% if lang == "ru" %} + Архив рецептов Ярослава + {% elif lang == "es" %} + Archivo del recetario de Yaroslav + {% else %} + Yaroslav's recipe archive + {% endif %} +

{% endblock %} {% block content %} -{% set section = get_section(path="food/_index.md") %} +{% if lang != "en" %} +{% set section_path = "food/_index." ~ lang ~ ".md" %} +{% else %} +{% set section_path = "food/_index.md" %} +{% endif %} +{% set section = get_section(path=section_path) %}
- {% for year, posts in section.pages | group_by(attribute="year") %} -

{{ year }}

- - {% endfor %} + {% for year, posts in section.pages | group_by(attribute="year") %} +

{{ year }}

+ + {% endfor %}
{% endblock %} diff --git a/templates/index.html b/templates/index.html index 6af40ef..8928880 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,34 +1,128 @@ {% extends "base.html" %} {% block page %} -
-

Yaroslav de la Peña Smirnov

- - -

Welcome, my name is Yaroslav de la Peña Smirnov. I keep this site to - sometimes write about what I do or think on my weblog, or to remind myself - of how to do certain things. You can take a look around, maybe you'll find - something interesting or useful.

-

Getting in contact

-

If you want to contact me, you can do so by email at: - yps@yaroslavps.com -

-

Public PGP key: BD900E5D624046DC

-

RSS feeds

-

If you are interested in following what I may publish here (however often it - may be), you can add these RSS/Atom urls to your favorite RSS reader:

- -
+
+

{{ trans(key="full_name", lang=lang) }}

+ + +

+ {% if lang == "ru" %} + Здравствуйте! Меня зовут Ярослав и это мой сайт. Здесь я пишу о том что + я думаю или делаю, или чтобы напомнить себе как что-то делать, будь это + настроить сервер или приготовить блюдо. Возможно вы найдёте что-нибудь + интересного. Большая часть того что я пишу, на + английском. Но, бывает иногда пишу или перевожу то, что + пишу, на русский и/или испанский языки. + {% elif lang == "es" %} + Buenas y bienvenidos sean. Mi nombre es Yaroslav y éste es mi sitio. + Aquí escribo lo que pienso o hago, o simplemente para acordarme luego de + como hacer ciertas cosas, sea configurar un servidor, o cocinar una + receta. Echa una mirada, a lo mejor encuentras algo interestante o útil. + Escribo en su mayoría en inglés, pero a veces también + escribo o traduzco lo que escribo al español y/o al + ruso. + {% else %} + Welcome, my name is Yaroslav. I keep this site to sometimes write about + what I do or think on my weblog, or to remind myself of how to do + certain things, be it set up a server or how to make some dishes. You + can take a look around, maybe you'll find something interesting or + useful. Most of the time I write in English, but sometimes I might also + write or translate what I write in Spanish or + Russian. + {% endif %} +

+

+ {% if lang == "ru" %} + Связаться + {% elif lang == "es" %} + Contacto + {% else %} + Getting in contact + {% endif %} +

+

+ {% if lang == "ru" %} + Связаться со мной можно по электронной почты: + {% elif lang == "es" %} + Si quieres contactarme, puedes enviarme un correo electrónico a la + siguiente dirección: + {% else %} + If you want to contact me, you can do so by email at: + {% endif %} + yps@yaroslavps.com +

+

+ {% if lang == "ru" %} + Если вы пользуетесь такими сервисами как gmail, mail.ru или другими + крупными провайдерами из этого разряда, то мой ответ может попасть в + спам. Если вы хотите быть полностью уверенными что вы получите мой + ответ, добавьте мой адрес в свой белый список. + {% elif lang == "es" %} + Una pequeña nota para aquellos que usan servicios como gmail, + outlook u otros proveedores similares. Mi respuesta de email puede + llegar a su bandeja de espam. Si quieres estar completamente seguro + de recibir mi respuesta, agrega mi dirección a tu lista blanca. + {% else %} + A little note for those using services like gmail, outlook, or any + other big provider like that. My email response might end up in your + spam folder, so you might want to check that. If you want to make + 100% sure to receive my reponse, the best option is to add my + address to your whitelist. + {% endif %} +

+

+ {% if lang == "ru" %} + Публичный PGP-ключ: + {% elif lang == "es" %} + Llave pública de PGP: + {% else %} + Public PGP key: + {% endif %} + BD900E5D624046DC +

+

RSS feeds

+

+ {% if lang == "ru" %} + Если вам хочеться следить за тем что я здесь публикую, вы можете + добавить эти RSS/Atom-ссылки в свой любимый RSS-ридер: + {% elif lang == "es" %} + Si te interesa estar al tanto de lo que publico aquí, cuan seguido + yo publique, puedes agregar estas direcciones de RSS/Atom a tu + lector RSS de preferencia: + {% else %} + If you are interested in following what I may publish here (however + often it may be), you can add these RSS/Atom urls to your favorite + RSS reader: + {% endif %} +

+ +
{% endblock %} diff --git a/templates/page.html b/templates/page.html index a442437..06dca0b 100644 --- a/templates/page.html +++ b/templates/page.html @@ -9,18 +9,46 @@ {% endif %} {% endblock %} {% block header %} -

{{ page.title }}

-

Published {{ page.date | date(format="%b %d, %Y - %H:%M UTC") }} on - {% if page.permalink is containing("weblog") %} - Yaroslav's weblog

- {% elif page.permalink is containing("food") %} - Yaroslav's recipe book

- {% endif %} - {% if page.updated %} -

Last edited {{ page.updated | date(format="%b %d, %Y - %H:%M UTC") }}

- {% endif %} +

{{ page.title }}

+

+ {{ trans(key="published", lang=lang) }} + {{ page.date | date(format="%Y-%m-%d %H:%M UTC") }} + {{ trans(key="published_on", lang=lang) }} + {% if page.permalink is containing("weblog") %} + + {{ trans(key="weblog_title", lang=lang) }} + + {% elif page.permalink is containing("food") %} + + {{ trans(key="recipes_title", lang=lang) }} +

+ {% endif %} +

+{% if page.updated %} +

+ {{ trans(key="edited", lang=lang) }} + {{ page.updated | date(format="%Y-%m-%d %H:%M UTC") }} +

+{% endif %} +{% if page.translations | length > 1 %} +{% 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 }} +

+{% else %} +

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

+{% endif %} +{% endif %} +{% endfor %} +{% endif %} {% endblock %} {% block content %}
diff --git a/templates/weblog.html b/templates/weblog.html index 253f79e..f9889af 100644 --- a/templates/weblog.html +++ b/templates/weblog.html @@ -1,48 +1,86 @@ {% extends "base.html" %} {% block title %} - {% if section.permalink is containing("weblog") %} - A weblog by Yaroslav de la Peña Smirnov - {% elif section.permalink is containing("food") %} - A collection of recipes by Yaroslav de la Peña Smirnov - {% else %} - A website by Yaroslav de la Peña Smirnov - {% endif %} + {% if section.permalink is containing("weblog") %} + {% if lang == "ru" %} + Веб-журнал Ярослава де ла Пенья Смирнова + {% elif lang == "es" %} + Un Weblog escrito por Yaroslav de la Peña Smirnov + {% else %} + A weblog by Yaroslav de la Peña Smirnov + {% endif %} + {% elif section.permalink is containing("food") %} + {% if lang == "ru" %} + Сборник рецептов Ярослава де ла Пенья Смирнова + {% elif lang == "es" %} + Una colección de recetas por Yaroslav de la Peña Smirnov + {% else %} + A collection of recipes by Yaroslav de la Peña Smirnov + {% endif %} + {% else %} + A website by Yaroslav de la Peña Smirnov + {% endif %} {% endblock %} {% block header %} - {% if section.permalink is containing("weblog") %} -

Yaroslav's weblog

- {% elif section.permalink is containing("food") %} -

Yaroslav's recipe book

- {% else %} -

Yaroslav's website

- {% endif %} + {% if section.permalink is containing("weblog") %} +

+ {% if lang == "ru" %} + Веб-журнал Ярослава + {% elif lang == "es" %} + Weblog de Yaroslav + {% else %} + Yaroslav's weblog + {% endif %} +

+ {% elif section.permalink is containing("food") %} +

+ {% if lang == "ru" %} + Книга рецептов Ярослава + {% elif lang == "es" %} + Recetario de Yaroslav + {% else %} + Yaroslav's recipe book + {% endif %} +

+ {% else %} +

Yaroslav's website

+ {% endif %} {% endblock %} {% block content %} -
- {% for post in paginator.pages %} -
-

- {{ post.title }} - {{ post.date | date }} -

- {% if post.summary %} - {{ post.summary | safe }} - {% endif %} -
- {% endfor %} -
-{% if paginator %} - {% if paginator.number_pagers > 1 %} -
- {% if paginator.previous %} - |← First - Page {{ paginator.current_index - 1 }} - {% endif %} - {% if paginator.next %} - Page {{ paginator.current_index + 1 }} - Last →| - {% endif %} -
- {% endif %} -{% endif %} +
+ {% for post in paginator.pages %} +
+

+ {{ post.title }} + {{ post.date | date }} +

+ {% if post.summary %} + {{ post.summary | safe }} + {% endif %} +
+ {% endfor %} +
+ {% if paginator %} + {% if paginator.number_pagers > 1 %} +
+ {% if paginator.previous %} + + |← First + + + Page + {{ paginator.current_index - 1 }} + + {% endif %} + {% if paginator.next %} + + Page {{ paginator.current_index + 1 }} + + + + Last →| + + {% endif %} +
+ {% endif %} + {% endif %} {% endblock %} diff --git a/templates/weblog_archive.html b/templates/weblog_archive.html index cd507ba..74613e4 100644 --- a/templates/weblog_archive.html +++ b/templates/weblog_archive.html @@ -1,20 +1,42 @@ {% extends "base.html" %} {% block title %} +{% if lang == "ru" %} +Архив веб-журнала - Веб-журнал Ярослава +{% elif lang == "es" %} +Archivo del weblog - Weblog de Yaroslav +{% else %} Weblog archive - Yaroslav's weblog +{% endif %} {% endblock %} {% block header %} -

Yaroslav's weblog archive

+

+ {% if lang == "ru" %} + Архив веб-журнала Ярослава + {% elif lang == "es" %} + Archivo del weblog de Yaroslav + {% else %} + Yaroslav's weblog archive + {% endif %} +

{% endblock %} {% block content %} -{% set section = get_section(path="weblog/_index.md") %} +{% if lang != "en" %} +{% set section_path = "weblog/_index." ~ lang ~ ".md" %} +{% else %} +{% set section_path = "weblog/_index.md" %} +{% endif %} +{% set section = get_section(path=section_path) %}
- {% for year, posts in section.pages | group_by(attribute="year") %} -

{{ year }}

-
    - {% for post in posts %} -
  • {{ post.date | date }} - {{ post.title }}
  • - {% endfor %} -
- {% endfor %} + {% for year, posts in section.pages | group_by(attribute="year") %} +

{{ year }}

+
    + {% for post in posts %} +
  • + {{ post.date | date }} - + {{ post.title }} +
  • + {% endfor %} +
+ {% endfor %}
{% endblock %} -- cgit v1.2.3