fix: literal "{count}" shown in My Recipes search result count

t("resultPlural"/"resultSingular") never got the count param the
strings' own {count} placeholder needs, while the JSX separately
prepended a raw count value next to it — visible in every locale,
worse in French where "recette"/"recettes" made the duplication
obvious. Pass count into t() and drop the redundant prefix.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Arnaud
2026-07-14 09:25:28 +02:00
parent c16342a9b9
commit 38516bff63
5 changed files with 16 additions and 4 deletions
@@ -8,7 +8,7 @@ export function RecipesEmptyState({ query, count }: { query: string; count: numb
if (count > 0) {
return query ? (
<p className="text-sm text-muted-foreground">
{count} {count !== 1 ? t("resultPlural") : t("resultSingular")} {t("for")} &ldquo;{query}&rdquo;
{t(count !== 1 ? "resultPlural" : "resultSingular", { count })} {t("for")} &ldquo;{query}&rdquo;
</p>
) : null;
}