From ea9e3fdb6fd9682aefb36ea5ee1e1496cc3cecd4 Mon Sep 17 00:00:00 2001
From: Hangzhi Yu <hangzhi@protonmail.com>
Date: Sun, 3 Nov 2024 15:20:09 +0100
Subject: [PATCH] Refine person count on mobile lesson notes view

---
 .../coursebook/documentation/LessonNotes.vue         | 12 +++++++++---
 aleksis/apps/alsijil/frontend/messages/en.json       |  2 +-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/documentation/LessonNotes.vue b/aleksis/apps/alsijil/frontend/components/coursebook/documentation/LessonNotes.vue
index f5919cf51..81cd941dd 100644
--- a/aleksis/apps/alsijil/frontend/components/coursebook/documentation/LessonNotes.vue
+++ b/aleksis/apps/alsijil/frontend/components/coursebook/documentation/LessonNotes.vue
@@ -70,7 +70,10 @@ import TextNoteCard from "../personal_notes/TextNoteCard.vue";
                 </template>
                 <span v-else>
                   {{
-                    `${participations.length} ${$t("alsijil.coursebook.notes.persons")}`
+                    $tc(
+                      "alsijil.coursebook.notes.persons",
+                      participations.length,
+                    )
                   }}
                 </span>
               </span>
@@ -119,7 +122,7 @@ import TextNoteCard from "../personal_notes/TextNoteCard.vue";
               </template>
               <span v-else>
                 {{
-                  `${participations.length} ${$t("alsijil.coursebook.notes.persons")}`
+                  $tc("alsijil.coursebook.notes.persons", participations.length)
                 }}
               </span>
             </span>
@@ -166,7 +169,10 @@ import TextNoteCard from "../personal_notes/TextNoteCard.vue";
               </template>
               <span v-else>
                 {{
-                  `${tardyParticipations.length} ${$t("alsijil.coursebook.notes.persons")}`
+                  $tc(
+                    "alsijil.coursebook.notes.persons",
+                    tardyParticipations.length,
+                  )
                 }}
               </span>
             </span>
diff --git a/aleksis/apps/alsijil/frontend/messages/en.json b/aleksis/apps/alsijil/frontend/messages/en.json
index cdf63269d..6f5e44abd 100644
--- a/aleksis/apps/alsijil/frontend/messages/en.json
+++ b/aleksis/apps/alsijil/frontend/messages/en.json
@@ -79,7 +79,7 @@
       "notes": {
         "show_list": "List of participants",
         "future": "Lesson is in the future",
-        "persons": "Persons"
+        "persons": "One person | {count} persons"
       },
       "notices": {
         "future": "Editing this lesson isn't allowed as this lesson is in the future.",
-- 
GitLab