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:
@@ -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")} “{query}”
|
||||
{t(count !== 1 ? "resultPlural" : "resultSingular", { count })} {t("for")} “{query}”
|
||||
</p>
|
||||
) : null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user