fix(i18n): wrap flow template labels and descriptions in Paraglide m.xxx() calls #1156

Merged
reviewer merged 1 commit from dev/1152 into main 2026-05-14 12:53:17 +00:00
Collaborator

Closes #1152

Summary

  • Added 10 Paraglide message keys (flow_template_*_{label,description}) to messages/en.json and messages/fr.json
  • Changed FlowTemplate.label and FlowTemplate.description from string to () => string — each field now holds a reference to the compiled Paraglide message function
  • Replaced all five hardcoded English literals in FLOW_TEMPLATES with m.flow_template_* calls (imported via import { m } from "@/paraglide/messages")
  • Updated flows.new.tsx to call tpl.label() and tpl.description() instead of accessing them as strings

Test plan

  • just qa passes (typecheck, lint, all 1137 tests including the three flows.new.test.tsx tests)
  • paraglide-check passes — no missing keys in fr.json
  • No raw English template strings remain in templates.ts
Closes #1152 ## Summary - Added 10 Paraglide message keys (`flow_template_*_{label,description}`) to `messages/en.json` and `messages/fr.json` - Changed `FlowTemplate.label` and `FlowTemplate.description` from `string` to `() => string` — each field now holds a reference to the compiled Paraglide message function - Replaced all five hardcoded English literals in `FLOW_TEMPLATES` with `m.flow_template_*` calls (imported via `import { m } from "@/paraglide/messages"`) - Updated `flows.new.tsx` to call `tpl.label()` and `tpl.description()` instead of accessing them as strings ## Test plan - [x] `just qa` passes (typecheck, lint, all 1137 tests including the three `flows.new.test.tsx` tests) - [x] `paraglide-check` passes — no missing keys in `fr.json` - [x] No raw English template strings remain in `templates.ts`
fix(i18n): wrap flow template labels and descriptions in Paraglide m.xxx() calls
All checks were successful
qa / i18n-string-check (pull_request) Successful in 12s
qa / dockerfile (pull_request) Successful in 12s
qa / db-schema (pull_request) Successful in 15s
qa / sql-layer-check (pull_request) Successful in 7s
qa / qa-1 (pull_request) Successful in 2m22s
qa / qa (pull_request) Successful in 0s
753788d481
All five FLOW_TEMPLATES entries now use m.flow_template_*_{label,description}()
instead of hardcoded English literals. Adds keys to en.json and fr.json,
changes FlowTemplate.label/description to () => string, and updates the
flows.new route to call them. Closes #1152.

Co-authored-by: Cursor <cursoragent@cursor.com>
dev requested review from reviewer 2026-05-14 12:51:53 +00:00
reviewer approved these changes 2026-05-14 12:53:12 +00:00
reviewer left a comment

Review — fix(i18n): wrap flow template labels and descriptions in Paraglide m.xxx() calls

APPROVED — clean, minimal, correct.


What the PR does

Replaces five hardcoded English string literals in FLOW_TEMPLATES with Paraglide message function references, so the flow-template picker in flows.new.tsx is now locale-reactive. All 10 keys are present in both en.json and fr.json.


Code quality

templates.ts

  • label: () => string / description: () => string is the correct Paraglide pattern. By assigning the compiled message function by reference (m.flow_template_blank_label rather than m.flow_template_blank_label()), the locale is read at render time — correct and lazy.
  • Module-level FLOW_TEMPLATES is fine: no locale is captured at init, only at each call site.
  • TypeScript would have caught any consumer of FlowTemplate that wasn't updated; just qa passing confirms there are none outstanding.

flows.new.tsx

  • tpl.label() / tpl.description() invocations are the only change needed. Both call sites are updated.

en.json / fr.json

  • All 10 keys present in both files — no gap, paraglide-check passing confirms this.
  • French translations look good. Technical loan words ("Dispatche", "Scaffold minimal") appear consistent with the rest of the catalogue. "Vide" for "Blank" and "compétence" for "skill" are correct. "en miroir" for "mirroring" is idiomatic.
  • Backtick notation in the area:agents description strings is valid JSON and will render as a literal ` in plain-text UI — fine for this use case.

No concerns

  • No serialisation risk: FLOW_TEMPLATES is only consumed in JSX, never JSON-serialised.
  • No test impact: the three flows.new.test.tsx tests cover the component and pass with the updated call syntax.
  • Conventional commit prefix fix(i18n): is correct.
## Review — fix(i18n): wrap flow template labels and descriptions in Paraglide m.xxx() calls **APPROVED ✅** — clean, minimal, correct. --- ### What the PR does Replaces five hardcoded English string literals in `FLOW_TEMPLATES` with Paraglide message function references, so the flow-template picker in `flows.new.tsx` is now locale-reactive. All 10 keys are present in both `en.json` and `fr.json`. --- ### Code quality **`templates.ts`** - `label: () => string` / `description: () => string` is the correct Paraglide pattern. By assigning the compiled message function *by reference* (`m.flow_template_blank_label` rather than `m.flow_template_blank_label()`), the locale is read at render time — correct and lazy. - Module-level `FLOW_TEMPLATES` is fine: no locale is captured at init, only at each call site. - TypeScript would have caught any consumer of `FlowTemplate` that wasn't updated; `just qa` passing confirms there are none outstanding. **`flows.new.tsx`** - `tpl.label()` / `tpl.description()` invocations are the only change needed. Both call sites are updated. ✅ **`en.json` / `fr.json`** - All 10 keys present in both files — no gap, `paraglide-check` passing confirms this. - French translations look good. Technical loan words ("Dispatche", "Scaffold minimal") appear consistent with the rest of the catalogue. "Vide" for "Blank" and "compétence" for "skill" are correct. "en miroir" for "mirroring" is idiomatic. - Backtick notation in the `area:agents` description strings is valid JSON and will render as a literal `` ` `` in plain-text UI — fine for this use case. --- ### No concerns - No serialisation risk: `FLOW_TEMPLATES` is only consumed in JSX, never JSON-serialised. - No test impact: the three `flows.new.test.tsx` tests cover the component and pass with the updated call syntax. - Conventional commit prefix `fix(i18n):` is correct.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/agent-hooks!1156
No description provided.