From 0d6cbea6198ea3f404924dc4861f56e35e03e82c Mon Sep 17 00:00:00 2001
From: Tobenna Peter Igwe
Date: Thu, 6 Apr 2017 07:38:23 +0100
Subject: [PATCH 1/3] Localization of the template files
---
templates/archives.html | 4 ++--
templates/article.html | 10 +++++-----
templates/author.html | 6 +++---
templates/authors.html | 4 ++--
templates/categories.html | 4 ++--
templates/category.html | 4 ++--
templates/index.html | 4 ++--
templates/pagination.html | 4 ++--
templates/period_archives.html | 4 ++--
templates/tag.html | 2 +-
templates/tags.html | 6 +++---
11 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/templates/archives.html b/templates/archives.html
index 15149cb..071835d 100644
--- a/templates/archives.html
+++ b/templates/archives.html
@@ -1,6 +1,6 @@
{% extends "base.html" %}
-{% block title %}{{ SITENAME }} - Archives{% endblock %}
+{% block title %}{{ SITENAME }} - {{ gettext('Archives') }} {% endblock %}
{% block header %}
@@ -15,7 +15,7 @@
-
Archives for {{ SITENAME }}
+ {{ gettext('Archives for %(name)s', name=SITENAME) }}
diff --git a/templates/article.html b/templates/article.html
index c5dc9dc..e7f6086 100644
--- a/templates/article.html
+++ b/templates/article.html
@@ -105,14 +105,14 @@
{% if article.headline %}
{{ article.headline }}
{% endif %}
- Posted by
+ {{ gettext('Posted by') }}
{% for author in article.authors %}
{{ author }}
{% endfor %}
- on {{ article.locale_date }}
+ {{ gettext('on') }} {{ article.locale_date }}
{% if article.modified %}
- Updated on {{ article.locale_modified }}
+ {{ gettext('Updated on %(moddate)s', moddate=article.locale_modified) }}
{% endif %}
{% import 'translations.html' as translations with context %}
{{ translations.translations_for(article) }}
@@ -131,7 +131,7 @@
{% if article.tags %}
{% endif %}
@@ -152,7 +152,7 @@
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
-
+
{% endif %}
{% endblock content %}
diff --git a/templates/author.html b/templates/author.html
index 65aff95..f526ad5 100644
--- a/templates/author.html
+++ b/templates/author.html
@@ -1,10 +1,10 @@
{% extends "index.html" %}
-{% block title %}{{ SITENAME }} - Articles by {{ author }}{% endblock %}
+{% block title %}{{ SITENAME }} - {{ gettext('Articles by %(name)s', name=author) }}{% endblock %}
{% block opengraph %}
{{ super() }}
-
+
@@ -24,7 +24,7 @@
-
Articles by {{ author }}
+ {{ gettext('Articles by %(name)s', name=author) }}
diff --git a/templates/authors.html b/templates/authors.html
index 74917a8..73c9df9 100644
--- a/templates/authors.html
+++ b/templates/authors.html
@@ -1,6 +1,6 @@
{% extends "index.html" %}
-{% block title %}{{ SITENAME }} - Authors{% endblock title %}
+{% block title %}{{ SITENAME }} - {{ gettext('Authors') }}{% endblock title %}
{% block header %}
@@ -15,7 +15,7 @@
-
Articles by {{ author }}
+ {{ gettext('Articles by %(name)s', name=author) }}
diff --git a/templates/categories.html b/templates/categories.html
index 7af5236..0883d7b 100644
--- a/templates/categories.html
+++ b/templates/categories.html
@@ -1,6 +1,6 @@
{% extends "base.html" %}
-{% block title %}{{ SITENAME }} - Categories{% endblock %}
+{% block title %}{{ SITENAME }} - {{ gettext('Categories') }}{% endblock %}
{% block header %}
@@ -15,7 +15,7 @@
-
{{ SITENAME }} - Categories
+ {{ SITENAME }} - {{ gettext('Categories') }}
diff --git a/templates/category.html b/templates/category.html
index 53b8879..443b208 100644
--- a/templates/category.html
+++ b/templates/category.html
@@ -1,6 +1,6 @@
{% extends "index.html" %}
-{% block title %}{{ SITENAME }} - Articles in the {{ category }} category{% endblock %}
+{% block title %}{{ SITENAME }} - {{ gettext('Articles in the %(category)s category', category=category) }}{% endblock %}
{% block header %}
@@ -15,7 +15,7 @@
-
Articles in the {{ category }} category
+ {{ gettext('Articles in the %(category)s category', category=category) }}
diff --git a/templates/index.html b/templates/index.html
index 6eeba7a..168742a 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -58,11 +58,11 @@
{% endif %}
{% endif %}
- Posted by
+
{{ gettext('Posted by') }}
{% for author in article.authors %}
{{ author }}
{% endfor %}
- on {{ article.locale_date }}
+ {{ gettext('on') }} {{ article.locale_date }}
{% include 'comments.html' %}
diff --git a/templates/pagination.html b/templates/pagination.html
index 22b7e54..1cc50c8 100644
--- a/templates/pagination.html
+++ b/templates/pagination.html
@@ -4,10 +4,10 @@
diff --git a/templates/period_archives.html b/templates/period_archives.html
index 19fdaa9..8c6b6aa 100644
--- a/templates/period_archives.html
+++ b/templates/period_archives.html
@@ -1,6 +1,6 @@
{% extends "base.html" %}
-{% block title %}{{ SITENAME }} - Archives for {{ period | reverse | join (' ') }}{% endblock %}
+{% block title %}{{ SITENAME }} - {{ gettext('Archives for %(period)s', period=period | reverse | join (' ')) }}{% endblock %}
{% block header %}
@@ -15,7 +15,7 @@
-
Archives for {{ period | reverse | join (' ') }}
+ {{ gettext('Archives for %(period)s', period=period | reverse | join (' ')) }}
diff --git a/templates/tag.html b/templates/tag.html
index 108d5be..9a8ad78 100644
--- a/templates/tag.html
+++ b/templates/tag.html
@@ -1,5 +1,5 @@
{% extends "index.html" %}
-{% block title %}{{ SITENAME }} - Tag {{ tag }}{% endblock %}
+{% block title %}{{ SITENAME }} - {{ gettext('Tag %(tag)s', tag=tag) }}{% endblock %}
{% block header %}
{% if HEADER_COVER %}