Skip to content
Toolkit

Job 005: i18n

Status: DONE Owner: @work, the routine

Phase: 00 — the catalogue reaches the client, met; 01 — ratchet scope, met; 02 — extraction, met (ninety-nine surfaces landed, every apps/web surface above 6 counted strings is done, the layout family is closed — topbar, sidebar, admin layout, command palette, app shell — and both lib/ registries are extracted, which the counter cannot see, and the <Trans> mechanism is decided (ADR-0085) and the mid-sentence emphasis backlog it unstranded is drained and Studio's own text now has a mechanism (ADR-0086) with all four of its files through it — Studio now counts zero. Phase 02's counted work is finished: the 82 that remain are apps/web residue, audited row by row under Open items — sample values, proper nouns, product names and pixel dimensions, each correctly hardcoded and correctly counted. An extracted surface usually keeps a proper noun, a URL or a sample value, so the file count falls far more slowly than the string count); 03 — the Settings dropdown, met; 04 — the control returns, met (three slices: the first paint no longer waits for a catalogue, ADR-0087; the control is back and the flag released, ADR-0088; and the charter's own bar met on a running stack — the live spec that held the control unmounted now asserts the same property from the other side, against a string minted per run and in no bundle) · Status: DONE — close-out · Updated: 2026-08-29 Scoreboard: node scripts/check-i18n-coverage.mjs reports 82 hardcoded strings (baseline 82, recorded 2026-08-29), 2,895 translated call sites over 2,778 English keys, a language control may be mounted. All three numbers are committed in scripts/i18n-baseline.json; the first falls, the second rises, and neither moves without a row in .station/jobs/001-renaissance/evidence/i18n-baseline.md. The third is controlAllowed, set 2026-08-29 (ADR-0088): rule 1 is released and does not run again, and what guards the condition now is LanguageSwitcher.test.tsx, which asserts it rather than the absence. The scope caveat is closed: the counter reads .tsx under apps/web/src (109 files) and .jsx under studio/packages/react/src (12 files), and the +27 that widening exposed is the last movement row (ADR-0080).

Dependencies: none open. 003's registry and 004's capabilities are both DONE, and nothing in this track waits on either. Charter: ./README.md. Routine: ./ROUTINE.md (batch loop, claim refs claim/005-*, budgets — inherited from 004 unchanged). Scope and evidence: ADR-0010 and .station/jobs/001-renaissance/plans/04-system-integrity.md task 1, whose full path this track is — its short path shipped (the switcher unmounted, the gate built), and everything under "still open" there is these five phases. Merge policy: the standing policy on ROADMAP.md.

Log discipline (inherited): Completed entries ≤ 8 lines, linking the ADR/PR that carries the narrative; ≤ 3 new open-item rows per run; Completed keeps the newest 5 entries, older ones rolling to .archives/removal-safe/.

Heading shape. This file follows 004's rather than the literal list in docs/guides/workstream.md: the routine's read budget is "from the top through the end of Next", which requires the scoreboard and the next action to come first. The standard's headings are all present, in that order.

Objective

The outcome the charter states: README.md.

Completed

  • Phase 04, third slice — the charter's bar, on a running stack (005 closed). tests/e2e-live/language-switcher.spec.ts, ARCHITECTURE.md, ADR-0010's status: 82 / 2,895 unmoved — no string changed hands. The spec that held the control unmounted for ninety-nine slices now asserts the same property from the other side: a language row carrying one translated value minted per run, asserted absent from locales/en.json before the browser opens, and read off the screen after the choice — so it can only have come from the database. Both stores checked live, users.language included. Watched failing .station/jobs/005-i18n/evidence/phase-04-running-stack-2026-08-29.md against the pre-mount tree.
  • Phase 04, second slice — the control returns, and the flag with it (ADR-0088). LanguageSwitcher.tsx, i18n.ts, Topbar.tsx, App.tsx, shell.css: 1 key, 82 unmoved, 2,894 → 2,895 call sites, controlAllowed false → true. It draws nothing until the server carries a second language — a select with one option is ADR-0010's lie one size smaller, and a stock database has no languages row at all. The list is read reactively because ADR-0087 moved its arrival to after mount; the choice writes the cache and users.language, which ADR-0082's census found had no reader in either tree; <html dir> follows it. Rule 1 watched refusing this control .station/jobs/005-i18n/evidence/language-control-2026-08-29.md, both anchors firing, before the flag was set.
  • Phase 04, first slice — the first paint does not wait for a catalogue (ADR-0087). main.tsx, i18n.ts, i18n.firstpaint.test.tsx: 82 / 2,894 unmoved — no string changed hands. initI18n() is started, not awaited, so nobody waits on /api/v1/languages to see English that was bundled all along. That moves the catalogue's arrival to after mount, where react-i18next listens for no store event by default: bindI18nStore: 'added' is what makes a served translation reach the screen, and its absence is silent, so it is watched failing .station/jobs/005-i18n/evidence/first-paint-2026-08-29.md.
  • Phase 02, ninety-ninth slice — Studio's banner, toast and skeleton (#386). studio/packages/react/src/{intl.jsx,feedback.jsx}, StudioStrings.tsx: 3 keys, 85 → 82 and 2,891 → 2,894 call sites. The fourth and last file through ADR-0086, again with no call site changed. All three are the only text on their control — the banner's and the toast's dismiss buttons, and the skeleton's role="status" name, which is what a screen reader announces while a page loads. Studio counts zero, and phase 02's counted work is finished; ROADMAP's phase 02 row is ticked on the audited residue.
  • Phase 02, ninety-eighth slice — Studio's drawer and resource URL (#385). studio/packages/react/src/{intl.jsx,resource.jsx}, StudioStrings.tsx: 7 keys for 4 counted strings, 89 → 85 and 2,884 → 2,891 call sites. The third file through ADR-0086, again with no call site changed. Three uncounted strings went with them that no caller could set either: the domain select's Default domain, and the copy button's Address copied/Copy address pair — a ternary, so never counted, while being the only text a screen-reader user gets from that button. Older entries roll to .archives/removal-safe/.ops/projects/005-i18n/status/SESSION-completed-2026-08-28.md.

Active

Open items

None in flight. Residue handed back to the owner is listed here, once:

  • i18next gates first paint for a feature with no consumers. Settled (ADR-0087): main.tsx starts initI18n() and renders immediately, so no user waits on /api/v1/languages for a catalogue that is empty on a stock database. The chunk stays on the critical path and is no longer questionable — 2,894 call sites render through t(), so it is the text. The deferral moved the catalogue's arrival to after mount, which bindI18nStore: 'added' is what makes reach the screen; watched failing in .station/jobs/005-i18n/evidence/first-paint-2026-08-29.md.

  • The anonymous language read still serves the whole row — id, ordering, flag, is_active and both timestamps beside the five fields a client reads. Narrowing declared columns in place is a /api/v2/ question (ADR-0078/0079).

  • The QR builder's empty-preview hint names a button that is gone. "Fill in the details and click Generate Preview" — the manual button has said "Refresh preview" since the debounce landed. It is one key (qr.builder.previewEmpty, which also absorbed a mid-sentence <br/>); the copy fix is a product call, not an extraction one.

  • The PWA empty state says "biolink", a word the glossary does not carry. pwas.empty.body: "…make your biolink installable on any device." The glossary's family is Pages, whose member is a bio page. Extraction keeps English byte for byte (ADR-0081), so the key carries the old word; the copy fix is a product call, not an extraction one. It is five keys now: admin.ogImages.description, admin.ogImages.step.queued, the payment drawer's description and empty body, and data.empty.body say it too.

  • Status and segment chips render the server's raw enum through a CSS capitalize. AdminPushNotificationsPage shows draft/processing/sent and all/filter/custom verbatim; the pattern recurs on other admin tables. Whether these are copy or identity vocabulary (ADR-0030) is one decision, taken once, for every such surface — not per slice.

  • The mid-sentence emphasis backlog is drained, PageHeader included. ADR-0085's mechanism has been applied to every <em>/<code> sentence that was stranded, and the one it could not reach — a split across two props — was closed by the component taking one node. Nothing of the shape is left.

  • All 82 counted strings are residue, audited once. The tail is sample values (https://example.com, US, GB, DE..., google/cpc), product names (six processors) and pixel dimensions (512x512) — each correctly hardcoded and correctly counted. That is the whole of what phase 02 leaves, beside the product calls listed here.

  • Five of the editor toolbar's icon-only buttons have no accessible name. Back, the three viewport buttons and the theme toggle pass no label, so aria-label/title render undefined — the four that do (Undo, Redo, Preview, Canvas width) extracted with the slice. Naming them is an accessibility fix, not an extraction, and would raise the count by five until each name is keyed. One PR.

  • A security help sentence says "Mcardsite on/off". admin.settings.security.captchaEnabled.help reads Mcardsite on/off for all CAPTCHA checks — a mangled word (a find-and-replace that caught Master). Extraction keeps English byte for byte (ADR-0081), so the key carries it; the copy fix is a product call, not an extraction one.

  • humanizeLabel() derives credential labels from field identifiers. PaymentProcessorsPage draws Publishable Key, Secret Key and twenty-odd more by casing publishable_key; whether those are copy or identity vocabulary (ADR-0030) is one decision for every surface that calls it.

  • Studio counts zero. All four of its counted files went through ADR-0086's dictionary, and no call site changed in any of them.

  • Studio's English prop defaults are the same string one parameter over. MultiSelect's clearLabel/loadingLabel, DateTimePicker's placeholder/clearLabel/timeLabel, PreviewFrame's title, ResourceUrl's label, Pagination's itemLabel: a default parameter is not counted but is still English on a screen. They fall back to the dictionary the way CommandPalette's placeholder now does. One PR.

  • Pagination's range sentence interpolates a caller's noun. `${from}–${to} of ${total} ${itemLabel}` is a template literal, so the counter never saw it, and its noun arrives from 57 call sites as English. Extracting the sentence without the noun is half a sentence. One PR, when those itemLabel= props move behind t().

  • Hand-built weekday, month and relative-time names are locale formatting, not copy. DashboardPage's DOW/MON arrays, timeAgo's m/h/d ago suffixes and fmt's k want Intl, keyed to the UI language phase 04 settles — not 19 keys and a lookup. The invoice's amount cells are the same item in money: a toFixed(2) beside a currency code, and a toLocaleDateString() beside it. AdminSystemLogsPage's formatSize B/KB/MB suffixes are the same item in bytes. One PR, after phase 04.

  • The dashboard's four create tiles write the registry's own type names. QR code, Bio page, vCard, File link are hardcoded beside a linkTypeLabel that already serves them (ADR-0030); the extraction left them as identity vocabulary rather than widen the slice. One PR.

  • The seed writes an English name into users.language. scripts/seed-users.sql sets 'english', the namespace ADR-0082 retired in favour of ISO 639-1 codes. Harmless, and observed being harmless on the phase 04 stack: the control adopts a profile's code only when the catalogue offers it, so 'english' is ignored. Seed-data fix, one PR.

  • The generic link write path takes a password with no capability check. links.go Create and Update accept settings.password while both file forms refuse one without password_protection (ADR-0076). One PR, 004's.

  • The owner's own read still carries password_hash. ADR-0083 §6 leaves it: narrowing an authenticated payload is the /api/v2/ shape question ADR-0078/0079 parked, and the form reads only the digest's presence.

Blockers

(none)

Decisions

Recorded as ADRs in docs/decisions/ and named in the close-out.

Files changed

Named per phase in the close-out and the pull requests it cites.

Verification

What was run and what it returned is recorded in the close-out and in evidence/.

Next actions

Nothing — 005 is closed. All five phases met their own charter bars; the close-out records which, and against what. The next run takes the front track ROADMAP's table names — 007, which is unchartered, so that run's single item is to charter it under docs/guides/workstream.md, scoped from ROADMAP's 007 section and the assessment section it cites, with this track's ROUTINE protocol inherited.

The open items below stay listed and stay unowned by this track. None is a phase; each is one PR when it neighbours work in hand, and three want a product or vocabulary decision before any code.

Source: .station/jobs/005-i18n/SESSION.md

Library