Added datetime localization

This commit is contained in:
Raphael Michel
2015-06-21 23:00:19 +02:00
parent 39e1f6fd75
commit e12ddcc61d
6 changed files with 7 additions and 7 deletions

View File

@@ -21,7 +21,7 @@
>{{ o.code }}</a></strong></td>
<td>{{ o.user.get_short_name }}</td>
<td>{{ o.total|floatformat:2 }} {{ request.event.currency }}</td>
<td>{{ o.datetime|date }}</td>
<td>{{ o.datetime|date:"SHORT_DATETIME_FORMAT" }}</td>
<td>{% include "pretixcontrol/orders/fragment_order_status.html" with order=o %}</td>
</tr>
{% endfor %}

View File

@@ -1,4 +1,4 @@
{% load i18n %}{% blocktrans with event=event.name total=order.total|floatformat:2 currency=event.currency paymentinfo=payment date=order.expires|date url=url %}Hello,
{% load i18n %}{% blocktrans with event=event.name total=order.total|floatformat:2 currency=event.currency paymentinfo=payment date=order.expires|date:"SHORT_DATE_FORMAT" url=url %}Hello,
we successfully received your order for {{ event }} with a total value
of {{ total }} {{ currency }}. Please complete your payment before {{ date }}.

View File

@@ -21,7 +21,7 @@
<div class="page-header">
<h1 class="pull-left">
{{ event.name }}
<small>{{ event.date_from|date }}{% if event.settings.show_date_to %} {{ event.date_to|date }}{% endif %}</small>
<small>{{ event.date_from|date:"DATE_FORMAT" }}{% if event.settings.show_date_to %} {{ event.date_to|date:"DATE_FORMAT" }}{% endif %}</small>
</h1>
<div class="pull-right loginbox">
{% if request.event.settings.locales|length > 1 %}

View File

@@ -38,7 +38,7 @@
The presale period for this event is over.
{% endblocktrans %}
{% elif event.settings.presale_start_show_date %}
{% blocktrans trimmed with date=event.presale_start|date time=event.presale_start|time %}
{% blocktrans trimmed with date=event.presale_start|date:"SHORT_DATE_FORMAT" time=event.presale_start|time:"TIME_FORMAT" %}
The presale for this event will start on {{ date }} at {{ time }}.
{% endblocktrans %}
{% else %}

View File

@@ -18,7 +18,7 @@
</div>
<div class="panel-body">
{{ payment }}
<strong>{% blocktrans trimmed with date=order.expires|date %}
<strong>{% blocktrans trimmed with date=order.expires|date:"SHORT_DATE_FORMAT" %}
Please complete your payment before {{ date }}
{% endblocktrans %}</strong>
</div>
@@ -44,7 +44,7 @@
</a>
{% endfor %}
{% else %}
{% blocktrans trimmed with date=event.settings.ticket_download_date|date %}
{% blocktrans trimmed with date=event.settings.ticket_download_date|date:"SHORT_DATE_FORMAT" %}
You will be able to download your tickets here on {{ date }}.
{% endblocktrans %}
{% endif %}

View File

@@ -21,7 +21,7 @@
{% for order in orders %}
<tr>
<td>{{ order.code }}</td>
<td>{{ order.datetime|date }}</td>
<td>{{ order.datetime|date:"SHORT_DATE_FORMAT" }}</td>
<td>{{ event.currency }} {{ order.total|floatformat:2 }}</td>
<td>{% include "pretixpresale/event/fragment_order_status.html" with order=order %}</td>
<td><a href="{% url "presale:event.order" event=request.event.slug organizer=request.event.organizer.slug order=order.code %}">