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:
@@ -2,6 +2,11 @@
|
||||
|
||||
All notable changes to Epicure are documented here. This file is mirrored in-app at `/changelog` (and in the admin dashboard) via `apps/web/lib/changelog.ts` — update both together.
|
||||
|
||||
## 0.24.1 — 2026-07-14 09:24
|
||||
|
||||
### Fixed
|
||||
- My Recipes search result count showed a literal "{count}" instead of the number, in every locale.
|
||||
|
||||
## 0.24.0 — 2026-07-14 08:08
|
||||
|
||||
### Added
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Mirrors CHANGELOG.md at the repo root — update both together.
|
||||
export const APP_VERSION = "0.24.0";
|
||||
export const APP_VERSION = "0.24.1";
|
||||
|
||||
export type ChangelogEntry = {
|
||||
version: string;
|
||||
@@ -11,6 +11,13 @@ export type ChangelogEntry = {
|
||||
};
|
||||
|
||||
export const CHANGELOG: ChangelogEntry[] = [
|
||||
{
|
||||
version: "0.24.1",
|
||||
date: "2026-07-14 09:24",
|
||||
fixed: [
|
||||
"My Recipes search result count showed a literal \"{count}\" instead of the number, in every locale.",
|
||||
],
|
||||
},
|
||||
{
|
||||
version: "0.24.0",
|
||||
date: "2026-07-14 08:08",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@epicure/web",
|
||||
"version": "0.24.0",
|
||||
"version": "0.24.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "epicure",
|
||||
"version": "0.24.0",
|
||||
"version": "0.24.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "pnpm --filter web dev",
|
||||
|
||||
Reference in New Issue
Block a user