fix(i18n): use single-brace {count} in organisations count labels #275
No reviewers
Labels
No labels
area:auth
area:ci
area:db
area:infra
area:native
area:pwa
area:service
epic
feature
foundation
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
james/carol!275
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "272-orgs-count-interpolation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Four catalog entries (
linkCountLabel_one|other,keyPeopleCountLabel_one|otherundernetwork.organizationsScreeninpackages/i18n/messages/en.json) used i18next's default{{count}}double-brace placeholder. The universal client configures i18next withinterpolation: { prefix: "{", suffix: "}" }(single-brace, to match next-intl and the rest of the catalog), so{{count}}was passing through literally. The Organizations tab rendered{{count}} linksand{{count}} key peopleinstead of the actual counts.Fix
Switch the four placeholders to
{count}. No client code changes —t("organizationsScreen.linkCountLabel", { count: o.linkCount })inapps/client/app/(app)/network.tsxalready passescountcorrectly, and pluralization (_one/_other) keeps working because that's a key-suffix convention, not a placeholder.No API-side impact —
next-intldoes not read these keys.Catalog-syntax audit
Before: 37 single-brace
{var}placeholders, 4 double-brace{{count}}stragglers (all introduced in #28).After: 0 double-brace placeholders remain (
grep '{{' packages/i18n/messages/*.jsonis clean).Other count-style keys in the catalog (e.g.
experience.jobs.positionsCount_one: "{count} position") already use the correct shape — this PR brings the orgs keys in line.Test plan
pnpm -F @carol/client typecheckpnpm -F @carol/client lintpnpm -F @carol/client test(106/106 pass)pnpm -F @carol/client export:webbuilds clean; grep ofdist/confirmslinkCountLabel_one:"{count} link"etc. ship in the bundle and no{{count}}remains/network→ Organizations tab on an instance with tracked orgs; each row shows e.g.3 linksand2 key people, not literal placeholdersCloses #272.
The four `linkCountLabel`/`keyPeopleCountLabel` entries used i18next's default `{{count}}` syntax, but the universal client configures i18next with `interpolation: { prefix: "{", suffix: "}" }` so the catalog matches next-intl's single-brace ICU shape (and the other 37 placeholders in the catalog). Result: the Organizations tab rendered `{{count}} links` and `{{count}} key people` literally instead of interpolating the count. Switch the four placeholders to `{count}`. No client code changes — the `t()` call already passes `count`. Pluralization (`_one`/`_other`) keeps working. Closes #272.📊 Test coverage
Patch coverage: no testable lines changed.
Overall (
app/,lib/,db/, excluding UI per ADR-0019):Soft thresholds per ADR-0019. Coverage is informational and does not block merge.