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> <p>
{% if fa %}{% endif %} {% if fa %}{% endif %}
{% if post.published %} {% if post.published %}
{{ post.date.strftime(gettext(ablog.post_date_format)) }} {{ post.date.strftime(ablog.post_date_format) }}
{% else %} {% else %}
Draft Draft
{% endif %} {% endif %}

View file

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

View file

@ -4,10 +4,10 @@
<h2> <h2>
{% if post.published %} {% if post.published %}
{% if fa %}<i class="fa fa-calendar"></i>{% endif %} {% 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 %} {% else %}
{% if fa %}<i class="fa fa-pencil"></i>{% endif %} {% 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 %} {% else %} Draft {% endif %}
{% endif %} {% endif %}
</h2> </h2>

View file

@ -1,6 +1,6 @@
{% if post.published and post.date != post.update %} {% 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> <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 %} {% endif %}
{% if post.author %} {% if post.author %}

View file

@ -3,7 +3,7 @@
<ul> <ul>
{% set pcount = 1 %} {% set pcount = 1 %}
{% for recent in ablog.recent(5, pagename) %} {% 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 %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}