From 0b28648e6d09d04f95d3f6e46692e16c26e7b8ae Mon Sep 17 00:00:00 2001 From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com> Date: Sun, 27 Sep 2020 18:42:27 -0400 Subject: [PATCH] Add plural form support for multiselection page title (close #8026) --- data/core.yaml | 4 +++- dist/locales/en.json | 5 ++++- modules/behavior/hash.js | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/data/core.yaml b/data/core.yaml index b1f38a03e..1a8aa3d45 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -22,7 +22,9 @@ en: context: "{base} – {context}" changes: "({changes}) {base}" changes_context: "({changes}) {base} – {context}" - labeled_and_more: "{labeled} and {count} more" + labeled_and_more: + one: "{labeled} and {count} more" + other: "{labeled} and {count} more" modes: add_area: title: Area diff --git a/dist/locales/en.json b/dist/locales/en.json index 2eb668b38..f3680952f 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -26,7 +26,10 @@ "changes": "({changes}) {base}", "changes_context": "({changes}) {base} – {context}" }, - "labeled_and_more": "{labeled} and {count} more" + "labeled_and_more": { + "one": "{labeled} and {count} more", + "other": "{labeled} and {count} more" + } }, "modes": { "add_area": { diff --git a/modules/behavior/hash.js b/modules/behavior/hash.js index ce039c28b..4f7d1a600 100644 --- a/modules/behavior/hash.js +++ b/modules/behavior/hash.js @@ -62,7 +62,7 @@ export function behaviorHash(context) { if (selected.length > 1 ) { contextual = t('title.labeled_and_more', { labeled: firstLabel, - count: (selected.length - 1).toString() + count: selected.length - 1 }); } else { contextual = firstLabel;