ADR-0080 — The ratchet counts where the strings are
- Status: Accepted
- Date: 2026-08-28
- Deciders: Track 005 phase 01
- Follows: ADR-0010 (the language switcher stays unmounted until strings are extracted), ADR-0018 (one component set, checked across three targets)
Context
scripts/check-i18n-coverage.mjs counted .tsx under apps/web/src and
nothing else. That was the whole app when the baseline was set on 2026-08-13.
It is not the whole app now: 002 converted twenty components into @studio/react
and moved their copy with them — "No records", "Rows per page", "No command
matches that.", "Previous page", and 23 others — into .jsx files the counter
does not open.
Nothing about those strings changed. A user still reads them, they are still hardcoded English, and they still have to be translated before a language control can ship. What changed is that the number stopped counting them: the ratchet fell for a reason that was not progress, and would have gone on falling each time another component moved.
This is phase 01, before extraction, because extraction measured against the wrong scope destroys the measurement — and once slices start landing, every number after them inherits the error.
Decision
The counter reads apps/web/src/**/*.tsx and
studio/packages/react/src/**/*.jsx, and the baseline is re-set to 1,695 in the
same commit. A string a user reads is in scope wherever the component that
draws it lives. The 27 strings this adds are a scope widening recorded as
such, not a regression and not new work appearing: they were already shipping.
Rule 1's anchor reads Studio's .js too. A rebuilt language control could
put its changeLanguage( in a hook rather than a component, and a hook in a
design system is exactly where nobody would look. The count of translated call
sites stays what it was — Studio has none, and by the next paragraph it never
will.
A Studio string is extracted by becoming a prop, not by calling t() in
Studio. @studio/react is one of three targets of a design system that also
compiles to Swift and to plain CSS (ADR-0018); it cannot import the app's
i18next without making every consumer of the design system a consumer of
Cardsite's i18n stack. So the extraction path differs by side of the boundary:
apps/web calls t(), Studio takes text it is handed. The ratchet does not
care — it measures what is left to translate, not who translates it, and a
string that becomes a prop leaves the count from Studio's side the same way it
leaves from the app's.
Studio's default text is not exempt from being counted merely because it is a default. A component that renders "No records" when it is handed nothing is rendering English to a user; making the default a prop with an English fallback moves the string, not the problem, and the counter will still see the fallback if it sits in JSX.
Alternatives
Leave the scope and let Studio go uncounted. The number stays comparable
with its own history, which is the one real argument for it. But it would be
comparable and wrong: the ratchet's whole job is to say how much is left, and
002 is not finished moving components. Every future conversion would lower the
count by moving work out of sight — the exact failure the caption and
description movements were fixed to prevent, one directory up.
Count Studio in a second, separate number. Honest, and it makes the boundary visible. Two numbers is two ratchets, though, and the reason for one number is that a single scoreboard cannot drift against itself. The boundary is recorded here instead, where it constrains the extraction method rather than the measurement.
Widen further, to .ts and .js service strings. Refused for the reason
the original method refused it: deciding which string literal in a service
reaches a user is a judgement call, and a ratchet built on judgement is a
ratchet nobody trusts. The line stays at markup.
Consequences
The baseline rose, in a commit that translated nothing. That is legitimate
exactly once, and only with the movement row that makes it legible — the row is
in 001-renaissance/evidence/i18n-baseline.md and the reason is in
scripts/i18n-baseline.json's own note. A rise without that row is the move
those files exist to make visible.
Phase 02's slices now come in two shapes: an apps/web surface extracts behind
t(), and a Studio component extracts by taking its text as a prop from a call
site that does. Both lower the same number.
16 of the 27 are aria-labels. They are user-facing to the users who most
depend on them, and they are the only text a screen-reader user gets — so they
count, and phase 02 does not get to treat them as a lower tier.
Source: docs/decisions/0080-the-ratchet-counts-where-the-strings-are.md