diff --git a/src/layers/installations/installationFeedbackLocale.test.mjs b/src/layers/installations/installationFeedbackLocale.test.mjs index 7dac443510..f85a0b3ae5 100644 --- a/src/layers/installations/installationFeedbackLocale.test.mjs +++ b/src/layers/installations/installationFeedbackLocale.test.mjs @@ -34,6 +34,11 @@ const cases = [ 'No mapped sites in view', () => t('No mapped sites in view'), ], + [ + { status: 'ready', lastUpdate: 1, records: [{ kind: 'installation' }] }, + '1 mapped site in view', + () => tn(1, '{count} mapped site in view', '{count} mapped sites in view'), + ], [ { status: 'ready', diff --git a/src/ui/statusText.js b/src/ui/statusText.js index b241abdbff..12d2025cc6 100644 --- a/src/ui/statusText.js +++ b/src/ui/statusText.js @@ -255,12 +255,12 @@ const MAPPED_SITE_PATTERNS = [ ], ]; +// Every status piece shape, in matching order. +const STATUS_SHAPES = [...STATUS_PIECE_PATTERNS, ...MAPPED_SITE_PATTERNS]; + /** A status piece by its shape in the UI language, or null. */ function statusPatternText(piece) { - for (const [pattern, format] of [ - ...STATUS_PIECE_PATTERNS, - ...MAPPED_SITE_PATTERNS, - ]) { + for (const [pattern, format] of STATUS_SHAPES) { const match = pattern.exec(piece); if (match) return format(match); }