Pluginless translation.
This commit is contained in:
parent
549a882acb
commit
723e047add
6 changed files with 18 additions and 22 deletions
|
@ -14,9 +14,9 @@
|
|||
<header>
|
||||
<h1 id="{{ article.slug }}">{{ article.title }}</h1>
|
||||
<p>
|
||||
{% with category_url='<a href="%s/%s">%s</a>' % (SITEURL, article.category.url, article.category) %}
|
||||
{{ _('Posted on %(when)s in %(category)s', when=article.locale_date, category=category_url|safe) }}
|
||||
{% endwith %}
|
||||
{{ _('Posted on %(when)s in %(category)s',
|
||||
when=article.locale_date,
|
||||
category='<a href="%s/%s">%s</a>'|format(SITEURL, article.category.url, article.category)|safe) }}
|
||||
|
||||
{% if 'post_stats' in PLUGINS %}
|
||||
• {{ article.stats['read_mins'] }} min read
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
{% if 'jinja2.ext.i18n' not in JINJA_EXTENSIONS %}
|
||||
{% macro _(msg) %}
|
||||
{{ msg % kwargs }}
|
||||
{% endmacro %}
|
||||
{% endif %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ DEFAULT_LANG }}">
|
||||
<head>
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
<header>
|
||||
<h2><a href="{{ SITEURL }}/{{ article.url }}#{{ article.slug }}">{{ article.title }}</a></h2>
|
||||
<p>
|
||||
{% with category_url='<a href="%s/%s">%s</a>' % (SITEURL, article.category.url, article.category) %}
|
||||
{{ _('Posted on %(when)s in %(category)s', when=article.locale_date, category=category_url|safe) }}
|
||||
{% endwith %}
|
||||
{{ _('Posted on %(when)s in %(category)s',
|
||||
when=article.locale_date,
|
||||
category='<a href="%s/%s">%s</a>'|format(SITEURL, article.category.url, article.category)|safe) }}
|
||||
|
||||
{% if 'post_stats' in PLUGINS %}
|
||||
• {{ article.stats['read_mins'] }} min read
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue