Update translatable strings

Stop using the `_()` function, and use `{% trans %}` tags instead.
This commit is contained in:
2018-07-16 10:42:25 +02:00
parent 496b638694
commit 808c6bbdde
4 changed files with 18 additions and 6 deletions

View File

@@ -1,17 +1,21 @@
{% extends 'base.html' %}
{% from '_macros.html' import field %}
{% macro time_zone_warning() %}
{% trans timezone=event.time_zone, start_time=event.start_time_tz | datetimeformat(rebase=false), end_time=event.end_time_tz | datetimeformat(rebase=false) -%}
This event is organised in the {{timezone}} time zone, in which it happens between {{start_time}} and {{end_time}}
{%- endtrans %}
{% endmacro %}
{% block content %}
<h2 class="ui header">
<div class="content">
{{ event.title }}<br>
<div class="sub header">
{%- if current_user.timezone | string != event.time_zone -%}
<span title="{{ _('This event is organised in the %(timezone)s time zone, in which it happens between %(start_time)s and %(end_time)s', timezone=event.time_zone, start_time=event.start_time_tz|datetimeformat(rebase=false), end_time=event.end_time_tz|datetimeformat(rebase=false)) }}">
<span title="{{ time_zone_warning() }}">
<i class="fa fa-exclamation-triangle timezone-warning"></i>
<span class="sr-only">
{{ _('This event is organised in the %(timezone)s time zone, in which it happens between %(start_time)s and %(end_time)s', timezone=event.time_zone, start_time=event.start_time_tz, end_time=event.end_time_tz) }}
</span>
<span class="sr-only">{{ time_zone_warning() }}</span>
</span>
{% endif %}
{{ event.start_time_for_user(current_user) | datetimeformat(rebase=false) }}