aboutsummaryrefslogtreecommitdiff
path: root/templates/page.html
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2021-02-20 17:49:03 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2021-02-20 18:00:32 +0300
commit4107aceab1d22cc4614afaa3d0779d4aee3469b7 (patch)
treef636b116efbc0d179e5aedd2f4b95718cc13aa8c /templates/page.html
parent66a4844e829495328d738f31728c9c03c11c2771 (diff)
downloadyaroslavps.com-4107aceab1d22cc4614afaa3d0779d4aee3469b7.tar.gz
yaroslavps.com-4107aceab1d22cc4614afaa3d0779d4aee3469b7.zip
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.
Diffstat (limited to 'templates/page.html')
-rw-r--r--templates/page.html52
1 files changed, 40 insertions, 12 deletions
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 %}
- <h1>{{ page.title }}</h1>
- <p class="publish-date">Published {{ page.date | date(format="%b %d, %Y
- %H:%M UTC") }} on
- {% if page.permalink is containing("weblog") %}
- <a href="/weblog">Yaroslav's weblog</a></p>
- {% elif page.permalink is containing("food") %}
- <a href="/food">Yaroslav's recipe book</a></p>
- {% endif %}
- {% if page.updated %}
- <p class="publish-date">Last edited {{ page.updated | date(format="%b %d, %Y
- %H:%M UTC") }}</p>
- {% endif %}
+<h1>{{ page.title }}</h1>
+<p class="publish-date">
+ {{ 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") %}
+ <a href="{% if lang != "en" %}/{{ lang }}{% endif %}/weblog">
+ {{ trans(key="weblog_title", lang=lang) }}
+ </a>
+ {% elif page.permalink is containing("food") %}
+ <a href="{% if lang != "en" %}/{{ lang }}{% endif %}/food">
+ {{ trans(key="recipes_title", lang=lang) }}
+ </a></p>
+ {% endif %}
+</p>
+{% if page.updated %}
+<p class="publish-date">
+ {{ trans(key="edited", lang=lang) }}
+ {{ page.updated | date(format="%Y-%m-%d %H:%M UTC") }}
+</p>
+{% endif %}
+{% if page.translations | length > 1 %}
+{% 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>
+{% elif trans.lang == "es" %}
+<p class="publish-date">
+ Disponible en español: <a href="{{ trans.permalink }}">{{ trans.title }}</a>
+</p>
+{% else %}
+<p class="publish-date">
+ Available in English: <a href="{{ trans.permalink }}">{{ trans.title }}</a>
+</p>
+{% endif %}
+{% endif %}
+{% endfor %}
+{% endif %}
{% endblock %}
{% block content %}
<div class="post-container">