fix(i18n): empty-state strings render literal <em> instead of italic emphasis #251
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
james/carol#251
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Context
Four empty-state strings in
packages/i18n/messages/en.jsoncarry literal<em>…</em>HTML tags meant to italicise the button name they reference:experience.education.empty:"No entries yet — click <em>Add entry</em> to start."experience.jobs.empty:"No jobs yet — click <em>Add job</em> to start."experience.contracts.empty:"No contracts yet — click <em>Add contract</em> to start."experience.contracts.emptyPosition:"No position set yet. Use <em>Set position</em> to add one."React Native's
<Text>doesn't interpret HTML — the consumer renders the string verbatim, so users see the literal<em>and</em>characters in the UI. The strings were authored as if i18next's<Trans>interpolation was already in place; it isn't.Source
User-reported (June 2026), observed on the Experience screen's empty states after #25 (Contracts) merged.
Approach
Two options:
A. Rewrite the catalog strings to drop the tags and use Carol's existing emphasis convention (double-quoted, matching the
Editing "{institution}"…andDelete the entry "{institution}"?patterns already in the catalog).B. Adopt
<Trans>for these consumers, with a tiny<Em>component that styles its children with italic / accent.Recommendation: A — simpler, ships in one commit, matches the existing voice. The Trans-based path is more flexible but introduces a new pattern that the rest of the catalog doesn't yet use. If italics-via-Trans becomes a recurring need, a separate ticket can adopt it as a sweep.
Scope
packages/i18n/messages/en.json(and any sibling locale files that mirrored them) to use double-quoted emphasis.<Text>{t(…)}</Text>.rg '<\w+' packages/i18n/messages/.Acceptance criteria
<em>literals.Out of scope
<Trans>for richer styled-interpolation needs (separate sweep ticket if anyone wants it).