Fixed date translation

This commit is contained in:
pikim 2023-01-22 20:24:10 +01:00
parent aacdb083ad
commit 01bc8e5b6d
5 changed files with 9 additions and 9 deletions

View file

@ -6,8 +6,8 @@
<h2>{{ form.message }}</h2>
</div>
<div class="meta">
{% if plugin.translate_date.enabled %}
<time class="published" datetime="{{ form.date|td(null, "Y-m-d") }}">{{ form.date|td }}</time>
{% if config.plugins["translate-date"].enabled %}
<time class="published" datetime="{{ form.date|td(null, "Y-m-d") }}">{{ form.date|td(null, "M j, Y") }}</time>
{% else %}
<time class="published" datetime="{{ form.date|date("Y-m-d") }}">{{ form.date|date("M j, Y") }}</time>
{% endif %}

View file

@ -12,8 +12,8 @@
<h3>
<a href="{{p.url}}">{{ p.title }}</a>
</h3>
{% if plugin.translate_date.enabled %}
<time class="published" datetime="{{ p.date|td(null, "Y-m-d") }}">{{ p.date|td }}</time>
{% if config.plugins["translate-date"].enabled %}
<time class="published" datetime="{{ p.date|td(null, "Y-m-d") }}">{{ p.date|td(null, "M j, Y") }}</time>
{% else %}
<time class="published" datetime="{{ p.date|date("Y-m-d") }}">{{ p.date|date("M j, Y") }}</time>
{% endif %}

View file

@ -31,8 +31,8 @@
{% endif %}
</div>
<div class="meta">
{% if plugin.translate_date.enabled %}
<time class="published" itemprop="datePublished" datetime="{{ page.date|td(null, "Y-m-d") }}">{{ page.date|td }}</time>
{% if config.plugins["translate-date"].enabled %}
<time class="published" itemprop="datePublished" datetime="{{ page.date|td(null, "Y-m-d") }}">{{ page.date|td(null, "M j, Y") }}</time>
{% else %}
<time class="published" itemprop="datePublished" datetime="{{ page.date|date("Y-m-d") }}">{{ page.date|date("M j, Y") }}</time>
{% endif %}

View file

@ -12,8 +12,8 @@
<h3>
<a href="{{ p.url }}">{{ p.title }}</a>
</h3>
{% if plugin.translate_date.enabled %}
<time class="published" datetime="{{ p.date|td(null, "Y-m-d") }}">{{ p.date|td }}</time>
{% if config.plugins["translate-date"].enabled %}
<time class="published" datetime="{{ p.date|td(null, "Y-m-d") }}">{{ p.date|td(null, "M j, Y") }}</time>
{% else %}
<time class="published" datetime="{{ p.date|date("Y-m-d") }}">{{ p.date|date("M j, Y") }}</time>
{% endif %}

View file

@ -12,7 +12,7 @@
</div>
<div class="search-details">
{% if plugin.translate_date.enabled %}
{% if config.plugins["translate-date"].enabled %}
<span class="search-date">{{ page.date|td(null, config.system.pages.dateformat.short) }}</span>
{% else %}
<span class="search-date">{{ page.date|date(config.system.pages.dateformat.short) }}</span>