Skip to content

Commit

Permalink
Merge pull request #32 from dgarcia360/master
Browse files Browse the repository at this point in the history
Fixed gettext is broken when ablog is used #30
  • Loading branch information
nabobalis authored Feb 10, 2019
2 parents 7b06519 + 257f786 commit 40c65f2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ablog/templates/catalog.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h2>
<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 %}
Expand Down
6 changes: 3 additions & 3 deletions ablog/templates/collection.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1>
<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 %}
Expand All @@ -36,10 +36,10 @@ <h2><a href="{{ pathto(post.docname) }}{{ anchor(post) }}">{{ post.title }}</a><
<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>
Expand Down
4 changes: 2 additions & 2 deletions ablog/templates/postcard.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion ablog/templates/postcard2.html
Original file line number Diff line number Diff line change
@@ -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 %}
Expand Down
2 changes: 1 addition & 1 deletion ablog/templates/recentposts.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ <h3><a href="{{ pathto(ablog.blog_path) }}">{{ gettext('Recent Posts') }}</a></h
<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 %}

0 comments on commit 40c65f2

Please sign in to comment.