fix(client): Organizations tab renders {{count}} links / {{count}} key people literally #272

Closed
opened 2026-06-24 12:33:03 +00:00 by james · 0 comments
Owner

Symptom

On the Organizations tab (apps/client/app/(app)/network.tsx), each org row shows the literal strings {{count}} links and {{count}} key people — the {{count}} placeholder is not interpolated. The actual link count / key-people count never renders.

Root cause

The four affected catalog entries in packages/i18n/messages/en.json use double-brace {{count}}:

"linkCountLabel_one": "{{count}} link",
"linkCountLabel_other": "{{count}} links",
"keyPeopleCountLabel_one": "{{count}} key person",
"keyPeopleCountLabel_other": "{{count}} key people"

But the universal client's i18next is configured (apps/client/lib/i18n/setup.ts) with interpolation: { prefix: "{", suffix: "}" } — single-brace ICU shape, matching the rest of the catalog and next-intl's syntax on the API side. With single-brace delimiters configured, i18next does not interpolate {{count}}, so the literal string passes through.

The rest of the catalog correctly uses {var} (37 single-brace occurrences vs these 4 double-brace stragglers). These four were introduced in #28 (organizations feature).

Scope

  • Change the four {{count}} placeholders to {count} in packages/i18n/messages/en.json.
  • No client code changes — t("organizationsScreen.linkCountLabel", { count: o.linkCount }) already passes count correctly.
  • No API-side impact — next-intl does not read these keys.

Pluralization (_one / _other) works correctly already — only the interpolation is broken.

Acceptance criteria

  • Visiting /network → Organizations tab shows e.g. 3 links and 2 key people, not {{count}} links / {{count}} key people.
  • pnpm -F @carol/client typecheck / lint / test pass.
  • No other {{ occurrences remain in packages/i18n/messages/*.json (grep clean).
## Symptom On the Organizations tab (`apps/client/app/(app)/network.tsx`), each org row shows the literal strings `{{count}} links` and `{{count}} key people` — the `{{count}}` placeholder is not interpolated. The actual link count / key-people count never renders. ## Root cause The four affected catalog entries in `packages/i18n/messages/en.json` use **double-brace** `{{count}}`: ``` "linkCountLabel_one": "{{count}} link", "linkCountLabel_other": "{{count}} links", "keyPeopleCountLabel_one": "{{count}} key person", "keyPeopleCountLabel_other": "{{count}} key people" ``` But the universal client's i18next is configured (`apps/client/lib/i18n/setup.ts`) with `interpolation: { prefix: "{", suffix: "}" }` — single-brace ICU shape, matching the rest of the catalog and next-intl's syntax on the API side. With single-brace delimiters configured, i18next does not interpolate `{{count}}`, so the literal string passes through. The rest of the catalog correctly uses `{var}` (37 single-brace occurrences vs these 4 double-brace stragglers). These four were introduced in #28 (organizations feature). ## Scope - Change the four `{{count}}` placeholders to `{count}` in `packages/i18n/messages/en.json`. - No client code changes — `t("organizationsScreen.linkCountLabel", { count: o.linkCount })` already passes `count` correctly. - No API-side impact — `next-intl` does not read these keys. Pluralization (`_one` / `_other`) works correctly already — only the interpolation is broken. ## Acceptance criteria - Visiting `/network` → Organizations tab shows e.g. `3 links` and `2 key people`, not `{{count}} links` / `{{count}} key people`. - `pnpm -F @carol/client typecheck` / `lint` / `test` pass. - No other `{{` occurrences remain in `packages/i18n/messages/*.json` (grep clean).
james closed this issue 2026-06-24 12:46:30 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
james/carol#272
No description provided.