Lint rules
missing-plural-count
errorFlags a translated plural case that covers more than one number but leaves out the count the source shows.
Why this is bad
If the source shows the count (#), a translated case that covers more than one number has to show it too, or readers see the same text for different numbers.
Which numbers a case covers varies by language: E.g. Portuguese one also covers 0.
Examples
Given this source message:
messages/en.json
{"goals": "{count, plural, one {One goal} other {# goals}}"}
Examples of incorrect code for this rule:
messages/de.json
{"goals": "{count, plural, one {Ein Ziel} other {Ziele}}"}
(other covers 0, 2, 3, …)
messages/pt.json
{"goals": "{count, plural, one {Uma meta} other {# metas}}"}
(Portuguese selects one for 0 too)
Examples of correct code for this rule:
messages/de.json
{"goals": "{count, plural, one {Ein Ziel} other {# Ziele}}"}
messages/pt.json
{"goals": "{count, plural, =0 {Nenhuma meta} one {Uma meta} other {# metas}}"}
(=0 takes 0, so one only covers 1)
How to fix it
Re-translate the message for the flagged locale with eloqnt translate. Passing --id replaces the existing translation, and the post-translation checks reject any attempt that drops the count from such a case.
npx eloqnt translate --id goals --locale pt
To fix it manually, add # to the flagged case. If the extra number is 0, you can instead add a =0 case to the translation, so the flagged case can keep its wording.