Reworked to newstyle gettext and named vars

This commit is contained in:
Marcel Huth 2016-08-10 19:28:32 +02:00
parent 36d06accb0
commit 5497850c51
14 changed files with 83 additions and 60 deletions

View file

@ -13,7 +13,13 @@
<article>
<header>
<h1 id="{{ article.slug }}">{{ article.title }}</h1>
<p>{% trans %}Posted on{% endtrans %} {{ article.locale_date }} {% trans %}in{% endtrans %} <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a></p>
<p>
{% autoescape false %}
{{ _('Posted on %(when)s in %(category)s',
when=article.locale_date,
category='<a href="%s/%s">%s</a>' % (SITEURL, article.category.url, article.category)) }}
{% endautoescape %}
</p>
</header>
<div>
{{ article.content }}
@ -29,14 +35,14 @@
</div>
{% if ADD_THIS_ID %}
<div class="center social-share">
<p>{% trans %}Like this article? Share it with your friends!{% endtrans %}</p>
<p>{{ _('Like this article? Share it with your friends!') }}</p>
<div class="addthis_native_toolbox"></div>
<div class="addthis_sharing_toolbox"></div>
</div>
{% endif %}
{% if article.related_posts %}
<div class="related-posts">
<h4>{% trans %}Related posts{% endtrans %}:</h4>
<h4>{{ _('Related posts') }}:</h4>
<ul>
{% for related_post in article.related_posts %}
<li><a href="{{ SITEURL }}/{{ related_post.url }}">{{ related_post.title }}</a></li>