From e8b08f813209355dc7014e929a60300cfec7eb8a Mon Sep 17 00:00:00 2001 From: Eric Bremner <ebremner@uwaterloo.ca> Date: Thu, 21 Nov 2024 10:13:05 -0500 Subject: [PATCH] ISTWCMS-7156: update dates to use correct translated dates --- .../card/card-elements/_date.twig | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/patterns/04-components/card/card-elements/_date.twig b/src/patterns/04-components/card/card-elements/_date.twig index 8766c3b9..cd48aed3 100644 --- a/src/patterns/04-components/card/card-elements/_date.twig +++ b/src/patterns/04-components/card/card-elements/_date.twig @@ -52,28 +52,28 @@ {% include '@components/date/_date.twig' with { 'date_format': 'long', 'date': d.start_date, - 'translated': d['translated']['start_date'][date_format] ?? null, + 'translated': d['translated']['start_date']['long'] ?? null, 'timezone': d.timezone, } %} ({{ d['translated']['all_day'] }}) {% else %} {% include '@components/date/_date.twig' with { 'date_format': 'long_with_time', 'date': d.start_date, - 'translated': d['translated']['start_date'][date_format] ?? null, + 'translated': d['translated']['start_date']['long_with_time'] ?? null, 'timezone': d.timezone, } %} - {% include '@components/date/_date.twig' with { 'date_format': 'time_only', 'date': d.end_date, - 'translated': d['translated']['start_date'][date_format] ?? null, + 'translated': d['translated']['start_date']['time_only'] ?? null, 'timezone': d.timezone, } %} {% include '@components/date/_date.twig' with { 'date_format': 'timezone', 'date': d.start_date, - 'translated': d['translated']['start_date'][date_format] ?? null, + 'translated': d['translated']['start_date']['timezone'] ?? null, 'timezone': d.timezone, } %} {% endif %} @@ -83,35 +83,35 @@ {% include '@components/date/_date.twig' with { 'date_format': 'long', 'date': d.start_date, - 'translated': d['translated']['start_date'][date_format] ?? null, + 'translated': d['translated']['start_date']['long'] ?? null, 'timezone': d.timezone, } %} - {% include '@components/date/_date.twig' with { 'date_format': 'long', 'date': d.end_date, - 'translated': d['translated']['end_date'][date_format] ?? null, + 'translated': d['translated']['end_date']['long'] ?? null, 'timezone': d.timezone, } %} ({{ d['translated']['all_day'] }}) {% else %} {% include '@components/date/_date.twig' with { 'date_format': 'long_with_time', 'date': d.start_date, - 'translated': d['translated']['start_date'][date_format] ?? null, + 'translated': d['translated']['start_date']['long_with_time'] ?? null, 'timezone': d.timezone, } %} - {% include '@components/date/_date.twig' with { 'date_format': 'long_with_time', 'date': d.end_date, - 'translated': d['translated']['end_date'][date_format] ?? null, + 'translated': d['translated']['end_date']['long_with_time'] ?? null, 'timezone': d.timezone, } %} {% include '@components/date/_date.twig' with { 'date_format': 'timezone', 'date': d.start_date, - 'translated': d['translated']['start_date'][date_format] ?? null, + 'translated': d['translated']['start_date']['timezone'] ?? null, 'timezone': d.timezone, } %} {% endif %} -- GitLab