From 8bb419259833277736816c241ed83e3c66327647 Mon Sep 17 00:00:00 2001 From: Marcel Huth Date: Sat, 30 Jul 2016 14:29:25 +0200 Subject: [PATCH 1/5] Added localization support for the theme --- babel.cfg | 1 + 1 file changed, 1 insertion(+) create mode 100644 babel.cfg diff --git a/babel.cfg b/babel.cfg new file mode 100644 index 0000000..2274808 --- /dev/null +++ b/babel.cfg @@ -0,0 +1 @@ +[jinja2: templates/**.html] From bda626352cb87cca86c8c32aaadbc4104ccddcdf Mon Sep 17 00:00:00 2001 From: Marcel Huth Date: Sat, 30 Jul 2016 14:34:54 +0200 Subject: [PATCH 2/5] Added the template files for localization --- templates/archives.html | 4 ++-- templates/article.html | 6 +++--- templates/author.html | 2 +- templates/authors.html | 4 ++-- templates/categories.html | 4 ++-- templates/category.html | 2 +- templates/index.html | 8 ++++---- templates/partial/disqus.html | 2 +- templates/partial/flex.html | 2 +- templates/partial/pagination.html | 4 ++-- templates/tag.html | 2 +- templates/tags.html | 4 ++-- 12 files changed, 22 insertions(+), 22 deletions(-) diff --git a/templates/archives.html b/templates/archives.html index f7fc626..d1a4fc0 100644 --- a/templates/archives.html +++ b/templates/archives.html @@ -1,10 +1,10 @@ {% extends "base.html" %} -{% block title %} – Archives{% endblock %} +{% block title %} – {% trans %}Archives{% endtrans %}{% endblock %} {% block content %}
-

Archives

+

{% trans %}Archives{% endtrans %}

diff --git a/templates/article.html b/templates/article.html index a681793..a3c3a0f 100644 --- a/templates/article.html +++ b/templates/article.html @@ -13,7 +13,7 @@

{{ article.title }}

-

Posted on {{ article.locale_date }} in {{ article.category }}

+

{% trans %}Posted on{% endtrans %} {{ article.locale_date }} {% trans %}in{% endtrans %} {{ article.category }}

{{ article.content }} @@ -29,14 +29,14 @@
{% if ADD_THIS_ID %} {% endif %} {% if article.related_posts %}