fix(i18n): carry the count in One strings where one is more than 1

The plural tier comes from CLDR, and in Russian the one category also
holds 21, 31, 101, while French and Brazilian Portuguese file 0 there.
Thirty One strings in those bundles spelled out the 1, so 21 days read
as one day. They now take {count}, as do two Russian One strings that
spelled the number as a word, and every direct call of such a key passes
the count. A guard finds the locales whose one is wider than 1 from
Intl.PluralRules and holds both ends.
This commit is contained in:
Marc-André Bombeck committed 2026-11-07 01:33:19 +01:00
1 parent 2adea7052b
commit 4921188f22
14 files changed
+270 -111

No files matched your search

@@ -74,7 +74,9 @@ export function IllnessInsightsCard({
<div className="space-y-4 text-sm">
<p className="text-foreground">
{data!.episodeCount === 1
? t("illness.insights.countOne")
? t("illness.insights.countOne", {
count: data!.episodeCount,
})
: t("illness.insights.countOther", {
count: data!.episodeCount,
})}
+1 -1
View File
@@ -77,7 +77,7 @@ function NestedEpisodes({ episodes }: { episodes?: IllnessEpisodeDTO[] }) {
{allFlares ? (
<p className="text-muted-foreground text-xs font-medium">
{count === 1
? t("illness.flares.countOne")
? t("illness.flares.countOne", { count })
: t("illness.flares.countOther", { count })}
</p>
) : null}