Fr: translations
This commit is contained in:
@ -105,14 +105,14 @@
|
||||
{% if article.headline %}
|
||||
<h3 class="subheading">{{ article.headline }}</h3>
|
||||
{% endif %}
|
||||
<span class="meta">Posted by
|
||||
<span class="meta">{{ gettext('Posted by') }}
|
||||
{% for author in article.authors %}
|
||||
<a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
|
||||
{% endfor %}
|
||||
on {{ article.locale_date }}
|
||||
{{ gettext('on') }} {{ article.locale_date }}
|
||||
</span>
|
||||
{% if article.modified %}
|
||||
<span class="meta">Updated on {{ article.locale_modified }}</span>
|
||||
<span class="meta">{{ gettext('Updated on') }} {{ article.locale_modified }}</span>
|
||||
{% endif %}
|
||||
{% import 'translations.html' as translations with context %}
|
||||
{{ translations.translations_for(article) }}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ SITENAME }} - Categories{% endblock %}
|
||||
{% block title %}{{ SITENAME }} - {{ gettext('Categories') }}{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
<!-- Page Header -->
|
||||
@ -15,7 +15,7 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="post-heading">
|
||||
<h1>{{ SITENAME }} - Categories</h1>
|
||||
<h1>{{ SITENAME }} - {{ gettext('Categories') }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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 %}
|
||||
<!-- Page Header -->
|
||||
@ -15,7 +15,7 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="post-heading">
|
||||
<h1>Articles in the {{ category }} category</h1>
|
||||
<h1>{{ gettext('Category:') }} {{ category }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -49,7 +49,7 @@
|
||||
{% endif %}
|
||||
{% for article in articles_page.object_list %}
|
||||
<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">
|
||||
{{ article.title }}
|
||||
</h2>
|
||||
@ -65,15 +65,15 @@
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
<p class="post-meta">Posted by
|
||||
<p class="post-meta">{{ gettext('Posted by') }}
|
||||
{% for author in article.authors %}
|
||||
<a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
|
||||
{% endfor %}
|
||||
on {{ article.locale_date }}
|
||||
{{ gettext('on') }} {{ article.locale_date }}
|
||||
</p>
|
||||
{% include 'comments.html' %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% include "pagination.html" %}
|
||||
{% endblock content %}
|
||||
{% endblock content %}
|
||||
|
@ -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 %}
|
||||
{% if loop.index > PAGE_PAGINATION %}{% break %}{% endif %}
|
||||
<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">
|
||||
{{ article.title }}
|
||||
</h2>
|
||||
@ -18,13 +19,14 @@
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
<p class="post-meta">Posted by
|
||||
<p class="post-meta">{{ gettext('Posted by') }}
|
||||
{% for author in article.authors %}
|
||||
<a href="{{ SITEURL }}/{{ author.url }}">{{ author }}</a>
|
||||
{% endfor %}
|
||||
on {{ article.locale_date }}<br/>
|
||||
Category: <a href="{{ SITEURL }}/{{ article.category.url}}">{{ article.category }}</a>
|
||||
{{ gettext('on') }} {{ article.locale_date }}<br/>
|
||||
{{ gettext('Category:') }} <a href="{{ SITEURL }}/{{ article.category.url}}">{{ article.category }}</a>
|
||||
</p>
|
||||
{% include 'comments.html' %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock content %}
|
||||
|
@ -18,6 +18,8 @@
|
||||
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||
<div class="post-heading">
|
||||
<h1>{{ page.title }}</h1>
|
||||
{% import 'translations.html' as translations with context %}
|
||||
{{ translations.translations_for(page) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
16
templates/translations.html
Normal file
16
templates/translations.html
Normal 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 %}
|
Reference in New Issue
Block a user