Fr: translations

This commit is contained in:
Fabrice Mouhartem 2019-04-23 23:08:31 +05:30
parent d24d07bb07
commit 46270470fc
8 changed files with 90 additions and 16 deletions

View File

@ -105,14 +105,14 @@
{% if article.headline %} {% if article.headline %}
<h3 class="subheading">{{ article.headline }}</h3> <h3 class="subheading">{{ article.headline }}</h3>
{% endif %} {% endif %}
<span class="meta">Posted by <span class="meta">{{ gettext('Posted by') }}
{% for author in article.authors %} {% for author in article.authors %}
<a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> <a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
{% endfor %} {% endfor %}
on {{ article.locale_date }} {{ gettext('on') }} {{ article.locale_date }}
</span> </span>
{% if article.modified %} {% if article.modified %}
<span class="meta">Updated on {{ article.locale_modified }}</span> <span class="meta">{{ gettext('Updated on') }} {{ article.locale_modified }}</span>
{% endif %} {% endif %}
{% import 'translations.html' as translations with context %} {% import 'translations.html' as translations with context %}
{{ translations.translations_for(article) }} {{ translations.translations_for(article) }}

View File

@ -1,6 +1,6 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}{{ SITENAME }} - Categories{% endblock %} {% block title %}{{ SITENAME }} - {{ gettext('Categories') }}{% endblock %}
{% block header %} {% block header %}
<!-- Page Header --> <!-- Page Header -->
@ -15,7 +15,7 @@
<div class="row"> <div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="post-heading"> <div class="post-heading">
<h1>{{ SITENAME }} - Categories</h1> <h1>{{ SITENAME }} - {{ gettext('Categories') }}</h1>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,6 +1,6 @@
{% extends "index.html" %} {% extends "index.html" %}
{% block title %}{{ SITENAME }} - Articles in the {{ category }} category{% endblock %} {% block title %}{{ SITENAME }} - {{ gettext('Category:') }} {{ category }}{% endblock %}
{% block header %} {% block header %}
<!-- Page Header --> <!-- Page Header -->
@ -15,7 +15,7 @@
<div class="row"> <div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="post-heading"> <div class="post-heading">
<h1>Articles in the {{ category }} category</h1> <h1>{{ gettext('Category:') }} {{ category }}</h1>
</div> </div>
</div> </div>
</div> </div>

View File

@ -49,7 +49,7 @@
{% endif %} {% endif %}
{% for article in articles_page.object_list %} {% for article in articles_page.object_list %}
<div class="post-preview"> <div class="post-preview">
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}"> <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="{{ gettext('Permalink to') }} {{ article.title|striptags }}">
<h2 class="post-title"> <h2 class="post-title">
{{ article.title }} {{ article.title }}
</h2> </h2>
@ -65,15 +65,15 @@
{% endif %} {% endif %}
</p> </p>
{% endif %} {% endif %}
<p class="post-meta">Posted by <p class="post-meta">{{ gettext('Posted by') }}
{% for author in article.authors %} {% for author in article.authors %}
<a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> <a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
{% endfor %} {% endfor %}
on {{ article.locale_date }} {{ gettext('on') }} {{ article.locale_date }}
</p> </p>
{% include 'comments.html' %} {% include 'comments.html' %}
</div> </div>
{% endfor %} {% endfor %}
{% include "pagination.html" %} {% include "pagination.html" %}
{% endblock content %} {% endblock content %}

View File

@ -1,8 +1,9 @@
<h1 class="section-heading" style="font-variant: small-caps">Recent Articles</h1> {% block content %}
<h1 class="section-heading" style="font-variant: small-caps">{{ gettext('Recent Articles') }}</h1>
{% for article in articles %} {% for article in articles %}
{% if loop.index > PAGE_PAGINATION %}{% break %}{% endif %} {% if loop.index > PAGE_PAGINATION %}{% break %}{% endif %}
<div class="post-preview"> <div class="post-preview">
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}"> <a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="{{ gettext('Permalink to') }} {{ article.title|striptags }}">
<h2 class="post-title"> <h2 class="post-title">
{{ article.title }} {{ article.title }}
</h2> </h2>
@ -18,13 +19,14 @@
{% endif %} {% endif %}
</p> </p>
{% endif %} {% endif %}
<p class="post-meta">Posted by <p class="post-meta">{{ gettext('Posted by') }}
{% for author in article.authors %} {% for author in article.authors %}
<a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a> <a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
{% endfor %} {% endfor %}
on {{ article.locale_date }}<br/> {{ gettext('on') }} {{ article.locale_date }}<br/>
Category: <a href="{{ SITEURL }}/{{ article.category.url}}">{{ article.category }}</a> {{ gettext('Category:') }} <a href="{{ SITEURL }}/{{ article.category.url}}">{{ article.category }}</a>
</p> </p>
{% include 'comments.html' %} {% include 'comments.html' %}
</div> </div>
{% endfor %} {% endfor %}
{% endblock content %}

View File

@ -18,6 +18,8 @@
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="post-heading"> <div class="post-heading">
<h1>{{ page.title }}</h1> <h1>{{ page.title }}</h1>
{% import 'translations.html' as translations with context %}
{{ translations.translations_for(page) }}
</div> </div>
</div> </div>
</div> </div>

View File

@ -0,0 +1,16 @@
{% macro translations_for(article) %}
{% if article.translations %}
{{ gettext('Translation:') }}
{% for translation in article.translations %}
<a href="{{ SITEURL }}/{{ translation.url }}" hreflang="{{ translation.lang }}">{{ translation.lang }}</a>
{% endfor %}
{% endif %}
{% endmacro %}
{% macro entry_hreflang(entry) %}
{% if entry.translations %}
{% for translation in entry.translations %}
<link rel="alternate" hreflang="{{ translation.lang }}" href="{{ SITEURL }}/{{ translation.url }}">
{% endfor %}
{% endif %}
{% endmacro %}

View File

@ -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 <EMAIL@ADDRESS>, 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 <blog@epheme.re>\n"
"Language: fr\n"
"Language-Team: fr <LL@li.org>\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 ""