diff --git a/src/utils/translation.tsx b/src/utils/translation.tsx index a1cba453d..14ea8657f 100644 --- a/src/utils/translation.tsx +++ b/src/utils/translation.tsx @@ -110,7 +110,8 @@ export function $t(key: string, variables?: Record): string { if (!variables || !variables.count) throw new Error(`translation key ${key} is an object (requires plurality?)`); if (variables.count) { - const pluralTag = new Intl.PluralRules(bestLocale).select(variables.count); + const pluralTag: Intl.LDMLPluralRule = variables.count === 0 ? "zero" : + new Intl.PluralRules(bestLocale).select(variables.count); if (translation[pluralTag]) { return format(translation[pluralTag]!, variables);