From e14b9b7319ccb554c00e71797c3b5307a9ac499f Mon Sep 17 00:00:00 2001 From: Hanna Rognerud Date: Wed, 18 Dec 2024 14:01:02 +0100 Subject: [PATCH 1/2] Add text for multiple notifications --- packages/spor-react/src/alert/ServiceAlert.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/spor-react/src/alert/ServiceAlert.tsx b/packages/spor-react/src/alert/ServiceAlert.tsx index d5103ffdc..7d22c1068 100644 --- a/packages/spor-react/src/alert/ServiceAlert.tsx +++ b/packages/spor-react/src/alert/ServiceAlert.tsx @@ -157,8 +157,8 @@ const texts = createTexts({ notification: (notification) => { const numNotification = Number(notification); return { - nb: `${numNotification} varsel`, - nn: `${numNotification} varsel`, + nb: `${numNotification} ${numNotification > 1 ? "varsler" : "varsel"}`, + nn: `${numNotification} ${numNotification > 1 ? "varslar" : "varsel"}`, sv: `${numNotification} ${numNotification > 1 ? "underrättelser" : "underrättelse"}`, en: `${numNotification} ${numNotification > 1 ? "notifications" : "notification"}`, }; From 89d170210773a8a4c3f96d69531c35e45584ed34 Mon Sep 17 00:00:00 2001 From: Hanna Rognerud Date: Wed, 18 Dec 2024 14:34:03 +0100 Subject: [PATCH 2/2] Add text for multiple notifications --- .changeset/warm-beans-dance.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/warm-beans-dance.md diff --git a/.changeset/warm-beans-dance.md b/.changeset/warm-beans-dance.md new file mode 100644 index 000000000..d649d750f --- /dev/null +++ b/.changeset/warm-beans-dance.md @@ -0,0 +1,5 @@ +--- +"@vygruppen/spor-react": patch +--- + +Text for multiple notifications