From 38516bff63eeacb33f2287af4e3b6d5e825dd361 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Tue, 14 Jul 2026 09:25:28 +0200 Subject: [PATCH] fix: literal "{count}" shown in My Recipes search result count MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- CHANGELOG.md | 5 +++++ apps/web/components/recipe/recipes-empty-state.tsx | 2 +- apps/web/lib/changelog.ts | 9 ++++++++- apps/web/package.json | 2 +- package.json | 2 +- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c5cdcc..473646a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/apps/web/components/recipe/recipes-empty-state.tsx b/apps/web/components/recipe/recipes-empty-state.tsx index 9d135f9..06a6351 100644 --- a/apps/web/components/recipe/recipes-empty-state.tsx +++ b/apps/web/components/recipe/recipes-empty-state.tsx @@ -8,7 +8,7 @@ export function RecipesEmptyState({ query, count }: { query: string; count: numb if (count > 0) { return query ? (

- {count} {count !== 1 ? t("resultPlural") : t("resultSingular")} {t("for")} “{query}” + {t(count !== 1 ? "resultPlural" : "resultSingular", { count })} {t("for")} “{query}”

) : null; } diff --git a/apps/web/lib/changelog.ts b/apps/web/lib/changelog.ts index 2b132b3..51fedf7 100644 --- a/apps/web/lib/changelog.ts +++ b/apps/web/lib/changelog.ts @@ -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", diff --git a/apps/web/package.json b/apps/web/package.json index 2808c9c..c5cc81d 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,6 +1,6 @@ { "name": "@epicure/web", - "version": "0.24.0", + "version": "0.24.1", "private": true, "scripts": { "dev": "next dev", diff --git a/package.json b/package.json index 8216214..d2d857f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "epicure", - "version": "0.24.0", + "version": "0.24.1", "private": true, "scripts": { "dev": "pnpm --filter web dev",