From 0e6764092a6db57ee5b1278396453800c9f2ac71 Mon Sep 17 00:00:00 2001 From: Mikko Tapionlinna Date: Thu, 12 Jan 2023 17:23:49 +0200 Subject: [PATCH] UHF-7685: Show message when newslist has now news to list --- templates/paragraphs/paragraph--news-list.html.twig | 10 +++++++--- translations/fi.po | 4 ++++ translations/sv.po | 4 ++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/templates/paragraphs/paragraph--news-list.html.twig b/templates/paragraphs/paragraph--news-list.html.twig index 1deea510e..36118bd24 100644 --- a/templates/paragraphs/paragraph--news-list.html.twig +++ b/templates/paragraphs/paragraph--news-list.html.twig @@ -8,9 +8,13 @@ %} {% block component_content %} - + {% if content.news_list %} + + {% else %} +

{{ 'No related news.'|t({}, {'context': 'When newslist component does not have any news to list'}) }}

+ {% endif %} {% set link_title %} {{ 'See all the news'|t({}, {'context' : 'News list paragraph see all news link'}) }} diff --git a/translations/fi.po b/translations/fi.po index 19bd0af00..0e0c4ae5c 100644 --- a/translations/fi.po +++ b/translations/fi.po @@ -311,3 +311,7 @@ msgstr "Pikalinkit" msgctxt "TPR unit daycare distance" msgid "Distance" msgstr "Etäisyys" + +msgctxt "When newslist component does not have any news to list" +msgid "No related news." +msgstr "Ei uutisia tästä aiheesta." diff --git a/translations/sv.po b/translations/sv.po index 53f5c3499..f90dae352 100644 --- a/translations/sv.po +++ b/translations/sv.po @@ -308,3 +308,7 @@ msgstr "Snabblänkar" msgctxt "TPR unit daycare distance" msgid "Distance" msgstr "Distans" + +msgctxt "When newslist component does not have any news to list" +msgid "No related news." +msgstr "Inga nyheter i ämnet."