Repository navigation
Switch Swedish on for organizers and participants - #1019
Conversation
Tests of what a language gets before it ships (English pages, no picker, a refused save) and of one audience's list against another's leaned on SHIPPED holding English alone without saying so. 89 of them (62 unit, 27 database) fail as soon as a language ships. shipOnlyEnglish() in src/i18n/testing/ship.ts ships English alone to every audience for one test, and these tests now call it, per block or per test, so they pass before and after each launch. Their assertions are unchanged. The two MCP description tests read SHIPPED.participant as the tools did when they loaded, rather than spelling out "en". The e2e specs' hints for a page not in a test language come from one helper, which names E2E_UNSHIPPED_LOCALES only for a language that hasn't shipped. The story spec presses the signup's own language control and the switch button in account Settings once its language has shipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Add sv to SHIPPED.participant and SHIPPED.organizer. The organizer app, the consent screen and the sign-in emails follow the organizer's language; a signup's pages and emails follow the signup's; account Settings and each signup's Settings tab show their language choices; new signups store the language they start in. site stays English (phase 3). The CHANGELOG leads with what DEFAULT_LOCALE=sv does on upgrade, then new signups storing a language and the CSV following the organizer's language, and rewords the unreleased entries that said none of this had happened yet. README, .env.example, docs/translating.md (including the next language's launch steps), docs/connect-ai-assistant.md, CLAUDE.md, CONTRIBUTING.md and the translate skill say Swedish has shipped. "Create and publish your first signup" gains a section on changing a signup's language, with its names in the UI list, two walkthrough tests and a new picture; the email setting's picture is re-taken, since the Settings tab's form now holds the language too. The legal pages already describe what ships, so they don't change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Translation review (Swedish), launch, in contextScope: I reviewed the Swedish screenshots (desktop 1280 and phone 390, all 54 screens), the five rendered emails (text and HTML) and the whole Verdict: ready to ship. I found nothing that is wrong in meaning, cut off, or in English where Swedish belongs. The glossary is followed throughout (anmälningslista, pass, plats, arrangör, fält, öppen/stängd, "du", "dela inte mejlet med någon" in all three emails). No key is left in English, and the quotes, dashes, "1 234" numbers and "lör 5 sep." dates are right. Nothing overflows at 390 px. Must fix before launchNone. Should fix
Nits
Not Swedish text, so no action: the Build tab's native date input shows "mm/dd/yyyy" in the screenshot browser (the browser's locale, not the catalog's "ÅÅÅÅ-MM-DD"). The "Seeded by tests/e2e/…" description is fixture data. https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt Generated by Claude Code |
Tophat: passedRan 660725d as a real install would: The owner's story
A Swedish signup as a participant (phone, English-language browser)
Mixed cases and emails in flight
English unchanged, and the new pickers
|
| Check | Result | What I saw |
|---|---|---|
| Sign-in pages and email | ✅ | /login ("Logga in på OpenSignup"), the "sent" state and the confirm page have lang="sv". The sign-in email to a new address is Swedish. |
| A new account's language | ✅ | Stores NULL from both an English and a Swedish browser. The app is Swedish. |
A signup with no stored language (made on main) |
✅ | The public page is Swedish. Its participant, who signed up in English, got a Swedish time-changed email from the worker. |
| Stored languages win | ✅ | A signup storing en stays English. An organizer storing en stays English, and one storing sv stays Swedish. A new signup stores sv with localeSource: instance. The /s 404 page is Swedish too. |
This matches the PR's "What changes for an existing install" table, row by row.
AI connector, help, accessibility, console
| Check | Result | What I saw |
|---|---|---|
| MCP over OAuth (e2e static client, real consent and token) | ✅ | The consent screen is Swedish. The locale descriptions of create_signup and update_signup say "one of: en, sv". create_signup with locale: "sv" stores sv (localeSource: api, viaClientId). Without locale, it gets the organizer's sv. update_signup to en works. "de" and "SV" are refused with "leave it out, or use one of: en, sv", and REST refuses them the same way. |
| Sign-in email with code | ✅ | A Swedish account's sign-in email is Swedish ("Logga in på OpenSignup", lang="sv"). Typing the six-digit code into the window that asked for it signs in to the Swedish app. |
| Help: "Change your signup's language" | ✅ | It matches the screens: the email address at the top links to /app/settings (Account on a phone), Language is there, and the three Settings-tab steps and Saved match. The new picture matches the screen. |
| axe (WCAG A/AA) | ✅ | No violations on account Settings, the Settings tab, Your signups, Build, Responses, Connected apps, consent, /login (sv), the public page (open, closed, draft), the sign-up dialog, the edit page or unsubscribe. Two contrast findings (the compose eyebrow pill, the Fields dialog's group-by chip) are identical on main in English, so they predate this PR. |
| Console and server logs | ✅ | Only the expected 400 (the refused save) and 404s. React #418 (#1018) didn't appear in any load. No server errors. |
Notes (none blocking)
- The Swedish Settings tab is half off-screen at 320 px. The tab strip's text "Bygg 5 · Anmälningar 1 · Inställningar" needs 356 px, so Inställningar shows half its text at the right edge. The strip scrolls sideways, so it's still reachable. English fits (it ends at 314 px). This isn't in the PR's known limits, and it is the tab the help article sends people to.
- At 320 px the header crumb "Inställningar" overlaps Hjälp and Konto. This is The organizer header's crumbs run into Help and Account on a phone #978, known, and happens in English too.
- Account Settings mixes apostrophes in English: "aren't" and "OpenSignup's" use straight ones, while "signup’s" uses a curly one. The messages are already on
main, but people only see them now. - Date boxes follow the browser's own locale. An English browser shows
11/17/2026in the Swedish slot editor. That's the browser, not the app.
For the owner
Merging this turns Swedish on. A new organizer whose browser prefers Swedish lands in a Swedish app after their first sign-in. Every organizer gets Language in account Settings and Signup language on each signup's Settings tab. Participants see a signup, its emails, reminders, time-changed emails and calendar file in the signup's language, people who signed up earlier included. English organizers and their signups are unchanged apart from the two pickers. Key screenshots, in story order:
01-new-account-swedish-browser-dashboard-128002-account-settings-svenska-saved-switch-1-128003-sv-magic-compose-start-128004-sv-build-slot-editor-refused-save-128005-sv-publish-and-share-128006-sv-responses-128007-sv-participant-signup-sheet-39008-sv-participant-edit-page-39009-sv-confirmation-email10-account-switch-3-signups-en-390
Also saved: the reminder email, the DEFAULT_LOCALE=sv login, the consent screen and the 320 px header.
Screenshots are in https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt.
Generated by Claude Code
richshaw
left a comment
There was a problem hiding this comment.
Review: passed (round 1)
The PR adds sv to SHIPPED.participant and SHIPPED.organizer (two lines in src/i18n/config.ts; site stays ['en']), has the tests that assumed English-only lists say so with a new helper, and brings the docs, CHANGELOG and one help article up to date. It does what it says. I found nothing that has to change before the owner decides.
Blocking (0): none.
Optional (5):
participant.unsubscribe.turnedOn.bodyWithEmailinsrc/messages/sv.json(the translation review's one should-fix): "…påminnelser om {title} till {email} igen" reads badly after a title that ends in "till …". Worth fixing before Swedish is live, since participants see it. I'd do it as a small catalog-only PR tomain(English doesn't change, so nothing needs re-marking), merged before this one. A commit here would count as a runtime change and send this PR back through tophat and review. The "Försök en gång till." / "Försök igen." nit can ride along.- The PR body is behind. "The launch review" still says the review in context is "still to come" and that its findings "will be added here before the owner's review". It's done (the translation review comment above). Please add its findings and what was done about each, and add the tophat's 320 px note to "Known limits": the Swedish tab strip needs 356 px, so Inställningar is half off-screen until the strip is scrolled. Body edits only, no commit.
- Follow-up issues, none of them for this PR: the 320 px tab strip (Swedish only, still reachable, next to #978); the mixed straight and curly apostrophes in the English account messages (an
en.jsonchange, sosvhas to be marked again); the translation review's other nine nits as one batch. #992 will need rewording once this merges, since Swedish no longer "drifts until it ships". src/mcp/tools/signups-write.test.tslines 26, 322 and 527: the two description tests now build the expected text fromSHIPPED.participant, the same expressionsignups-write.tsline 31 uses. That's the right trade (no edit at each launch), but they can no longer catch the description reading the wrong list. A one-line check that the text namessvwould bring that back, at the cost of nothing at the next launch.- The second commit's co-author trailer names a model. History stays as it is, so leave it out of the squash message.
Earlier threads: none. The automated reviewer answered that it couldn't review (quota).
Checks: CI is green on 660725d (lint-type-test, e2e, CodeQL). Locally, on this head and my own database: pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test pass (3,471 passed, 1 expected fail, 244 files); pnpm test:db passes (857 in 47 files); pnpm build && pnpm budgets pass with budgets.json untouched. The tophat passed on this same commit.
What I checked beyond that:
- The 87 pinned tests. Across every changed
srctest file, the only removed lines are imports, the two description expectations, and one'sv'that becameOTHER_LOCALE. The added lines are imports,shipOnlyEnglish()(23 times),beforeEach(shipOnlyEnglish)(19) and comments. Noskip,todoorfails. I read about 20 of them in context (the CSV export, the public API'ssettings.locale,createSignup's refusals and itsE2E_UNSHIPPED_LOCALEScase, the confirmation email, Magic Compose's two "only English" cases,setOpenSignupsLocale, the adapter, the sign-in pages, consent, the MCP tools on Postgres). Each still asserts what its title says, from the state it used to get by accident. - Both directions, by running them. With the switch put back to English only,
pnpm testandpnpm test:dbpass unchanged (3,471 and 857). With a made-up third language added to both lists, one test fails:SHIPPED > ships only languages that have a catalog, which is the guard doing its job. So "no test should need editing at the next launch" holds today. - The helper.
shipOnlyEnglishcallsshipfor each audience, so the existingonTestFinishedputs the lists back, in a test or in abeforeEach;ship.test.tschecks both. Vitest isolates each file, so nothing leaks across files. - Who reads
SHIPPEDwhen a module loads.src/mcp/tools/signups-write.tsline 31, as the body says, and one the body doesn't list: the help article'sOTHER_LANGUAGE(create-and-publish-a-signup.tsxline 16). It's a static page and no test pins it, so nothing is wrong; the walkthrough reads the list the same way. - New accounts.
newOrganizerLocalenow stores Swedish for a browser that asks for it first, on a site with noDEFAULT_LOCALE. That is the owner's rule of 14 November, as the function's comment and the table indocs/translating.mdstate it; nothing in it changed here. - "What changes for an existing install". Each row matches the code:
resolveLocaleandnewSignupLocale(which stores nothing only while one language has shipped), the CSV following the organizer, the descriptions and refusals reading the list. No migration, and nothing stored today can besv, since every write path refused it. - Legal pages. Privacy (15 November) already says the account's language is saved once from the browser's first language unless the site has a default, that it's the sign-in emails' language, what the activity log records, and what goes to the AI provider. Cookies and terms don't mention a language. No change is right.
- Help. The new section follows
docs/writing-help.md; its three new names are in theUIlist with catalog keys, the walkthrough clicks them, and both pictures match the screen. - No personal data, secrets or plan text in the diff.
For the owner (gate: UX, the launch itself). Merging switches Swedish on for every organizer and participant. The tophat's screenshots are in story order in its comment. The three things I'd look at: the CHANGELOG entry's first two sentences (what DEFAULT_LOCALE=sv does on upgrade), the help page's new section, and whether item 1 above lands first.
https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
Generated by Claude Code
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt
#1016 added translated-organizer.spec.ts, which already saves the organizer screens on the way to a published signup. Keep that as the base, and from organizer-language.spec.ts save only the screens and states it doesn't reach, under names that don't clash with its own. Drop the Build tab spec's shots, which repeat main's, and the note that account Settings' language choice has no screenshot, which #1019 made untrue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016YZ9SVwh9pcQeEc28jgf1b
Fixes #639.
The stack
The launch PR of the localization stack (#619): it switches Swedish on for phases 1 and 2. Based on
main, which has every PR it needs (#1015, #1016 and #1025 included); review againstmain. It was built on ccc5f65 and caught up withmainafter #1025 merged. Owner-gated: it changes what every organizer and participant can see. It gets a tophat and a review, then waits for the owner.What changes for people
svjoinsSHIPPED.participantandSHIPPED.organizerinsrc/i18n/config.ts.sitestays['en']: the home, help and legal pages are phase 3. That's the whole code change.svwhen the browser it signs up in puts Swedish first, on a site with noDEFAULT_LOCALE. Its sign-in pages and first sign-in email are still English, since there's no account yet. That's by design.svwherever they take a language.create_signup's andupdate_signup's descriptions and every refusal now say "one of: en, sv". Error messages and the connector's instructions stay English.__golden__/system-prompt.txtstill matches.What changes for an existing install
No migration and nothing to run. What people see depends on
DEFAULT_LOCALE:DEFAULT_LOCALEunset orenDEFAULT_LOCALE=sv(accepted and ignored until now)enincluded: the organizer's, else the site's, else English.signup.createdrecords it and what chose it. So a signup made after the upgrade keeps its language whenDEFAULT_LOCALEchanges later; one made before still follows it./s/[slug], the sign-up POST) changes.DEFAULT_LOCALEitself: give both the same value, or a signup's pages and its reminders disagree. Docker Compose gives both the same.env.svout again makes every storedsvread as the site's language (the rule is lenient, and tested). Nothing breaks; the stored values come back ifsvdoes.Don't backfill
locale: 'en'onto old signups: leaving them empty is what lets an operator move a whole site withDEFAULT_LOCALE.A paragraph for release notes:
The tests
Two commits, so they can be read apart. The first passes on
mainas it is, withSHIPPEDuntouched; the second adds the switch.With the switch on
main(ccc5f65), 89 tests failed: 62 unit tests in 23 files and 27 database tests in 13 files. The same 89 the plan found on #1016's head: #1015 and #1016 added none. No e2e test failed.E2E_UNSHIPPED_LOCALES) or one audience's list against the other's. That rule is still live: it's what the next language's catalog gets before its launch, and what a stored language gets if it's withdrawn. So they state their starting lists rather than flip:shipOnlyEnglish()insrc/i18n/testing/ship.tsships English alone to every audience for one test, and these tests call it, asbeforeEach(shipOnlyEnglish)on a block whose tests all start there, or as the first line of a single test. Their ownship(...)calls stack on top, as before. No assertion changed, and nothing was skipped or loosened. They pass with and without the switch, and will pass at the next launch.create_signup's andupdate_signup'slocaledescriptions are built once, when the tools load, soshipcan't reach them. Their tests now readSHIPPED.participantat the same moment and expect "one of: en, sv" from it, so they follow the next launch too.ship.test.tsgains three tests ofshipOnlyEnglish(it ships English alone, puts the lists back, and lets a test ship on top).open-signups-locale.db.test.ts, refused'sv'by name, where the same test in the other files usesOTHER_LOCALE; it usesOTHER_LOCALEnow.lang.vitest.setup.ts: the catalog check andconfig.test.ts'sSHIPPEDblock must read the real lists.E2e:
organizer-language-story.spec.tstakes its launched path for the first time: it picks Svenska in account Settings with the real radio and Save, then (new here) changes the signup's language back to English on its Settings tab and sees the participant page follow, then presses Byt dem till svenska in account Settings and sees both open signups follow. Those two controls had no browser test.unshippedHintintests/e2e/helpers/unshipped-locales.ts. It namesE2E_UNSHIPPED_LOCALESonly for a language that hasn't shipped; for a shipped one it says the server needs nothing. Before, six hints would have ended in an emptyE2E_UNSHIPPED_LOCALES=(or told you to set=sv, which does nothing now).translated-organizer.spec.ts's header no longer says the new signup's fields are "What" and "Date": once the language has shipped, they're named in it.E2E_UNSHIPPED_LOCALESis now empty by itself (UNSHIPPED_LOCALES); with it empty the server logs no warning. So nothing in CI runs the specs' path for a language that hasn't shipped (storeSignupLanguage, the seeded rows);docs/translating.mdsays so, and that the next language's first PR runs it again.Docs and help
DEFAULT_LOCALE=svdoes on upgrade, then new signups storing a language and the CSV, what appears, and what stays English. The Unreleased entries that said none of this had happened yet ("Nothing sets it yet", "so it isn't there yet", "onlyenso far", "While only English has shipped, which is today…") are reworded, so the release doesn't tell both stories.docs/translating.md; theDEFAULT_LOCALEparagraph rewritten in the present tense (acceptsenandsv; whatsvswitches; new accounts store none while it's set; web and worker need the same value)..env.example: the same, shorter;DEFAULT_LOCALE=stays bare forenv.test.ts.docs/translating.md: Swedish is chosen today;SHIPPEDholds it;E2E_UNSHIPPED_LOCALESis empty, and thestoreSignupLanguagepath no longer runs for Swedish (Test the organizer app in every test language #1016's review); "Changing English" names Swedish as the shipped language; the Launch paragraph is now the next language's steps: add it to both lists, expect no test to need editing (shipOnlyEnglish), re-take the help screenshots that show a language choice, the docs to touch, and the review in context. The decision table keeps its shape (account-language-table.tsreads it).docs/connect-ai-assistant.md: "(only English so far)" → "(English or Swedish)", twice.en.jsontranslatessvin the same PR;shipOnlyEnglishbesideOTHER_LOCALE; the staleE2E_UNSHIPPED_LOCALES=sv pnpm dev. CONTRIBUTING.md names Swedish; thetranslateskill says no language is unshipped today.SHIPPEDandlanguageName, not typed. The.ui.tslist gains Signup language, Account and Language, with their catalog keys. The walkthrough gains two tests: the desktop steps (the account's Language, the Settings tab's choice, Save, Saved, the participant page in the new language), which takes the new picturesignup-language.png, and the phone's Account link.email-setting.pngis re-taken, since the Settings tab's form now holds the language too: new alt text and height.pnpm help:screenshotsalso rewrote four other pictures with nothing changed but font smoothing; I put those back.docs/telemetry.mdalready describeslocaleonsignup.createdandworkspace.created.The launch review
Done in this PR, from the plan's "Do in this PR":
DEFAULT_LOCALEnow changing the organizer app, the sign-in pages and email: README,.env.example, CHANGELOG.E2E_UNSHIPPED_LOCALESby itself: the list is empty, and the server logs no warning.docs/translating.mdsays thestoreSignupLanguagepath no longer runs for Swedish; the unshipped hint reads sensibly with an empty list; the spec header's "What"/"Date" comment is fixed.pnpm translation:screenshotsran on this head (below), and the review over those screenshots, the five Swedish emails and the wholesv.jsonis done (its comment). Verdict: ready to ship, with 0 must-fix, 1 should-fix and 10 nits. No message changed in this PR, so it was a last pass over what's onmain, which has changed since each batch's own review (Say "open" for a signup people can sign up on, not "live" #888, Fix the wording and Save problems found in the owner's walkthrough #999, Fix the small things the localization reviews left #1010). What was done about each finding:participant.unsubscribe.turnedOn.bodyWithEmail:… om <b>{title}</b> till {email} igenreads badly after a title that ends in "till …". Fixed in Reword the Swedish "reminders back on" line so a title can't double "till" #1025, merged before this one: the address now gets a sentence of its own, "Vi skickar dem till {email}.", after its own translation review, tophat and code review.participant.unsubscribe.turnOnFailedandorganizer.signup.refusal.reopenFailedsay "Försök en gång till." where the rest say "Försök igen.". Kept on purpose: both follow a sentence that already ends on igen, so "Försök igen." would put it twice in a row. Reword the Swedish "reminders back on" line so a title can't double "till" #1025 records the rule in the glossary.Already fixed on
mainbefore this PR (the plan's section 5):<html lang>on every root layout (#1011, #1012), tests for every language (#935, #1016), the viewer's refusal (#619), one Save on the Settings tab (#999), both lists checked to launch together, the 7participant.sharemessages, dates in the signup's language on the Build tab and Responses (#951),?error=codes, the language name's case in a sentence (#979), the wording fixes from #999 and #1010, andUNSHIPPED_LOCALESworked out from both lists.Known limits
main, in any language (9 of 180 loads of a 13-slot signup, in English). It can fail an e2e test under load; CI retries once. The fix is upgrading to Next 16./login, "Check your email", the confirm page and the first sign-in email. Later sign-in emails are Swedish. By design: nothing is guessed before an account exists./shas nolang.mainalready, but people only see account Settings' language messages from this PR on (English messages mix straight and curly apostrophes, sometimes on the same screen #1023)./app/signups/new(119.679 of 119.7 kB) and the Build tab (151.230 of 151.4 kB). Not this PR's doing, but the next change to either fails.pnpm eval:magic-composeis a cheap check.Before merging
This changes what every organizer and participant can see, so it waits for the owner. Please look at, at a computer's width and at 390 px:
/loginon a site withDEFAULT_LOCALE=sv.en.jsonlands second must translatesv, or the catalog check fails it.Checks
On the PR's head as built (660725d), in this session:
pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test: pass, 3,471 passed and 1 expected fail in 244 files.pnpm test:db: pass, 857 in 47 files.pnpm build && pnpm budgets: pass, no budget changed. Against a build of the first commit alone, every page's first-load JavaScript is within 4 bytes, on pages languages don't touch too (/,/login), so that's chunk-hash noise: shipping a language adds no client JavaScript, as the plan measured.LLM_BASE_URL), 1 failed: the story spec's new steps, on a locator that matched two status regions on the Settings tab. Fixed before pushing; the spec passed on its rerun. React's Use the existing helpers for three rules commitment code spelled out by hand #418 didn't show.LLM_BASE_URLset; the tests answer the drafting call themselves): 48 passed, 0 skipped, so the 4 Magic Compose tests ran.a11yand the help walkthroughs, 96 passed, 4 skipped (no AI);pnpm test3,471 andpnpm test:db857, all passed. So the tests pass before and after the switch.pnpm translation:screenshots(container config, stand-in AI): passed, 12 email tests and 58 browser tests. 112 Swedish screenshots (56 at a computer's width, 56 at 390 px; 18 of them the organizer's) and the 5 Swedish emails, HTML and text.to-translate.mjs svandto-translate.mjs sv --audience organizer: 0 missing, 0 stale, 0 unrecorded, 0 extra, 0 unneeded, both.pnpm test src/i18n src/email): pass, 559 tests.pnpm help:screenshots: 10 walkthrough tests passed.After catching up with
main(a53e221, which brings in only #1025's onesv.jsonline and its glossary item; it merged cleanly):pnpm lint && pnpm format:check && pnpm typecheck && pnpm knip && pnpm test: pass again, 3,471 passed and 1 expected fail.to-translate.mjs sv, both audiences: clean.🤖 Generated with Claude Code
https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt