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

View file

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

View file

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

View file

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

View file

@ -12,7 +12,7 @@
</div> </div>
<div class="search-details"> <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> <span class="search-date">{{ page.date|td(null, config.system.pages.dateformat.short) }}</span>
{% else %} {% else %}
<span class="search-date">{{ page.date|date(config.system.pages.dateformat.short) }}</span> <span class="search-date">{{ page.date|date(config.system.pages.dateformat.short) }}</span>