Skip to content

Translate the Build tab into Swedish - #981

Merged
richshaw merged 238 commits into
mainfrom
claude/issue-953-sv-batch-a2
Nov 16, 2026
Merged

richshaw merged 238 commits into
mainfrom
claude/issue-953-sv-batch-a2

Conversation

@richshaw

@richshaw richshaw commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Part of #953 (track A batch 2: the Build tab).

Merge after #977.

The stack

Phase 2 of the localization stack (#619), track A. Based on #977 (claude/issue-953-sv-batch-a1); review against that branch.

The problem

#962 moved the Build tab's words into organizer.build, and #971 reworded three of its refusals. sv.json has none of the 81 messages, so an organizer who stores Swedish would see the whole Build tab in English: the rail, the sheet, the slot editor, the Fields dialog, the list picker and the refusals.

The fix

  • src/messages/sv.json: all 81 organizer.build messages:

    • rail 3, sheet 5, group 3, empty 4, slot 8;
    • editor 10, placeholder 3, fieldType 5, list 9;
    • fields 13, fieldForm 13, refusal 5.

    They follow en.json's order, and keep every placeholder, plural, select and tag. en.json is untouched.

  • The refusal lines are Word three Build tab refusals for organizers rather than developers #971's wording, which the owner hasn't decided on yet. If the owner changes any of them, the stale check lists it and it gets translated again.

  • src/i18n/translated-from/sv.json: mark-translated.mjs sv organizer.build marked 81, dropped 0, skipped 0.

  • tests/e2e/build-tab-language.spec.ts: openBuildTab found the Fields button by /^Fields/, which stops matching once a Swedish organizer's tab is in Swedish. It now takes the organizer's language and builds the pattern from fields.label. Test only.

  • docs/translating.md: the review's one suggestion I didn't take goes into the glossary's open question 6 (see "Review").

  • The glossary's terms aren't changed here. Translate the organizer strip, header, settings and share panel into Swedish #976 (track B) owns its "Organizer terms" section, so this batch follows Translate the organizer strip, header, settings and share panel into Swedish #976's terms:

    The terms only this batch uses are under "Proposed for the glossary", below.

The checks from the phase 2 notes

  • Spara matches the other Save buttons; "Sparar…" matches the Settings tab's; the rail's Saved line is Translate organizer refusals, a signup's Settings tab and Responses into Swedish #977's saveNotice ("Sparat").
  • Each message is a whole Swedish sentence; no value sits inside an English one.
  • Plurals use one and other, with the number in every branch that shows it. =24 stays in the two reminder plurals.
  • {n, number} everywhere but the year in refusal.dateTooEarly (see the table).

Fit on a phone

I measured the tightest rows at 320 and 390 px in the real layout. Each candidate was put into the element on the page and its height read, beside the English in the same place. At 390 px everything fits on one line, as in English. At 320 px:

Where English at 320 px Swedish chosen Rejected
The rail: badge, save line, Fields button "EDITING · Saved · Fields (5)" fits; with "Saving…" the button wraps "ÄNDRAR · Sparat · Fält (5)" fits, as English does "REDIGERING" and "REDIGERAR" wrap "Fält (5)" whenever "Sparat" shows
Fields dialog: the heading over the list, Add field "DRAG TO REORDER" and "Add field" fit "DRA FÖR ATT FLYTTA" and "Lägg till fält" fit "Dra för att ändra ordning" wrapped the heading and the button ("Lägg till / fält")
The 80 px Spots box's placeholder Cut off at every width: "No limi", since Chromium keeps room for a number box's spin buttons "Inget tak", cut off the same way: "Inget ta" (spots-box-rest-*, spots-box-hover-*) "Ingen gräns" and "Obegränsat" lose more. Words short enough to show whole mislead ("Ingen" reads as zero spots, "Fritt" as free of charge) or don't say it ("Ej satt"). The help beside the box says "Lämna tomt för obegränsat antal"
Fields dialog: Group slots by fits "Gruppera passen efter" and "Gruppera inte" fit "Ingen gruppering" wraps the picker
The slot editor's header "EDITING SLOT" already breaks onto two lines, and the row overflows "ÄNDRA PASS" with Duplicera, Radera, Klart: the same, no worse "Ta bort" for Delete wrapped all three buttons
The rail's refusals (from the review round) 3 lines for the date refusal, 7 for the drag refusals, 6 for the values refusal 3, 7 and 8 lines The review's "från år … eller senare" (4 lines) and "så det du flyttade" (8 lines)

The field types fit their three-column grid ("Kort text" is the longest), and the Fields list's type column has room for "Lista · 3".

The hardest choices

Key(s) English Swedish Why
rail.editing Editing Ändrar The fit above. It's also the glossary's ändra, so the badge, the editor's "Ändra pass" and its name "Du ändrar passet …" are one verb. "Redigering", the name Swedish word processors give the mode, was my first choice and didn't fit.
slot.edit, duplicate, delete, row; slot.editing Edit slot at 9:00 AM; Editing slot — Surfing Ändra passet kl. 9:00; Du ändrar passet – Surfing Screen-reader names. "Du ändrar" keeps the open editor's name apart from the row's button, as English keeps Edit and Editing apart. "kl." before a time, and a spaced en dash for the em dash. On an English signup the time stays the signup's ("passet kl. 9:00 AM").
slot.taken, takenOf 2 taken; 2 of 6 taken 1 upptagen, 2 upptagna; 1 av 2 upptagen, 0 av 4 upptagna English needs no plural; Swedish's participle agrees with the number taken, as #976's spots line does ("1 av 8 platser är upptagen"). The short form, without platser, fits the row's 11 px count, as English's does.
editor.signedUp … we’ll email them … / … we won’t email them if you change it. … får {de / personen} ett mejl om det. / … så {de / personen} får inget mejl om du ändrar datum eller tid. #977's rule: Swedish has no settled singular "they", so the one branch says personen. The off branch names "datum eller tid" for English's "it": those are the only changes that send an email, as the on branch says.
editor.done Done Klart #931 settled participants' Done as "Klart" (its row 6). #931 waits for the owner, so participants on this branch still read "Klar". See the launch note under "Review".
editor.delete, slot.delete, fields.delete; fieldForm.remove Delete; Remove field Radera; Ta bort fält #977's split by the English word: delete is radera, remove is ta bort. Both delete a field here, but one rule is easier to follow than a judgement per screen. "Ta bort" also wrapped the editor's buttons at 320 px.
editor.duplicate Duplicate Duplicera The usual software word. "Kopiera" is Copy link's verb, which copies to the clipboard.
fieldType.* Short text, Date, Time, Number, List Kort text, Datum, Tid, Tal, Lista The usual Swedish names. Tal is the spreadsheet word for a number; Nummer is an identifier, like a phone number. Lista although "Ny lista" means New signup on the dashboard: here it stands among the types, and its own messages say "Lägg till i listan" and "En lista rymmer …". Val (choice) was the alternative.
list.* items, options alternativ A new List field's first item is already "Alternativ 1" (participant.defaults.firstChoice).
list.maxLength, list.full Up to … Högst … #931's "up to → högst". "En lista rymmer högst 20 alternativ."
empty.* Set a date; Set a time; Set {label}; Set a value Ange datum; Ange tid; Ange {label}; Ange ett värde Ange suits a date picker, a time, text and a list alike. The label goes in lower case, as in English ("Ange roll").
fields.reminder; fieldForm.reminderHelp Reminders sent the day before this date; Sent the day before. Påminnelser skickas dagen före det här datumet; Skickas dagen innan. Före with an object, innan without, as participants' "dagen innan".
refusal.dateTooEarly Dates must be in {year, number, ::group-off} or later. Datum kan inte vara före år {year, number, ::group-off}. Keeps ::group-off, the one exception to {n, number}: a year is never grouped, and "år 1 900" would be wrong. Reworded in the review round (see "Review").
refusal.capacityBelowTaken … Set this slot to {taken} or more. {one} … plats är redan upptagen. Ge passet minst {taken} plats. / {other} … platser är redan upptagna. Ge passet minst {taken} platser. Each branch holds both sentences, since plats agrees with the count in the second sentence too. "Ge passet minst N platser" says what to set; "Sätt passet till N" wouldn't.
refusal.invalidatesSlotValues Some slots have values that don’t fit this change. Change those first. Vissa pass har värden som inte fungerar med den här ändringen. Ändra dem först. "passar" right after "pass" reads as a pun. "dem" can only mean the slots just named (the review's nit).
sheet.descriptionPlaceholder Add a short description for volunteers Lägg till en kort beskrivning för deltagarna The glossary's deltagare. Not every list is volunteering (a fika list).
placeholder.date YYYY-MM-DD ÅÅÅÅ-MM-DD Swedish's letters. Chromium doesn't show a date box's placeholder.
group.renameFailed That change didn’t save, so this heading is back to what it was. Try again. Ändringen sparades inte, så rubriken är som förut. Försök igen. Plain. "har återställts" is the system's word.

Proposed for the glossary

These terms appear only in this batch, so #976's "Organizer terms" doesn't have them yet. They're worth adding wherever the two meet, next to #977's proposed rows:

English Swedish Notes
Editing (the Build tab's badge) Ändrar "Redigering" wraps the Fields button at 320 px
Edit slot; Editing slot (an open editor's name) Ändra passet; Du ändrar passet "Ändra pass" as the editor's title
N taken; N of M taken (a slot row) N upptagen/upptagna; N av M upptagen/upptagna Agrees with N
Duplicate Duplicera Not kopiera, Copy link's verb
Delete (a slot, a field) Radera With #977's "delete → radera"
Remove field Ta bort fält With #977's "remove → ta bort"; no article on the button
Done Klart As #931 settles it for participants
Short text, Date, Time, Number, List (field types) Kort text, Datum, Tid, Tal, Lista
an item in a List field alternativ As "Alternativ 1"
Set a date; Set {label} (an empty value) Ange datum; Ange {label}
No limit (the Spots box) Inget tak The 80 px box cuts it to "Inget ta", as it cuts English to "No limi"; the help beside it says "obegränsat antal"
Group slots by; Don't group Gruppera passen efter; Gruppera inte
Drag to reorder Dra för att flytta
a year in a message {year, number, ::group-off} Never grouped

What's still missing for a launch

I added sv to SHIPPED.participant and SHIPPED.organizer locally (not committed) and ran the catalog check. On this branch it reports 186 missing organizer messages and nothing else: no stale, unrecorded or broken message, and no participant message missing.

  • On track A, translated by track B batch 1 (the areas below both tracks, 37 messages): publicPage 7, preview 3, chrome 7, crumbs 4, dashboard 9, loadError 7.
  • Track A batch 3: newSignup 9, compose 130 (questions and answers included), aiDraft 10.
  • Not on this branch at all (track B): account Settings, Connected apps, the signup header, tabs and status, the share panel, auth.*, and the 7 participant.share messages.

Screenshots for the reviewer

Under /home/user/wt/t953d-shots/ on the build machine (not committed), at deviceScaleFactor 2: 121 PNGs and 15 accessibility snapshots. Each state is at desktop (1280 px), phone (390 px) and 320 px, named 953d-<state>-<desktop|phone|narrow>.png.

How they were made:

  • A production build of 651e45e (this head before Translate organizer refusals, a signup's Settings tab and Responses into Swedish #977's new heads were merged in), served with E2E_UNSHIPPED_LOCALES=sv, and an organizer storing sv.
  • SHIPPED was not changed for the screenshots, unlike Translate organizer refusals, a signup's Settings tab and Responses into Swedish #977. The Build tab never reads SHIPPED: its page works out both languages through getOrganizerAppLocale and signupLocale, which treat a language in E2E_UNSHIPPED_LOCALES as shipped. So one build of the committed code served the screenshots and the e2e run.
  • A Swedish signup, "Höstmarknad på skolan", grouped by Datum. Its slots cover every spots-taken plural: 2 of 3, 1 of 2, 1 with no limit, and 0 of 4 with no date. Sign-ups came through the commit service.
  • An English signup ("Bake Sale"), an empty draft, and a List field holding the most items it can (20).
  • Every refusal was triggered for real:
    • a date before 1900, typed into the slot editor and into a date heading;
    • spots below the number taken;
    • Vad changed from Kort text to Tal while slots hold words;
    • a slot, and then a field, added from outside while the page was open, then a drag;
    • a one-letter title.
  • "Sparar…" was held on screen by delaying the save request three seconds.

The states:

  • Empty draft:
    • empty: no fields, no slots, and the description's placeholder;
    • title-placeholder: the title cleared while editing;
    • empty-slot-editor, empty-slot-row: a slot with no fields, which reads "Pass".
  • Fields dialog:
    • fields-empty;
    • field-new-form: the type picker;
    • field-added-kort-text, -datum, -tid, -tal, -lista: each type added in turn;
    • field-edit-date-reminder: the reminder checkbox and its help;
    • field-reminder-taken: a second date field's note;
    • groupby-open;
    • sv-fields-dialog: four fields, "Lista · 3" and the reminder bell.
  • The sheet:
    • all-types-sheet, all-types-editor: every type's box and placeholder, "Ingen tid" and "Välj…";
    • grouped-by-date: "ANGE DATUM" and "Lägg till datum";
    • grouped-by-text: "ANGE UPPGIFT";
    • sv-sheet.
  • The slot editor:
    • slot-editor-plural: 2 people, reminders on;
    • slot-editor-singular: 1 person, "personen";
    • slot-editor-reminders-off;
    • slot-editor-no-limit: "Inget tak".
  • The list picker:
    • enum-open;
    • enum-new-item-count: "56/60";
    • enum-new-item-max: "60/60 · max";
    • enum-full: "En lista rymmer högst 20 alternativ."
  • The rail:
    • saving: "Sparar…";
    • saved: "Sparat";
    • the refusals: refusal-capacity-below-taken, refusal-date-too-early, refusal-rename-failed (with the heading's own line), refusal-invalidates-slot-values, refusal-slots-moved, refusal-fields-moved, and refusal-title-too-short (Translate organizer refusals, a signup's Settings tab and Responses into Swedish #977's line, now among Swedish words). These show the wording before the review round; the review round's are 953d-addr-refusal-*-<320|390>.png (see "Review").
  • English signup: en-signup-sheet, en-signup-editor: the organizer's words in Swedish around English content.
  • The Spots box alone, at 320 px: spots-box-rest-sv, spots-box-rest-en, spots-box-hover-sv, spots-box-hover-en.
  • Screen-reader names: 953d-<state>-<width>.aria.txt holds the accessibility tree of empty, sv-sheet, slot-editor-plural, all-types-editor and fields-list-all. It shows the row, toolbar and editor names (slot.*), "Grupprubrik – …", "Värde för …", "Radera …", the bell's "Påminnelser skickas dagen före det här datumet", "Stäng", and the title and description boxes' names.

What the reviewer will see around this batch:

  • The header, tabs, status pill, public link, spots line and Share are still English. They're track B's, not on this branch.
  • The date boxes show mm/dd/yyyy and 12/15/2026. That's Chromium's own control, in the headless browser's language, not the catalog.
  • Full-page shots draw the sticky rail and the phone's fixed bottom bar mid-page. That's the screenshot, not the layout. The rail's own states are taken at the viewport instead.

Not in any screenshot (judge from the catalog):

  • list.empty: a List field always has at least one item.
  • placeholder.date: Chromium doesn't show a date box's placeholder.
  • refusal.capacityBelowTaken's one branch: one spot can't be taken past a limit of 1 or more.
  • group.renameFailed for anything but a date.
  • slot.*'s time branch: a time field first among the non-grouped fields. It reads "Ändra passet kl. 09:00".
  • list.newItemLabel and list.maxLength, the new item box's name and description.
  • fieldForm.backLabel and fieldForm.nameLabel.

Follow-ups (layout, English too)

Neither is the catalog's, and neither changes here:

  • The Spots box is too narrow for its placeholder in every language. w-20 leaves about 41 px of text once Chromium keeps room for the spin buttons, so English reads "No limi" at every width. Widening the box or hiding its spin buttons would fix both languages.
  • At 320 px the slot editor's header overflows in English. "EDITING SLOT" breaks onto two lines, and the three buttons run past the row's edge. Swedish does the same.

Review

The translate skill's step 3: an in-context review of 346e6b0 by a different model from the translator (Fable), in this comment. It ran the production build at 1280, 390 and 320 px, read all 81 messages against the English, and found nothing that must change: two suggestions, one nit, and a note for the launch. I answered them in db98ab7. English is unchanged, so nothing needed marking again.

To answer them I measured each refusal in the rail at 320 and 390 px. On the production build of db98ab7 I triggered each refusal for real (a date before 1900 in the slot editor; a slot, then a field, added from outside and then a drag; Vad changed from Kort text to Tal while slots hold words), then put each wording into that same rail element and counted its lines (16 px each). At 390 px every wording here takes the same lines as English. Screenshots of the real refusals: /home/user/wt/t953d-shots/953d-addr-refusal-*-<320|390>.png (not committed).

# Key(s) What the reviewer said What I did Rail lines at 320 px
1 refusal.dateTooEarly Suggestion: "Datum måste vara år 1900 eller senare" reads a little clipped, since a date isn't a year. Offered "Datum måste vara från år {year, number, ::group-off} eller senare." Fixed, in other words: "Datum kan inte vara före år {year, number, ::group-off}." The offered wording fixes the clipped "vara år" but takes the rail from 3 lines to 4, and "från … eller senare" says "from" twice. This says the same thing in 3 lines, as English does, and keeps ::group-off. Before 3; offered 4; now 3. English 3.
2 refusal.slotsMoved, refusal.fieldsMoved Suggestion: flytten on its own mostly means moving house. Offered "så det du flyttade sparades inte", or keep the current wording if that wraps the rail worse. Kept "så flytten sparades inte". The offered wording wraps worse: 8 lines against 7. It's a matter of taste the reviewer said is understood here, after "Dra för att flytta", so it goes into the glossary's open question 6 in docs/translating.md, with "så ordningen sparades inte", which also fits in 7 lines, for the full review (#639). Before 7; offered 8; now 7. English 7.
3 refusal.invalidatesSlotValues Nit: "Ändra de passen först." could be "Ändra dem först.": shorter, and "dem" can only mean the slots just named. Fixed as suggested: "Vissa pass har värden som inte fungerar med den här ändringen. Ändra dem först." 8 either way. English 6.
Launch note organizer.build.editor.done For the launch, not this PR: editor.done is "Klart", while participants' Done (participant.dialog.done) on this branch is still "Klar". Not changed here. This branch's glossary lists Done as "Klar" but points to open question 6, "Klar" or "Klart", which is still open, so it doesn't settle it. #931 settles participants' Done as "Klart" (its row 6) and waits for the owner. For the launch's consistency check: once #931 is in, both read "Klart". If the owner keeps "Klar" there instead, editor.done changes to match. —

The reviewer's other points, all kept as they are: "Ändrar", "Dra för att flytta", "Inget tak", the five field types, the year's ::group-off, and both sentences inside each capacityBelowTaken branch. It judged from the catalog, not on screen, the messages no screenshot shows (listed above) and capacityBelowTaken, whose seed it couldn't trigger.

Where the glossary note meets other branches. It's added to open question 6 rather than as a new item 10, because #980 (track B) adds its own 10. #931 turns the open questions into a "Settled" list; when it meets this branch, carry this note over as still open.

Tests

On db98ab7 (the review round: sv.json and docs/translating.md only):

  • pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test: pass (231 files, 3249 passed, 1 expected fail).
  • to-translate.mjs sv: participant 0 missing, 0 stale. Organizer (--audience organizer): 186 missing (the areas above), 0 stale, 0 unrecorded, 0 extra.
  • pnpm build && pnpm budgets: pass, no budget changed (/app/signups/[id]/build 151.2 of 151.2 kB).
  • e2e on that production build (container config, chromium), against a temporary database: build-tab-language, 12 passed.

On 346e6b0 (my commit 651e45e, then two of #977's heads merged in. 2cba05f changes four of #977's own Swedish messages; a6c5384 is the stack's propagation of #954, #958 and #959, which changes no catalog file):

  • pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test: pass (231 files, 3249 passed, 1 expected fail).
  • to-translate.mjs sv: participant 0 missing, 0 stale. Organizer: 186 missing (the areas above), 0 stale, 0 unrecorded, 0 extra.

On 651e45e, which has the same organizer.build and the same spec:

  • The same five checks: pass.
  • pnpm test src/i18n src/components/build-wysiwyg src/components/build-shared: pass, but for used-keys.test.ts, which timed out once at a load average of 13 (known) and passed alone.
  • pnpm build && pnpm budgets: pass, no budget changed (/app/signups/[id]/build 151.2 of 151.2 kB, as on Translate organizer refusals, a signup's Settings tab and Responses into Swedish #977).
  • e2e on the production build (container config, chromium): build-tab-language and organizer-language, 30 passed and 2 skipped. The skips are "answers Magic Compose's questions" in en and sv, which skip with no LLM_BASE_URL. The sv runs hold the tab's rail, its slot row's name, the Fields dialog and its Add field button, and the slot editor's Klart, to the new Swedish.
  • The catalog check with sv in both SHIPPED lists, locally: only the 186 missing messages above.
  • pnpm test:db not run: this PR's own diff changes no service, src/db, src/mcp, src/oauth or job file. The src/mcp change in a6c5384 is Name the case of each refusal the organizer screens word themselves #958's, tested there.

🤖 Generated with Claude Code

https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt

claude and others added 30 commits November 13, 2026 22:31
Part of #620: the core. next-intl and use-intl 4.14.9, pinned together
(icu-minify too, through an override), with next.config.mjs wrapped in
next-intl's plugin. src/messages/en.json is the English catalog, and
next-intl's AppConfig is typed from it, through the declaration the
plugin writes, so a missing key or a wrong argument fails typecheck.

src/i18n holds the pure locale config (CATALOG_LOCALES, SHIPPED), a
synchronous translator on use-intl/core with English filled in under
any other language, the server wrapper that logs what goes wrong, the
request config the plugin needs, and an English translator for tests
that throws.

The site footer's labels are the first text in the catalog, so the
translator is proven in a server component, on static and dynamic
pages. A new check runs it under the worker's toolchain. No page's
first-load JavaScript changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
A local ESLint plugin in eslint.config.mjs, with one rule so far:
opensignup/no-catalogs-in-client. In a file that opens with a 'use client'
directive, it reports any import of a catalog in src/messages, or of the
translators that load every catalog (src/i18n/translator.ts, server.ts and
testing/translator.ts), since either would put that text in the browser's
JavaScript. It reads the directive rather than matching paths, follows
@/ and relative paths, re-exports, import(), require() and import paths
built from a template, and lets type-only imports through, since those are
compiled away. The message says why and what to do instead.

The tests lint fixtures through the repo's own config, so they also prove
the rule is on for the app's files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
A unit test over src/messages/ checks every catalog against en.json:
completeness per namespace, enforced for each language in SHIPPED for the
namespaces its audience reads; every message compiles with icu-minify;
placeholders, tags and select branches match English, and each placeholder
takes the value English is passed; no key English lacks; and no English
message the app doesn't use.

Which keys the app uses comes from the type checker: a call whose signature
is use-intl's Translator, its namespace from the keys it accepts, its key
from the type of its argument, so helpers, props, aliases and typed tables
are all seen, and a key or namespace it can't read fails the check.

The audience namespaces move from a comment to AUDIENCE_NAMESPACES in
src/i18n/config.ts. src/types/next-intl.d.ts imports next-intl, because an
augmentation alone doesn't load its module: without it, code with no test
importing next-intl typed every message key as a plain string.

icu-minify is a devDependency at exactly 4.14.9, the version next-intl and
use-intl resolve, and the pnpm override now points at it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Two rules, on only for the files and folders listed in TRANSLATED in
eslint.config.mjs, which so far is the site footer:

- react/jsx-no-literals with noStrings and ignoreProps, for JSX text;
- opensignup/no-literal-text-props, a local rule for a string on
  aria-label, aria-description, title, placeholder, alt or label.
  noAttributeStrings would also flag every className and href.

TRANSLATED takes paths as they are on disk. filesAt escapes them for
the config's globs, since an unescaped src/app/s/[slug]/** matches
src/app/s/s/ and not the [slug] folder, and stops lint when a path
doesn't exist. The footer's license line is exempt with a comment.

Also, from #891's review: no-catalogs-in-client follows a + chain that
starts with a string, as it does a template, and denies every module in
src/i18n/ to client files except those in CLIENT_SAFE_I18N (config),
rather than listing the modules that load catalogs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
A translation that kept a select's argument but dropped the select
(`Status: {status}` for English's `{status, select, open {Open} ...}`)
passed, and would show participants the code's value. The check now
reports `{status} isn't a select here, but is in English`.

From the same review:
- The check's program types translators against the en.json it just
  loaded, written over src/messages/en.d.json.ts, so a stale declaration
  no longer gives misleading lines. findUsedKeys now builds the program
  itself, and the fallback for a stale declaration is gone, with its edge
  case that could pick the wrong section. messages-declaration.test.ts
  still fails on a stale file.
- Code in any `testing` folder and in src/mcp/evals doesn't count as a use.
- `t?.('key')` is seen.
- A test for the dot-in-key check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Turn on next-intl's experimental message precompiling, so the first
client component with translated text ships a small formatter instead of
use-intl's ICU parser: measured here at 3,470 bytes gzipped against
12,353 without it.

Under precompile the plugin's loader compiles every catalog the Next
build imports, the server's too, and a message with an argument, plural
or tag becomes an array. withEnglishUnder treated every object as a
section and went into those arrays, so each such message would have
rendered as its key path in the web process while vitest and the worker,
which read the raw JSON, stayed green. A message is now a string or an
array, and only a section is merged into.

The footer's "{INSTANCE_NAME} · AGPL-3.0" line becomes a message with an
argument, the first the app has, and a production-build e2e checks it on
a prerendered page, a page rendered per request and the public signup
page. A unit test runs next-intl's own loader over every catalog and
checks each message formats the same precompiled as from the raw JSON.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
…ext-lint

Brings in #892's review fixes (a7a10ed) so this PR stays on top of #892's final state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
formatSlotDate and formatSlotTime now take the reader's language as a
required `locale`, and so does everything that prints a slot's values:
renderFieldValue, slotDetails, summarizeSlotValues, formatGroupLabel,
buildMetaSegments, prettyHeader, and the two commitment services that name a
slot for the edit and cancelled pages. Every caller passes 'en' for now, so
nothing anyone sees changes.

A date is built from its parts as a UTC moment and formatted in UTC, so no
zone can move it to another day. English keeps today's output exactly,
including the hand-written 12-hour clock with its no-break space before
AM/PM; other languages get Intl's own ("lör 3 maj", "18:30" in Swedish).

formatSlotDate now formats only a stored YYYY-MM-DD. It used to fall back to
`new Date()` for any other string, in the host's zone; no caller relied on
that, as both checked isRealDate first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
filesAt escaped the characters a glob reads specially but not the
backslash it escapes them with, so a listed folder named `a\b` became
the glob `a\b/**`, which matches `ab/` and not `a\b/`. The backslash is
now escaped in the same pass as the rest.

filesAt takes an optional root so a test can list a real folder with a
backslash in its name, made in a temporary directory, and check the glob
with ESLint's own matcher.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
…mpile

Brings in #893's later commits (#892's final code, main, and the filesAt escaping fix) so this PR stays on top of #893.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
…-format

Keeps this PR on top of #894's current branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
main now holds #893 (7a9fada), whose final code this branch already had. The only conflict was the footer line #893 exempted from lint and this PR turns into a message; this branch's version is kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
…-format

Keeps this PR on top of #894's current branch, which now has main (#893) merged in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Every formatter that named a language now takes the reader's as `locale`,
and every caller passes 'en' for now, so English reads exactly as before:

- format-duration: `formatDuration` and `waitInMinutes` write each amount
  with Intl (number, unit and plural), so "1 minute" and "2 timmar" both
  come out right. `locale` defaults to English, since some callers are
  sign-in and OAuth code that gets a language with its own text.
- fit-text: Magic Compose's cut-off warning writes its limit with
  Intl.NumberFormat.
- connected apps: the approval, last-use and expiry dates go through
  `formatGrantDate`, which keeps English in the day-first order the page
  has always shown.
- Magic Compose: `formatOneDay`, `appendAnswers` and `timeLength` take a
  locale, and `MagicComposeRoot` passes one down to Compose (the character
  count), Questions, Drafting and DraftingFrom. English times keep "9am";
  other languages get Intl's short time, as slot times do.

The participant rate-limit message now writes its plural in its own
sentence from `waitMinutes`, as Magic Compose's hourly-limit message does,
so the plural moves into the catalog with the sentence and Intl's unit
code stays out of the participant pages, which had 5 bytes of budget left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
…er-formatters

Keeps this PR on top of #895's current branch, which now has main (#893, #894) merged in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
…le change

Part of #625. A signup can now hold a language in settings.locale, and an
operator can set DEFAULT_LOCALE. Nothing reads either yet, so pages, emails
and the AI connector's tools are unchanged.

- settings.locale is a lenient string, so a stored language that has left
  the list still parses. createSignup and updateSignup refuse a language the
  caller sends unless it has shipped to participants; updateSignup checks
  only a sent one, as it does for groupByFieldRefs, because it merges the
  stored settings under the patch before parsing.
- resolveLocale and defaultFor in src/i18n/config.ts, pure, with isShipped.
- DEFAULT_LOCALE in src/lib/env.ts, an optional enum of the catalog
  languages.
- locale joins UNREAD_SETTINGS, so update_signup refuses it and get_signup
  hides it until something reads it.
- .env.example, fly.example.toml, the README and the CHANGELOG say what it
  does, that it changes nothing until a second language ships, and where a
  runtime variable goes on each platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
…anguage ships

The Settings tab gets a "Signup language" form, a plain form like "Ask for
an email address" with no script of its own. It renders only once a second
language has shipped to participants, so nothing shows yet. Each language is
named in itself (English, Svenska), through Intl.DisplayNames. Saving sends
only `locale` through updateSignup, which refuses a language that hasn't
shipped; a refusal shows the tab's usual error.

A signup with no language of its own shows the instance's, so
instanceDefaultLocale() comes in here with its first caller.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
TIME_ZONE moves from src/i18n/config.ts to its own src/i18n/time-zone.ts.
Browser code reaches it through src/lib/slot-label.ts (the Build tab's
time picker and Magic Compose), which made config.ts part of the code
those two share. Webpack counts a module's unused code when it decides
whether shared code gets a chunk of its own, so the language rules this
branch added to config.ts tipped it into making one. That chunk's entry
in the webpack runtime added 29 to 47 bytes to every page and pushed
/s/[slug]/c/[id] over its 110 kB budget. With config.ts out of the
browser's graph, every page's JavaScript is byte-for-byte the size it
was on the base branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
…sent

A settings.locale longer than 35 characters (or not a string), written
straight into the database, failed the whole settings parse: the signup
asked for an email the organizer had turned off, and every settings save
failed on a field nobody sent. The schema now reads such a value as no
language (.catch(undefined)), so a stored value can never break the row,
and an unrelated save drops it.

createSignup and updateSignup check the raw value the caller sends
instead of the parsed one, so a too-long, non-string or unknown language
is still refused with invalid_input on settings.locale (now with the
service's own message, where a too-long one used to get zod's).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
The README, .env.example and CHANGELOG said a language "takes effect
only once OpenSignup ships it", with a Swedish school as the example,
which reads as "set sv now and it will start working later". In fact any
value but en stops the app: the worker exits at startup and every page
that needs the database fails with an "Invalid environment" error. They
now say that, tell operators to leave it unset for now, drop the
example, and put what an unset value means in the future tense, since
nothing reads an organizer's browser language yet. fly.example.toml
says the same in one line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
In a file of its own, the form was a second server module importing
AsyncSubmitButton, and webpack then added a few bytes to that button's
module on every page that loads it. Inline in page.tsx, every page's
first-load JavaScript is byte-identical to the base. The test now renders
the Settings tab itself, so it also checks the page shows the form, and
that "Saved" appears only by the form that saved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
#896 merged, so main now holds this branch's base. The one conflict,
src/lib/slot-label.ts, is between #895 and #896 as squashed on main and
the same commits in this branch's history; main's copy equals #896's
head, so the branch's copy (with TIME_ZONE from its new module) stands.
The merged tree is identical to the branch's before the merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
…ettings-control

Takes #897's address round: TIME_ZONE out of config.ts, the lenient read of
a stored locale, and the docs on DEFAULT_LOCALE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
chooseOrganizerLocale takes the organizer's saved language, the instance's
DEFAULT_LOCALE and the browser's Accept-Language header (null where there is
no browser, as for MCP) and returns the first that has shipped to the
audience asked about, else English, with the step that chose it. Only the
browser's top-ranked range counts, so "sv,en;q=0.8" gives English until
Swedish ships rather than settling for the second choice.

It lives in its own file, away from server.ts (which the worker imports) and
from next/headers. The column, the session field and the request wrapper
come later.

Part of #626.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
getSignupRowBySlug reads the live signup at a slug in one statement,
skipping deleted rows and keeping drafts and archived ones, so the page can
still say which. getPublicSignup takes that row, or a slug as before for the
public API, and loadPublicSignup now gets its row from the new cached
loadSignupRowBySlug. A layout that reads the row too (a later part of #628)
then adds no statement to GET /s/[slug].

A unit test stands a per-request cache in for React's and checks the page's
read goes through loadSignupRowBySlug and hands getPublicSignup the row, not
the slug. The query-budget test says why it counts the page alone. Both page
budgets stay at 5 and 6.

Part of #628.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Next.js 15.5.29 on main adds about 0.1 kB to the page. Measured after
pnpm build on this branch: 151.201 kB, so 151.1 → 151.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Next.js 15.5.29 on main adds about 0.1 kB to the page. Measured after
pnpm build on this branch: 119.650 kB, so 119.6 → 119.7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
budgets.json conflicted on the Build tab line (this branch 151, #967's
151.3 after #962's Next.js 15.5.29 raise). Took 151.3 here; re-measured
below.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Measured after pnpm build on this branch, with Next.js 15.5.29 from main:
- /s/[slug]/c/[id]: 113.608 kB, over 113.6, so 113.7.
- /app/signups/[id]/build: 151.106 kB. This branch had lowered it to
  151 before main's Next.js raise; the catch-up took main's 151.3, and
  151.2 is the measured figure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
budgets.json conflicted on a budget line #968's branch had re-measured
for Next.js 15.5.29. Took #968's number here; re-measured below.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Measured after pnpm build on this branch, with Next.js 15.5.29 from main:
151.347 kB. This branch had raised it from 151 to 151.3 for its own
change; with Next.js on top it needs 151.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
budgets.json conflicted on a budget line #970's branch had re-measured
for Next.js 15.5.29. Took #970's number here; re-measured below.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
@richshaw richshaw added the pipeline:working A session is working on it right now label Nov 16, 2026 — with Claude
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Base automatically changed from claude/issue-953-sv-batch-a1 to main November 16, 2026 04:40
docs/translating.md conflicted: #931 (through #977) turned the glossary's
open questions into a "Settled" list, and this branch had added a
question about the Build tab's drag refusals to the old list. Kept
#931's settled list and moved this branch's question, unchanged, under
"Open questions".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt

Copy link
Copy Markdown
Owner Author

catch-up after #977: markers stand (review on db98ab7; tophat on 346e6b0, with only db98ab7's two sv.json strings and a guide note since, as the review says).

The first merge (#977's final head, which carries #931) conflicted in docs/translating.md only, a docs conflict:

I kept #931's settled list as it is, so its settled Swedish participant wording stands, and moved this branch's question, word for word, under "Open questions" (dropping that section's "None at the moment."). sv.json merged on its own (#931's participant and email keys, this branch's organizer.build keys). Apart from that one guide paragraph, the PR's changed lines are identical to before.

https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt


Generated by Claude Code

@richshaw
richshaw merged commit 47c9fd4 into main Nov 16, 2026
5 checks passed
@richshaw
richshaw deleted the claude/issue-953-sv-batch-a2 branch November 16, 2026 04:47
@richshaw richshaw removed pipeline:merge pipeline:working A session is working on it right now labels Nov 16, 2026 — with Claude
richshaw pushed a commit that referenced this pull request Nov 16, 2026
docs/translating.md conflicted: #931 (through #981) turned the glossary's
open questions into a "Settled" list with an "Open questions" section
after it, and this branch had added two questions from #982's review to
the old list. Kept #931's settled list and added this branch's two
questions under "Open questions", beside #981's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
richshaw pushed a commit that referenced this pull request Nov 16, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants