Repository navigation
Translate the Build tab into Swedish - #981
Merged
Merged
Conversation
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
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
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
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
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
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
Owner
Author
|
catch-up after #977: markers stand (review on db98ab7; tophat on 346e6b0, with only db98ab7's two The first merge (#977's final head, which carries #931) conflicted in
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."). https://claude.ai/code/session_016YZ9SVnYjqfPQCMgeA7pDt Generated by Claude Code |
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.jsonhas 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 81organizer.buildmessages:rail3,sheet5,group3,empty4,slot8;editor10,placeholder3,fieldType5,list9;fields13,fieldForm13,refusal5.They follow
en.json's order, and keep every placeholder, plural, select and tag.en.jsonis 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.buildmarked 81, dropped 0, skipped 0.tests/e2e/build-tab-language.spec.ts:openBuildTabfound 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 fromfields.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:
check.addSlot;{n, number}for every count.The terms only this batch uses are under "Proposed for the glossary", below.
The checks from the phase 2 notes
saveNotice("Sparat").oneandother, with the number in every branch that shows it.=24stays in the two reminder plurals.{n, number}everywhere but the year inrefusal.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:
spots-box-rest-*,spots-box-hover-*)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
rail.editingslot.edit,duplicate,delete,row;slot.editingslot.taken,takenOfeditor.signedUponebranch 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.doneeditor.delete,slot.delete,fields.delete;fieldForm.removeeditor.duplicatefieldType.*list.*participant.defaults.firstChoice).list.maxLength,list.fullempty.*fields.reminder;fieldForm.reminderHelprefusal.dateTooEarly::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.capacityBelowTakenrefusal.invalidatesSlotValuessheet.descriptionPlaceholderplaceholder.dategroup.renameFailedProposed 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:
{year, number, ::group-off}What's still missing for a launch
I added
svtoSHIPPED.participantandSHIPPED.organizerlocally (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.publicPage7,preview3,chrome7,crumbs4,dashboard9,loadError7.newSignup9,compose130 (questions and answers included),aiDraft10.auth.*, and the 7participant.sharemessages.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, named953d-<state>-<desktop|phone|narrow>.png.How they were made:
E2E_UNSHIPPED_LOCALES=sv, and an organizer storingsv.SHIPPEDwas not changed for the screenshots, unlike Translate organizer refusals, a signup's Settings tab and Responses into Swedish #977. The Build tab never readsSHIPPED: its page works out both languages throughgetOrganizerAppLocaleandsignupLocale, which treat a language inE2E_UNSHIPPED_LOCALESas shipped. So one build of the committed code served the screenshots and the e2e run.The states:
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-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.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.slot-editor-plural: 2 people, reminders on;slot-editor-singular: 1 person, "personen";slot-editor-reminders-off;slot-editor-no-limit: "Inget tak".enum-open;enum-new-item-count: "56/60";enum-new-item-max: "60/60 · max";enum-full: "En lista rymmer högst 20 alternativ."saving: "Sparar…";saved: "Sparat";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, andrefusal-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 are953d-addr-refusal-*-<320|390>.png(see "Review").en-signup-sheet,en-signup-editor: the organizer's words in Swedish around English content.spots-box-rest-sv,spots-box-rest-en,spots-box-hover-sv,spots-box-hover-en.953d-<state>-<width>.aria.txtholds the accessibility tree ofempty,sv-sheet,slot-editor-plural,all-types-editorandfields-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:
mm/dd/yyyyand12/15/2026. That's Chromium's own control, in the headless browser's language, not the catalog.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'sonebranch: one spot can't be taken past a limit of 1 or more.group.renameFailedfor anything but a date.slot.*'stimebranch: a time field first among the non-grouped fields. It reads "Ändra passet kl. 09:00".list.newItemLabelandlist.maxLength, the new item box's name and description.fieldForm.backLabelandfieldForm.nameLabel.Follow-ups (layout, English too)
Neither is the catalog's, and neither changes here:
w-20leaves 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.Review
The
translateskill'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).refusal.dateTooEarly::group-off.refusal.slotsMoved,refusal.fieldsMoveddocs/translating.md, with "så ordningen sparades inte", which also fits in 7 lines, for the full review (#639).refusal.invalidatesSlotValuesorganizer.build.editor.doneeditor.doneis "Klart", while participants' Done (participant.dialog.done) on this branch is still "Klar".editor.donechanges 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 eachcapacityBelowTakenbranch. It judged from the catalog, not on screen, the messages no screenshot shows (listed above) andcapacityBelowTaken, 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.jsonanddocs/translating.mdonly):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]/build151.2 of 151.2 kB).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.buildand the same spec:pnpm test src/i18n src/components/build-wysiwyg src/components/build-shared: pass, but forused-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]/build151.2 of 151.2 kB, as on Translate organizer refusals, a signup's Settings tab and Responses into Swedish #977).build-tab-languageandorganizer-language, 30 passed and 2 skipped. The skips are "answers Magic Compose's questions" in en and sv, which skip with noLLM_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.svin bothSHIPPEDlists, locally: only the 186 missing messages above.pnpm test:dbnot run: this PR's own diff changes no service,src/db,src/mcp,src/oauthor job file. Thesrc/mcpchange 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