2 Commits
Author SHA1 Message Date
CatoandClaude Opus 5 38bd697d45 fix(i18n): one notice for "this is not in your language", and no skip list (#102)
/rm/paper was Romansh chrome — «Controllai Vus svess», «Funtaunas» — wrapped
around an English argument, with nothing saying why and no `lang` on the
English, so a screen reader read it with Romansh phonology. Reported as
evidence of no SSOT, correctly.

THE SITE HAD ALREADY SOLVED THIS. `/essays/[slug]` has done it properly since
it shipped: name the language the reader is actually getting, and put `lang`
on the text. Then `/paper`, `/roadmap`, `/changelog` and `/organisations` were
built without it, and `/contribute` invented a THIRD variant — a fixed
sentence that did not even name the language.

One concept, three implementations, four omissions. `OtherLanguage` is the one
component now, and the essays page — which was right first and stayed alone —
uses it too. That half matters: leaving the original in place is how the two
drift apart again.

Two reasons, because they are honestly different and a reader can act on the
difference. `untranslated` for an essay, which may be translated later and
where "yet" is a promise we can keep. `byDesign` for the argument pages, which
are German and English because the reader they address lives here — and
implying that might change would be the friendlier lie.

AND THE SKIP LIST IS GONE. `audit:language` held six exempt pages, which meant
it could not see the pages most likely to show a reader the wrong language —
it had no chance of finding this bug. Those pages now MARK their content, so
the existing rule handles them with no exception: text that declares its
language is not a leak, text that does not is one, whatever page it is on.

Marking them turned up two more surfaces the notice alone would have left
wrong — the sector cards and the three steps on /organisations, both de/en,
neither declared. The audit found both after the exemption was removed.

20 pages × 6 locales, 0 English. The `lang` attributes are not bookkeeping:
they are what a screen reader needs to pronounce an English paper title on a
Romansh page.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 23:35:45 -07:00
CatoandClaude Opus 5 6c9e68ed21 One section rail, no English leaking into six languages, and a menu that scans (#99)
* fix: one section rail, no English leaking into six languages, a menu that scans

Six reports. The language one is a correctness bug and goes first.

«CANTON OF ZURICH» ON THE GERMAN SITE. `region` was "Canton of Zürich,
Switzerland" and `name` was "Zurich German" — English sentences in the variety
pack, surviving the display projection, rendered in the footer of every page
in every language and on /about. `family.name` ("Swiss German") the same.

`display.ts` exists to stop exactly this and its own header lists three prior
escapes. These got through because a name and a region read as DATA until you
try to say them in another language. An endonym really is data — «Züritüütsch»
is what it is called in Russian too, because it is what the speakers call it.
An exonym is a translation that happens to be English.

All three are out of the projection. The reader-facing versions live in the
dictionaries with every other sentence, and `display.test.ts` now asserts the
projection's keys EXHAUSTIVELY — an allow-list fails when somebody adds a
field, a deny-list passes until somebody adds the wrong one, which is how
these survived three previous rounds of this lesson. Proven by mutation.

ONE SECTION RAIL, NOT TWO. `dashboard-nav` already did this job — sticky rail,
current section marked, counts, wraps instead of scrolling sideways — and
`page-toc` was written for the white paper days later without checking. Two
vertical rails behaving differently on the same viewport. Reported, correctly
and not for the first time: we shouldn't be reinventing the wheel.

The older one won on merits: it marks the current section and carries counts.
The newer one contributed only the two-column frame. Everything now uses
`section-nav` — the personal space, the paper, the listening catalogue — at
the same width, which the dashboard did not share before either.

No fleet package owns this shape; checked, not assumed. bip-kit has a
`TocEntry` but it is a markdown heading carrying a `level` of 2–4, and these
are arbitrary page regions, some counted. Forcing `level: 2` onto "Groups · 1"
would be bending a contract to look compliant. Noted in the file as the
extraction candidate if a third product wants it.

NINE UNSTRUCTURED ENTRIES UNDER ABOUT. Routes now carry an optional `section`,
and the panel renders three headings of three — how it works, what we say, who
is behind it. A fifth top-level group was the obvious fix and the wrong one:
the header note records the bar overflowing by 10px at 1024 in three
languages.

THE AVATAR MENU HAD NO DASHBOARD IN IT. It said who you were signed in as and
offered Settings. It now leads with your own space — labelled `portal`,
pointing at the locale root, because /portal only redirects and a test forbids
navigating through it.

AND «HEUTE NICHTS FÄLLIG. KOMMEN SIE MORGEN WIEDER.» A dashboard whose main
panel tells you to leave is a dashboard with no reason to exist. The schedule
is untouched — a word due Thursday is not dragged forward, because asking
later beats asking more often. What was wrong was treating an empty QUEUE as
an empty PRODUCT: there are 553 practice questions needing no schedule and no
account. Three doors now: a short sitting, cards, or paste a message.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* feat(audit): a check for English on the German page, and the leaks it found

"There may be a mess with languages, and I want you to really ensure that
there is no mess anywhere." `pnpm run audit:language` is how that gets
answered repeatedly rather than once.

HOW IT DECIDES. Closed-class English function words — the, and, which, from,
between — matched against the rendered text of every indexed page. Function
words are the right detector because they cannot be a loanword or a brand: a
German page carries "Chat", "Podcast" and "Whitepaper" quite legitimately, and
none of them is "which".

IT READS THE WHOLE PAGE, header and footer included, and that is the point. It
scanned `<main>` at first to avoid flagging the language switcher — which
would have meant it could not find the bug it was written for, since `region`
printed in the FOOTER. The switcher is handled properly instead: its links
carry `lang`, correct HTML for a link whose text is a language's own name.

Anything that declares its own language is skipped. A bibliography is the case
this exists for — a German page citing "Mutual intelligibility between closely
related languages in Europe" is right, translating a paper title makes the
reference unfindable — so citations now carry `lang="en"`, which is also what
a screen reader needs to pronounce them.

WHAT IT FOUND, beyond the reported one:

  privacy   `Flow.where` carried English qualifications appended to technical
            identifiers — "downscaled in the browser; only a count is stored",
            "the confirmed sentence only". Real privacy statements, printed in
            English to every non-English reader. They are translated now and
            `where` is identifiers only. The first attempt blanked a row and
            `privacy.test.ts` caught it: a flow a reader cannot verify is
            worse than no row, because the table reads as exhaustive.
  contribute  German and English roles under a French heading, with nothing
            saying why. The reasoning is the sector page's — these recruit
            people who live here — but a reader should be told, which the
            essays page settled long ago. It says so now, in their language.

Five pages render English by decision and are skipped by name with the reason
written down, not because they were inconvenient.

AND THE GATE CAUGHT ME. The Swiss German note I wrote said «Tütsch»; Zurich
says «Dütsch», and `gsw.test.ts` refused it. The product's own dialect gate,
run against the product's own copy.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 13:02:31 -07:00