diff --git a/templates/article.html b/templates/article.html index 768e021..c74f382 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') }} {{ article.locale_modified }} {% endif %} {% import 'translations.html' as translations with context %} {{ translations.translations_for(article) }} diff --git a/templates/categories.html b/templates/categories.html index 16953f6..1699207 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 f58595d..58c8913 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('Category:') }} {{ category }}{% endblock %} {% block header %} @@ -15,7 +15,7 @@
-

Articles in the {{ category }} category

+

{{ gettext('Category:') }} {{ category }}

diff --git a/templates/index.html b/templates/index.html index 64bd8fe..b313b82 100644 --- a/templates/index.html +++ b/templates/index.html @@ -49,7 +49,7 @@ {% endif %} {% for article in articles_page.object_list %}
- +

{{ article.title }}

@@ -65,15 +65,15 @@ {% endif %}

{% endif %} -
{% include 'comments.html' %}
{% endfor %} {% include "pagination.html" %} -{% endblock content %} \ No newline at end of file +{% endblock content %} diff --git a/templates/last_articles.html b/templates/last_articles.html index 8409e0a..f11464f 100644 --- a/templates/last_articles.html +++ b/templates/last_articles.html @@ -1,8 +1,9 @@ -

Recent Articles

+{% block content %} +

{{ gettext('Recent Articles') }}

{% for article in articles %} {% if loop.index > PAGE_PAGINATION %}{% break %}{% endif %}
- +

{{ article.title }}

@@ -18,13 +19,14 @@ {% endif %}

{% endif %} -
{% include 'comments.html' %}
{% endfor %} +{% endblock content %} diff --git a/templates/page.html b/templates/page.html index f6550dd..8912ac6 100644 --- a/templates/page.html +++ b/templates/page.html @@ -18,6 +18,8 @@

{{ page.title }}

+ {% import 'translations.html' as translations with context %} + {{ translations.translations_for(page) }}
diff --git a/templates/translations.html b/templates/translations.html new file mode 100644 index 0000000..b8c74e4 --- /dev/null +++ b/templates/translations.html @@ -0,0 +1,16 @@ +{% macro translations_for(article) %} +{% if article.translations %} + {{ gettext('Translation:') }} + {% for translation in article.translations %} + {{ translation.lang }} + {% endfor %} +{% endif %} +{% endmacro %} + +{% macro entry_hreflang(entry) %} +{% if entry.translations %} + {% for translation in entry.translations %} + + {% endfor %} +{% endif %} +{% endmacro %} diff --git a/translations/fr/LC_MESSAGES/messages.po b/translations/fr/LC_MESSAGES/messages.po new file mode 100644 index 0000000..63132b5 --- /dev/null +++ b/translations/fr/LC_MESSAGES/messages.po @@ -0,0 +1,54 @@ +# French translations for PROJECT. +# Copyright (C) 2019 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2019. +# +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: blog@epheme.re\n" +"POT-Creation-Date: 2019-04-23 22:51+0530\n" +"PO-Revision-Date: 2019-04-23 23:04+0530\n" +"Last-Translator: Fabrice Mouhartem \n" +"Language: fr\n" +"Language-Team: fr \n" +"Plural-Forms: nplurals=2; plural=(n > 1)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.6.0\n" + +#: templates/article.html:108 templates/index.html:68 +msgid "Posted by" +msgstr "Posté par" + +#: templates/article.html:112 templates/index.html:72 +msgid "on" +msgstr "le" + +#: templates/article.html:115 +msgid "Updated on" +msgstr "Mis-à-jour le" + +#: templates/index.html:52 +msgid "Permalink to" +msgstr "Lien permanent vers" + +msgid "Category:" +msgstr "Catégorie :" + +msgid "Categories" +msgstr "Catégories" + +msgid "Recent Articles" +msgstr "Articles Récents" + +msgid "Translation:" +msgstr "Traduction :" + +#~ msgid "Articles in the" +#~ msgstr "Articles dans la catégorie" + +#~ msgid "category" +#~ msgstr "" +