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 68ea0b59d4..e172f2a0ed 100644 --- a/src/govuk/components/character-count/character-count.unit.test.mjs +++ b/src/govuk/components/character-count/character-count.unit.test.mjs @@ -92,13 +92,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 02c3898736..68e6d54143 100644 --- a/src/govuk/i18n.mjs +++ b/src/govuk/i18n.mjs @@ -372,7 +372,7 @@ I18n.pluralRules = { * translations to a component's constructor * * @typedef {object} TranslationPluralised - * @property {Translation} other - General plural form + * @property {Translation} [other] - General plural form * @property {Translation} [zero] - Plural form used with 0 * @property {Translation} [one] - Plural form used with 1 * @property {Translation} [two] - Plural form used with 2