From 974c7738c7345a01486b27b2ccdbef7a34ada204 Mon Sep 17 00:00:00 2001
From: Thorge Petersen <petersen@rz.uni-kiel.de>
Date: Mon, 4 Mar 2024 11:22:10 +0100
Subject: [PATCH] Pluralize appl legislation

---
 ckanext/odsh/templates/package/snippets/info.html | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/ckanext/odsh/templates/package/snippets/info.html b/ckanext/odsh/templates/package/snippets/info.html
index bf3b1fd..48070fb 100644
--- a/ckanext/odsh/templates/package/snippets/info.html
+++ b/ckanext/odsh/templates/package/snippets/info.html
@@ -95,7 +95,8 @@ Example:
               {% if pkg.applicableLegislation %}
                 {% set applicable_legislation_urls = pkg.applicableLegislation.split(',') %}
                 <div class="applicableLegislation-detail info-detail">
-                  <div>{% trans al_count=applicable_legislation_urls|length %}
+                  <div>
+                    {% trans al_count=applicable_legislation_urls|length %}
                     Applicable Legislation:
                     {% pluralize %}
                     Applicable Legislation:
@@ -116,7 +117,11 @@ Example:
                 {% set hvd_urls = pkg.hvdCategory.split(',') %}
                 <div class="hvdCategories-detail info-detail">
                   <div>
-                    {{ _('HVD Categories') }}:
+                    {% trans hvd_count=hvd_urls|length %}
+                    HVD Category:
+                    {% pluralize %}
+                    HVD Categories:
+                    {% endtrans %}
                     <a data-module="odsh_popover" data-module-trigger="custom" data-module-text="{{ _('A High-Value Dataset (HVD) category refers to a group of datasets that are considered particularly important and valuable. These datasets cover various topics such as maps, environmental data, weather information, statistics, company details, and data related to transportation. The European Commission has identified six main categories of these high-value datasets to ensure that they are easily accessible and useful for different purposes. These categories help to organize and prioritize datasets that have the potential to significantly benefit European citizens and businesses.') }}" title="{{ _('HVD Categories') }}">
                       <i class="fa fa-circle-info"></i>
                     </a>
@@ -135,7 +140,7 @@ Example:
         </div>
         {% set map_text = h.odsh_get_spatial_text(pkg) %}
         <div class="spatial-detail info-detail">
-          <div>{{ _('Spatial uri') }}:</div>
+          <div>{{ _('Spatial URI') }}:</div>
           {%set ext=map_text if map_text else '-'%}
           <p>{{ ext }}</p>
         </div>
-- 
GitLab