From 5f438e86231ac23a0058ef646c43801cc1b3794a Mon Sep 17 00:00:00 2001 From: Tero Elonen Date: Tue, 9 Jan 2024 17:35:38 +0200 Subject: [PATCH 1/3] UHF-9067: Add changes to daycare, high school, vocational school, playground and after school activity search result labels --- ...ew--after-school-activity-search.html.twig | 7 ++-- .../views-view--daycare-search.html.twig | 7 ++-- .../views-view--high-school-search.html.twig | 11 +++---- .../views-view--playground-search.html.twig | 7 ++-- ...s-view--vocational-school-search.html.twig | 7 ++-- .../custom/hdbt_subtheme/translations/fi.po | 32 +++++++++---------- .../custom/hdbt_subtheme/translations/sv.po | 32 +++++++++---------- 7 files changed, 49 insertions(+), 54 deletions(-) diff --git a/public/themes/custom/hdbt_subtheme/templates/views/views-view--after-school-activity-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/views/views-view--after-school-activity-search.html.twig index 6e446c3c..7e7ef088 100644 --- a/public/themes/custom/hdbt_subtheme/templates/views/views-view--after-school-activity-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/views/views-view--after-school-activity-search.html.twig @@ -50,10 +50,9 @@
{% if total_rows %} - - {{ total_rows }} - {% trans with {'context': 'After-school activity search count'}%}location{% plural total_rows %}locations{% endtrans %} - +

+ {{ total_rows }} {% trans with {'context': 'After-school activity search count'}%}activity location{% plural total_rows %}activity locations{% endtrans %} +

{% endif %} {% if header %} diff --git a/public/themes/custom/hdbt_subtheme/templates/views/views-view--daycare-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/views/views-view--daycare-search.html.twig index 611d9f9d..6e9e1e6c 100644 --- a/public/themes/custom/hdbt_subtheme/templates/views/views-view--daycare-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/views/views-view--daycare-search.html.twig @@ -49,10 +49,9 @@ {{ attachment_before }}
- - {{ total_rows }} - {% trans with {'context': 'Daycare search count'}%}location{% plural total_rows %}locations{% endtrans %} - +

+ {{ total_rows }} {% trans with {'context': 'Daycare search count'}%}daycare centre{% plural total_rows %}daycare centres{% endtrans %} +

{% if header %} {{ header }} diff --git a/public/themes/custom/hdbt_subtheme/templates/views/views-view--high-school-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/views/views-view--high-school-search.html.twig index ff6b2a14..00851af6 100644 --- a/public/themes/custom/hdbt_subtheme/templates/views/views-view--high-school-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/views/views-view--high-school-search.html.twig @@ -60,10 +60,9 @@
- - {{ total_rows }} - {% trans with {'context': 'High school search count'}%}general upper secondary school{% plural total_rows %}general upper secondary schools{% endtrans %} - +

+ {{ total_rows }} {% trans with {'context': 'High school search count'}%}general upper secondary school{% plural total_rows %}general upper secondary schools{% endtrans %} +

{% if total_rows %} - - {{ total_rows }} - {% trans with {'context': 'Playground search count'}%}location{% plural total_rows %}locations{% endtrans %} - +

+ {{ total_rows }} {% trans with {'context': 'Playground search count'}%}playground or family house{% plural total_rows %}playgrounds or family houses{% endtrans %} +

{% endif %} {% if header %} diff --git a/public/themes/custom/hdbt_subtheme/templates/views/views-view--vocational-school-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/views/views-view--vocational-school-search.html.twig index 043de525..13ebe14c 100644 --- a/public/themes/custom/hdbt_subtheme/templates/views/views-view--vocational-school-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/views/views-view--vocational-school-search.html.twig @@ -54,10 +54,9 @@ {{ attachment_before }}
- - {{ total_rows }} - {% trans with {'context': 'Vocational school search count'}%}unit{% plural total_rows %}units{% endtrans %} - +

+ {{ total_rows }} {% trans with {'context': 'Vocational school search count'}%}unit{% plural total_rows %}units{% endtrans %} +

{{ rows }} diff --git a/public/themes/custom/hdbt_subtheme/translations/fi.po b/public/themes/custom/hdbt_subtheme/translations/fi.po index d74f783a..6603a01b 100644 --- a/public/themes/custom/hdbt_subtheme/translations/fi.po +++ b/public/themes/custom/hdbt_subtheme/translations/fi.po @@ -23,32 +23,32 @@ msgid_plural "units" msgstr[0] "toimipaikka" msgstr[1] "toimipaikkaa" -msgid "Show results on a map" -msgstr "Näytä tulokset kartalla" +msgid "View in a map" +msgstr "Näytä kartalla" -msgid "Show results as a list" -msgstr "Näytä tulokset listana" +msgid "View as a list" +msgstr "Näytä listana" msgid "Open large version of the map" msgstr "Avaa suurempi versio kartasta" msgctxt "Daycare search count" -msgid "location" -msgid_plural "locations" -msgstr[0] "toimipaikka" -msgstr[1] "toimipaikkaa" +msgid "daycare centre" +msgid_plural "daycare centres" +msgstr[0] "päiväkoti" +msgstr[1] "päiväkotia" msgctxt "After-school activity search count" -msgid "location" -msgid_plural "locations" -msgstr[0] "toimipaikka" -msgstr[1] "toimipaikkaa" +msgid "activity location" +msgid_plural "activity locations" +msgstr[0] "toimintapaikka" +msgstr[1] "toimintapaikkaa" msgctxt "Playground search count" -msgid "location" -msgid_plural "locations" -msgstr[0] "toimipaikka" -msgstr[1] "toimipaikkaa" +msgid "playground or family house" +msgid_plural "playgrounds or family houses" +msgstr[0] "leikkipuisto tai perhetalo" +msgstr[1] "leikkipuistoa tai perhetaloa" msgctxt "Group news archive link" msgid "All news" diff --git a/public/themes/custom/hdbt_subtheme/translations/sv.po b/public/themes/custom/hdbt_subtheme/translations/sv.po index da28ccc6..7c6941e0 100644 --- a/public/themes/custom/hdbt_subtheme/translations/sv.po +++ b/public/themes/custom/hdbt_subtheme/translations/sv.po @@ -14,32 +14,32 @@ msgid_plural "units" msgstr[0] "enhet" msgstr[1] "enheter" -msgid "Show results on a map" -msgstr "Visa resultat på en karta" +msgid "View in a map" +msgstr "Visa på kartan" -msgid "Show results as a list" -msgstr "Visa resultat på en lista" +msgid "View as a list" +msgstr "Visa som lista" msgid "Open large version of the map" msgstr "Öppna den stora versionen av kartan" msgctxt "Daycare search count" -msgid "location" -msgid_plural "locations" -msgstr[0] "enhet" -msgstr[1] "enheter" +msgid "daycare centre" +msgid_plural "daycare centres" +msgstr[0] "daghem" +msgstr[1] "daghem" msgctxt "After-school activity search count" -msgid "location" -msgid_plural "locations" -msgstr[0] "enhet" -msgstr[1] "enheter" +msgid "activity location" +msgid_plural "activity locations" +msgstr[0] "verksamhetsställe" +msgstr[1] "verksamhetsställen" msgctxt "Playground search count" -msgid "location" -msgid_plural "locations" -msgstr[0] "enhet" -msgstr[1] "enheter" +msgid "playground or family house" +msgid_plural "playgrounds or family houses" +msgstr[0] "lekpark eller familjehus" +msgstr[1] "lekparker eller familjehus" msgctxt "Group news archive link" msgid "All news" From 4605ff7e6952ebc91de26582b76f8661c6363e8c Mon Sep 17 00:00:00 2001 From: Tero Elonen Date: Thu, 11 Jan 2024 11:56:29 +0200 Subject: [PATCH 2/3] UHF-9067: Update the empty text for custom unit search paragraph to match UHF-9111 requirement --- ...s-view--after-school-activity-search.html.twig | 15 ++++++++++----- ...ws-view--comprehensive-school-search.html.twig | 15 ++++++++++----- .../views/views-view--daycare-search.html.twig | 13 ++++++++++--- .../views-view--high-school-search.html.twig | 10 ++++++++-- .../views/views-view--playground-search.html.twig | 14 +++++++++----- ...views-view--vocational-school-search.html.twig | 11 +++++++++-- 6 files changed, 56 insertions(+), 22 deletions(-) diff --git a/public/themes/custom/hdbt_subtheme/templates/views/views-view--after-school-activity-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/views/views-view--after-school-activity-search.html.twig index 7e7ef088..8f8b3608 100644 --- a/public/themes/custom/hdbt_subtheme/templates/views/views-view--after-school-activity-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/views/views-view--after-school-activity-search.html.twig @@ -49,11 +49,13 @@ {{ attachment_before }}
- {% if total_rows %} -

+

+ {%- if total_rows -%} {{ total_rows }} {% trans with {'context': 'After-school activity search count'}%}activity location{% plural total_rows %}activity locations{% endtrans %} -

- {% endif %} + {%- else -%} + {{ 'No results'|t({}, {'context' : 'Unit search no results title'}) }} + {%- endif -%} + {% if header %} {{ header }} @@ -61,7 +63,10 @@ {{ rows }} - {{ empty }} + {%- if empty -%} +

{{ 'No results were found for the criteria you entered. Try changing your search criteria.'|t({}, {'context' : 'Unit search no results text'}) }}

+ {%- endif -%} + {{ pager }}
diff --git a/public/themes/custom/hdbt_subtheme/templates/views/views-view--comprehensive-school-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/views/views-view--comprehensive-school-search.html.twig index 71a1731c..96313c33 100644 --- a/public/themes/custom/hdbt_subtheme/templates/views/views-view--comprehensive-school-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/views/views-view--comprehensive-school-search.html.twig @@ -49,10 +49,13 @@ {{ attachment_before }}
- - {{ total_rows }} - {% trans with {'context': 'Comprehensive school search count'}%}school{% plural total_rows %}schools{% endtrans %} - +

+ {%- if total_rows -%} + {{ total_rows }} {% trans with {'context': 'Comprehensive school search count'}%}school{% plural total_rows %}schools{% endtrans %} + {%- else -%} + {{ 'No results'|t({}, {'context' : 'Unit search no results title'}) }} + {%- endif -%} +

{% if header %} {{ header }} @@ -60,7 +63,9 @@ {{ rows }} - {{ empty }} + {%- if empty -%} +

{{ 'No results were found for the criteria you entered. Try changing your search criteria.'|t({}, {'context' : 'Unit search no results text'}) }}

+ {%- endif -%} {{ pager }}
diff --git a/public/themes/custom/hdbt_subtheme/templates/views/views-view--daycare-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/views/views-view--daycare-search.html.twig index 6e9e1e6c..c96ec61e 100644 --- a/public/themes/custom/hdbt_subtheme/templates/views/views-view--daycare-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/views/views-view--daycare-search.html.twig @@ -50,16 +50,23 @@

- {{ total_rows }} {% trans with {'context': 'Daycare search count'}%}daycare centre{% plural total_rows %}daycare centres{% endtrans %} + {%- if total_rows -%} + {{ total_rows }} {% trans with {'context': 'Daycare search count'}%}daycare centre{% plural total_rows %}daycare centres{% endtrans %} + {%- else -%} + {{ 'No results'|t({}, {'context' : 'Unit search no results title'}) }} + {%- endif -%}

- {% if header %} + {% if header and not empty %} {{ header }} {% endif %} {{ rows }} - {{ empty }} + {%- if empty -%} +

{{ 'No results were found for the criteria you entered. Try changing your search criteria.'|t({}, {'context' : 'Unit search no results text'}) }}

+ {%- endif -%} + {{ pager }}
diff --git a/public/themes/custom/hdbt_subtheme/templates/views/views-view--high-school-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/views/views-view--high-school-search.html.twig index 00851af6..d823e3a6 100644 --- a/public/themes/custom/hdbt_subtheme/templates/views/views-view--high-school-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/views/views-view--high-school-search.html.twig @@ -61,7 +61,11 @@

- {{ total_rows }} {% trans with {'context': 'High school search count'}%}general upper secondary school{% plural total_rows %}general upper secondary schools{% endtrans %} + {%- if total_rows -%} + {{ total_rows }} {% trans with {'context': 'High school search count'}%}general upper secondary school{% plural total_rows %}general upper secondary schools{% endtrans %} + {%- else -%} + {{ 'No results'|t({}, {'context' : 'Unit search no results title'}) }} + {%- endif -%}

- {{ empty }} + {%- if empty -%} +

{{ 'No results were found for the criteria you entered. Try changing your search criteria.'|t({}, {'context' : 'Unit search no results text'}) }}

+ {%- endif -%} {{ pager }}
- {% if total_rows %} -

+

+ {%- if total_rows -%} {{ total_rows }} {% trans with {'context': 'Playground search count'}%}playground or family house{% plural total_rows %}playgrounds or family houses{% endtrans %} -

- {% endif %} + {%- else -%} + {{ 'No results'|t({}, {'context' : 'Unit search no results title'}) }} + {%- endif -%} + {% if header %} {{ header }} @@ -61,7 +63,9 @@ {{ rows }} - {{ empty }} + {%- if empty -%} +

{{ 'No results were found for the criteria you entered. Try changing your search criteria.'|t({}, {'context' : 'Unit search no results text'}) }}

+ {%- endif -%} {{ pager }}
diff --git a/public/themes/custom/hdbt_subtheme/templates/views/views-view--vocational-school-search.html.twig b/public/themes/custom/hdbt_subtheme/templates/views/views-view--vocational-school-search.html.twig index 13ebe14c..01609b1a 100644 --- a/public/themes/custom/hdbt_subtheme/templates/views/views-view--vocational-school-search.html.twig +++ b/public/themes/custom/hdbt_subtheme/templates/views/views-view--vocational-school-search.html.twig @@ -55,14 +55,21 @@

- {{ total_rows }} {% trans with {'context': 'Vocational school search count'}%}unit{% plural total_rows %}units{% endtrans %} + {%- if total_rows -%} + {{ total_rows }} {% trans with {'context': 'Vocational school search count'}%}unit{% plural total_rows %}units{% endtrans %} + {%- else -%} + {{ 'No results'|t({}, {'context' : 'Unit search no results title'}) }} + {%- endif -%}

{{ rows }}
- {{ empty }} + {%- if empty -%} +

{{ 'No results were found for the criteria you entered. Try changing your search criteria.'|t({}, {'context' : 'Unit search no results text'}) }}

+ {%- endif -%} + {{ pager }}
{{ attachment_after }} From c8397edd4cc90135da8d9443d150b669beb62cbd Mon Sep 17 00:00:00 2001 From: Tero Elonen Date: Fri, 12 Jan 2024 09:42:07 +0200 Subject: [PATCH 3/3] UHF-9067: Changed the search button term on vocational school search --- conf/cmi/language/fi/views.view.vocational_school_search.yml | 2 +- conf/cmi/language/sv/views.view.vocational_school_search.yml | 2 +- conf/cmi/views.view.vocational_school_search.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/cmi/language/fi/views.view.vocational_school_search.yml b/conf/cmi/language/fi/views.view.vocational_school_search.yml index 46223a18..4df098d0 100644 --- a/conf/cmi/language/fi/views.view.vocational_school_search.yml +++ b/conf/cmi/language/fi/views.view.vocational_school_search.yml @@ -12,4 +12,4 @@ display: label: 'Valitse koulutusala' exposed_form: options: - submit_button: Käytä + submit_button: Etsi diff --git a/conf/cmi/language/sv/views.view.vocational_school_search.yml b/conf/cmi/language/sv/views.view.vocational_school_search.yml index 4d83a28c..5a910067 100644 --- a/conf/cmi/language/sv/views.view.vocational_school_search.yml +++ b/conf/cmi/language/sv/views.view.vocational_school_search.yml @@ -12,4 +12,4 @@ display: label: 'Välj ett utbildningsområde' exposed_form: options: - submit_button: Filtrera + submit_button: Sök diff --git a/conf/cmi/views.view.vocational_school_search.yml b/conf/cmi/views.view.vocational_school_search.yml index 341f461b..a916cb5d 100644 --- a/conf/cmi/views.view.vocational_school_search.yml +++ b/conf/cmi/views.view.vocational_school_search.yml @@ -166,7 +166,7 @@ display: exposed_form: type: basic options: - submit_button: Use + submit_button: Search reset_button: false reset_button_label: Reset exposed_sorts_label: Sort