From 1c9b38941ff02cd90f385c72726a1ef4d38197c1 Mon Sep 17 00:00:00 2001 From: Tchama Date: Mon, 3 Aug 2020 11:10:39 +0200 Subject: [PATCH] install twig intl-extra, replace localizeddate filter by format_date --- Resources/views/AccompanyingPeriod/form.html.twig | 2 +- Resources/views/AccompanyingPeriod/list.html.twig | 6 +++--- Resources/views/Address/list.html.twig | 2 +- Resources/views/Person/create_review.html.twig | 6 +++--- Resources/views/Person/list.html.twig | 4 +++- Resources/views/Person/list_by_phonenumber.html.twig | 2 +- Resources/views/Person/view.html.twig | 2 +- Resources/views/Timeline/closing_period.html.twig | 2 +- Resources/views/Timeline/opening_period.html.twig | 2 +- Resources/views/layout.html.twig | 2 +- 10 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Resources/views/AccompanyingPeriod/form.html.twig b/Resources/views/AccompanyingPeriod/form.html.twig index 04645224c..05d6b5d38 100644 --- a/Resources/views/AccompanyingPeriod/form.html.twig +++ b/Resources/views/AccompanyingPeriod/form.html.twig @@ -26,7 +26,7 @@

{{ 'Last opening since %last_opening%'|trans( - { '%last_opening%' : accompanying_period.openingDate|localizeddate('long', 'none', app.request.locale) }) }} + { '%last_opening%' : accompanying_period.openingDate|format_date('long', 'none') }) }}

{% if form.openingDate is defined %} diff --git a/Resources/views/AccompanyingPeriod/list.html.twig b/Resources/views/AccompanyingPeriod/list.html.twig index ab84aec11..7a41eb0d8 100644 --- a/Resources/views/AccompanyingPeriod/list.html.twig +++ b/Resources/views/AccompanyingPeriod/list.html.twig @@ -22,11 +22,11 @@ {% if accompanying_period.closingDate == null %} - {{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': accompanying_period.openingDate|localizeddate('long', 'none') } ) }} + {{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': accompanying_period.openingDate|format_date('long', 'none') } ) }} {% else %} {{ 'accompanying_period.dates_from_%opening_date%_to_%closing_date%'|trans({ - '%opening_date%': accompanying_period.openingDate|localizeddate('long', 'none'), - '%closing_date%': accompanying_period.closingDate|localizeddate('long', 'none')} + '%opening_date%': accompanying_period.openingDate|format_date('long', 'none'), + '%closing_date%': accompanying_period.closingDate|format_date('long', 'none')} ) }} {% if accompanying_period.isOpen == false %} diff --git a/Resources/views/Address/list.html.twig b/Resources/views/Address/list.html.twig index 65f025794..ed7d6dd96 100644 --- a/Resources/views/Address/list.html.twig +++ b/Resources/views/Address/list.html.twig @@ -47,7 +47,7 @@ {% else %} {% for address in person.addresses %} - {{ 'Since %date%'|trans( { '%date%' : address.validFrom|localizeddate('long', 'none') } ) }} + {{ 'Since %date%'|trans( { '%date%' : address.validFrom|format_date('long', 'none') } ) }} {{ address_macros._render(address, { 'with_valid_from' : false, 'has_no_address': true } ) }} diff --git a/Resources/views/Person/create_review.html.twig b/Resources/views/Person/create_review.html.twig index e1d7fe454..d969f0ec1 100644 --- a/Resources/views/Person/create_review.html.twig +++ b/Resources/views/Person/create_review.html.twig @@ -51,7 +51,7 @@ {% endapply %} - {% if person.birthdate is not null %}{{ person.birthdate|localizeddate('long', 'none', app.request.locale) }}{% else %} {% endif %} + {% if person.birthdate is not null %}{{ person.birthdate|format_date('long', 'none', app.request.locale) }}{% else %} {% endif %} {% if person.nationality is not null %}{{ person.nationality.name|localize_translatable_string }}{% else %}{{ 'Without nationality'|trans }}{% endif %} @@ -69,13 +69,13 @@
{{ person|chill_entity_render_string }}
{{ 'Date of birth'|trans }}
-
{{ birthdate|localizeddate('long', 'none', app.request.locale)|default( 'Unknown date of birth'|trans ) }}
+
{{ birthdate|format_date('long', 'none', app.request.locale)|default( 'Unknown date of birth'|trans ) }}
{{ 'Gender'|trans }}
{{ gender|trans }}
{{ 'Creation date'|trans }}
-
{{ creation_date|localizeddate('long', 'none', app.request.locale) }}
+
{{ creation_date|format_date('long', 'none', app.request.locale) }}
{% if form.altNames is defined %} {# mark as rendered #} diff --git a/Resources/views/Person/list.html.twig b/Resources/views/Person/list.html.twig index e4f2896c2..b51171068 100644 --- a/Resources/views/Person/list.html.twig +++ b/Resources/views/Person/list.html.twig @@ -55,7 +55,9 @@ - {% if person.birthdate is not null %}{{person.birthdate|localizeddate('long', 'none', app.request.locale) }}{% else %}{{ 'Unknown date of birth'|trans }}{% endif %} + {% if person.birthdate is not null %} + {{ person.birthdate|format_date('long', 'none') }} + {% else %}{{ 'Unknown date of birth'|trans }}{% endif %} {% if person.nationality is not null %} diff --git a/Resources/views/Person/list_by_phonenumber.html.twig b/Resources/views/Person/list_by_phonenumber.html.twig index 44444024b..c9667f3c9 100644 --- a/Resources/views/Person/list_by_phonenumber.html.twig +++ b/Resources/views/Person/list_by_phonenumber.html.twig @@ -55,7 +55,7 @@ - {% if person.birthdate is not null %}{{person.birthdate|localizeddate('long', 'none', app.request.locale) }}{% else %}{{ 'Unknown date of birth'|trans }}{% endif %} + {% if person.birthdate is not null %}{{person.birthdate|format_date('long', 'none', app.request.locale) }}{% else %}{{ 'Unknown date of birth'|trans }}{% endif %}