This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git


The following commit(s) were added to refs/heads/main by this push:
     new d0272ce  Fix a problem with pluralisation
d0272ce is described below

commit d0272cef94dd39b3ad599e0c223917d3765c0716
Author: Sean B. Palmer <[email protected]>
AuthorDate: Mon Dec 29 17:02:02 2025 +0000

    Fix a problem with pluralisation
---
 atr/get/committees.py                  | 1 +
 atr/templates/committee-directory.html | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/atr/get/committees.py b/atr/get/committees.py
index 9036749..a660aea 100644
--- a/atr/get/committees.py
+++ b/atr/get/committees.py
@@ -39,6 +39,7 @@ async def directory(session: web.Committer | None) -> str:
             "committee-directory.html",
             committees=committees,
             committee_is_standing=util.committee_is_standing,
+            plural_fn=util.plural,
         )
 
 
diff --git a/atr/templates/committee-directory.html 
b/atr/templates/committee-directory.html
index 8dba8e6..cf9e47e 100644
--- a/atr/templates/committee-directory.html
+++ b/atr/templates/committee-directory.html
@@ -141,12 +141,13 @@
                                 </div>
                             {% endfor %}
                             {% if committee.projects|length > 
max_initial_projects %}
+                                {% set extra_count = committee.projects|length 
- max_initial_projects %}
                                 <button type="button"
                                         class="btn btn-sm 
btn-outline-secondary mt-2 page-toggle-committee-projects"
                                         aria-expanded="false"
-                                        data-text-show="Show {{ 
committee.projects|length - max_initial_projects }} more projects..."
+                                        data-text-show="Show {{ extra_count }} 
more {{ plural_fn(extra_count, 'project', include_count=False) }}..."
                                         data-text-hide="Show less...">
-                                    Show {{ committee.projects|length - 
max_initial_projects }} more projects...
+                                    Show {{ extra_count }} more {{ 
plural_fn(extra_count, 'project', include_count=False) }}...
                                 </button>
                             {% endif %}
                 {# Add an else clause here if we decide to show an alternative 
to an empty card #}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to