Fixed gettext is broken when ablog is used #30

This commit is contained in:
dgarcia360 2019-02-08 15:09:21 +00:00
parent 7b06519479
commit 257f7862ec
5 changed files with 8 additions and 8 deletions

View file

@ -13,7 +13,7 @@
<p>
{% if fa %}{% endif %}
{% if post.published %}
{{ post.date.strftime(gettext(ablog.post_date_format)) }}
{{ post.date.strftime(ablog.post_date_format) }}
{% else %}
Draft
{% endif %}

View file

@ -18,7 +18,7 @@
<p>
{% if fa %}{% endif %}
{% if post.published %}
{{ post.date.strftime(gettext(ablog.post_date_format)) }}
{{ post.date.strftime(ablog.post_date_format) }}
{% else %}
Draft
{% endif %}
@ -36,10 +36,10 @@
<ul class="ablog-archive">
<li>{% if post.published %}
{% if fa %}<i class="fa fa-calendar"></i>{% endif %}
{{ post.date.strftime(gettext(ablog.post_date_format)) }}
{{ post.date.strftime(ablog.post_date_format) }}
{% else %}
{% if fa %}<i class="fa fa-pencil"></i>{% endif %}
{% if post.date %}{{ post.date.strftime(gettext(ablog.post_date_format)) }}
{% if post.date %}{{ post.date.strftime(ablog.post_date_format) }}
{% else %} Draft {% endif %}
{% endif %}
</li>

View file

@ -4,10 +4,10 @@
<h2>
{% if post.published %}
{% if fa %}<i class="fa fa-calendar"></i>{% endif %}
{{ post.date.strftime(gettext(ablog.post_date_format)) }}
{{ post.date.strftime(ablog.post_date_format) }}
{% else %}
{% if fa %}<i class="fa fa-pencil"></i>{% endif %}
{% if post.date %}{{ post.date.strftime(gettext(ablog.post_date_format)) }}
{% if post.date %}{{ post.date.strftime(ablog.post_date_format) }}
{% else %} Draft {% endif %}
{% endif %}
</h2>

View file

@ -1,6 +1,6 @@
{% if post.published and post.date != post.update %}
<li id="published" ><span>{% if fa %}<i class="fa fa-pencil-square-o"></i>{% else %}{{ gettext('Update') }}:{% endif %}</span>
{{ post.update.strftime(gettext(ablog.post_date_format)) }}</li>
{{ post.update.strftime(ablog.post_date_format) }}</li>
{% endif %}
{% if post.author %}

View file

@ -3,7 +3,7 @@
<ul>
{% set pcount = 1 %}
{% for recent in ablog.recent(5, pagename) %}
<li><a href="{{ pathto(recent.docname) }}{{ anchor(recent) }}">{{ recent.date.strftime(gettext(ablog.post_date_format_short)) + " - " + recent.title }}</a></li>
<li><a href="{{ pathto(recent.docname) }}{{ anchor(recent) }}">{{ recent.date.strftime(ablog.post_date_format_short) + " - " + recent.title }}</a></li>
{% endfor %}
</ul>
{% endif %}