Reworked to newstyle gettext and named vars
This commit is contained in:
parent
36d06accb0
commit
5497850c51
14 changed files with 83 additions and 60 deletions
|
@ -6,22 +6,26 @@
|
|||
<header>
|
||||
<h2><a href="{{ SITEURL }}/{{ article.url }}#{{ article.slug }}">{{ article.title }}</a></h2>
|
||||
<p>
|
||||
{% trans %}Posted on{% endtrans %} {{ article.locale_date }} {% trans %}in{% endtrans %} <a href="{{ SITEURL }}/{{ article.category.url }}">{{ article.category }}</a>
|
||||
{% 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 %}
|
||||
{% if article.tags %}
|
||||
• {% trans %}Tagged with{% endtrans %}
|
||||
• {{ ngettext('Tag', 'Tags', article.tags|count) }}:
|
||||
{% for tag in article.tags %}
|
||||
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if DISQUS_SITENAME %}
|
||||
• <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread">{% trans %}Leave a comment{% endtrans %}</a>
|
||||
• <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread">{{ _('Leave a comment') }}</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
</header>
|
||||
<div>
|
||||
{% if summarise or article.metadata['summary'] or SUMMARY_MAX_LENGTH %}
|
||||
{{ article.summary }}
|
||||
<a class="btn" href="{{ SITEURL }}/{{ article.url }}#{{ article.slug }}">{% trans %}Continue reading{% endtrans %}</a>
|
||||
<a class="btn" href="{{ SITEURL }}/{{ article.url }}#{{ article.slug }}">{{ _('Continue reading') }}</a>
|
||||
{% else %}
|
||||
{{ article.content }}
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue