diff --git a/src/govuk/components/character-count/character-count.unit.test.mjs b/src/govuk/components/character-count/character-count.unit.test.mjs index dc71b60615..88aa6f92b4 100644 --- a/src/govuk/components/character-count/character-count.unit.test.mjs +++ b/src/govuk/components/character-count/character-count.unit.test.mjs @@ -102,13 +102,11 @@ describe('CharacterCount', () => { const component = new CharacterCount($div, { i18n: { charactersUnderLimit: { - one: 'Different custom text. Count: %{count}', - other: 'Different custom text. Count: %{count}' + one: 'Different custom text. Count: %{count}' } } }) expect(component.formatCountMessage(1, 'characters')).toEqual('Custom text. Count: 1') - expect(component.formatCountMessage(10, 'characters')).toEqual('Different custom text. Count: 10') // Other keys remain untouched expect(component.formatCountMessage(-10, 'characters')).toEqual('You have 10 characters too many') expect(component.formatCountMessage(0, 'characters')).toEqual('You have 0 characters remaining') diff --git a/src/govuk/i18n.mjs b/src/govuk/i18n.mjs index 83ec6c96c0..ee4035bd9e 100644 --- a/src/govuk/i18n.mjs +++ b/src/govuk/i18n.mjs @@ -364,7 +364,7 @@ I18n.pluralRules = { * translations to a component's constructor * * @typedef {object} TranslationPluralForms - * @property {string} other - General plural form + * @property {string} [other] - General plural form * @property {string} [zero] - Plural form used with 0 * @property {string} [one] - Plural form used with 1 * @property {string} [two] - Plural form used with 2