Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
18bee0a
Add the translator and English catalog that localization builds on
claude Nov 13, 2026
d5f43d9
Keep the message catalogs out of client files with a lint rule
claude Nov 13, 2026
287efb2
Merge branch 'main' into claude/issue-620-client-lint
richshaw Nov 13, 2026
1930b8a
Check the message catalogs in pnpm test
claude Nov 13, 2026
28a7b8b
Merge claude/issue-620-client-lint, which now has main with #889
claude Nov 13, 2026
a4559c0
Lint hard-coded text where it has moved to the catalogs
claude Nov 13, 2026
218b7d9
Merge branch 'main' into claude/issue-623-catalog-check
richshaw Nov 13, 2026
a7a10ed
Catch a select shown as a plain placeholder in the catalog check
claude Nov 13, 2026
4480055
Precompile the message catalogs at build time
claude Nov 13, 2026
701bd61
Merge branch 'claude/issue-623-catalog-check' into claude/issue-623-t…
claude Nov 14, 2026
dd50e3b
Merge branch 'main' into claude/issue-623-text-lint
richshaw Nov 14, 2026
20409b8
Give slot dates and times a language
claude Nov 14, 2026
18564d2
Escape backslashes too in filesAt's globs
claude Nov 14, 2026
9ca3cb6
Merge branch 'claude/issue-623-text-lint' into claude/issue-624-preco…
claude Nov 14, 2026
86a0365
Merge branch 'claude/issue-624-precompile' into claude/issue-622-slot…
claude Nov 14, 2026
1559802
Merge branch 'main' into claude/issue-624-precompile
claude Nov 14, 2026
ee870e1
Merge branch 'claude/issue-624-precompile' into claude/issue-622-slot…
claude Nov 14, 2026
325f17a
Merge branch 'main' into claude/issue-622-slot-format
richshaw Nov 14, 2026
d768b87
Give the other formatters a language
claude Nov 14, 2026
3c9b122
Merge branch 'claude/issue-622-slot-format' into claude/issue-622-oth…
claude Nov 14, 2026
40bb396
Give a signup a language and an instance a default one, with no visib…
claude Nov 14, 2026
07afbfd
Add a Signup language control to the Settings tab, hidden while one l…
claude Nov 14, 2026
a5d1fab
Keep the language rules out of the browser's view, so no page grows
claude Nov 14, 2026
efff208
Read any stored signup language leniently, and check the one sent as …
claude Nov 14, 2026
d53625b
Say plainly that DEFAULT_LOCALE accepts only en today
claude Nov 14, 2026
49db138
Keep the Signup language form in the Settings page's own file
claude Nov 14, 2026
a7f3825
Merge branch 'main' into claude/issue-625-signup-locale
claude Nov 14, 2026
f9e4103
Merge branch 'claude/issue-625-signup-locale' into claude/issue-625-s…
claude Nov 14, 2026
fe68bb1
Work out an organizer's language as pure logic, with no storage yet
claude Nov 14, 2026
bd3c442
Read a public signup's row once per request, through a cached loader
claude Nov 14, 2026
5ddc90f
Carry the organizer's saved language in the session and the token con…
claude Nov 14, 2026
afaf7be
Let an organizer save a language for new signups, hidden until a seco…
claude Nov 14, 2026
dd7ef70
Start new signups in their organizer's language, once there's a choice
claude Nov 14, 2026
e99765d
Let create_signup take a locale, else the organizer's language
claude Nov 14, 2026
1e53268
Have the public signup pages work out the signup's language
claude Nov 14, 2026
d0a8a6b
Find the signup's language on the not-found pages from the request path
claude Nov 14, 2026
522775f
Show a signup's language to AI assistants and the public API
claude Nov 14, 2026
8811cf2
Share one ship() test helper for languages that haven't shipped
claude Nov 14, 2026
39eb1eb
Take the footer's language and the Banner and BottomSheet labels as p…
claude Nov 14, 2026
855ea58
Move the public signup page's server-rendered text into the catalogs
claude Nov 14, 2026
8fcca7f
Give the sign-up dialog its messages from a client provider
claude Nov 14, 2026
c536029
Take the sign-up dialog's text and the error copy from the catalog
claude Nov 14, 2026
2e10c73
Add a partial Swedish catalog and a Swedish test signup
claude Nov 14, 2026
5911881
Give the edit and unsubscribe pages their signup's language
claude Nov 14, 2026
b3d5f3c
Fit the Swedish Spots label, and warn when the e2e locale hook is on
claude Nov 14, 2026
45c4dce
Take the edit, cancel and unsubscribe pages' text from the catalog
claude Nov 14, 2026
3aebf1d
Name the case of a refused sign-up or edit in details.reason
claude Nov 14, 2026
b94d806
Merge #914's final branch into #915
claude Nov 14, 2026
e9d6a14
Merge #915's branch into #916
claude Nov 14, 2026
05eba67
Find the edit form's Swedish Spots field by its new label
claude Nov 14, 2026
56ce1b3
Merge #916's branch into #917
claude Nov 14, 2026
4eabed3
Word every sign-up and edit-page error from the catalog
claude Nov 14, 2026
91fae7d
Merge remote-tracking branch 'origin/claude/issue-631-error-reasons' …
claude Nov 14, 2026
57c8242
Find the Swedish Spots field by its catalog label; widen quantity_not…
claude Nov 14, 2026
8ac41eb
Write participant email subjects from the catalog, in the signup's la…
claude Nov 14, 2026
6f0cf51
Check the Swedish preview text is the subject
claude Nov 14, 2026
45f6bec
Write participant emails from the catalog, in the signup's language
claude Nov 14, 2026
2ab7365
Lint hard-coded text in the participant email templates
claude Nov 14, 2026
78df23f
Warn when the worker starts with E2E_UNSHIPPED_LOCALES set
claude Nov 14, 2026
9242a0f
Make no claim after an answer that isn't the API's error
claude Nov 14, 2026
50d2bd9
Take the calendar file's description and the share text from the catalog
claude Nov 14, 2026
3749e69
Make no claim when the edit page's save or cancel gets no answer
claude Nov 14, 2026
1e1ed68
Keep the slot's letters in the calendar file's name
claude Nov 14, 2026
76a7b50
Merge #918's final branch into #919
claude Nov 14, 2026
00d47a2
Merge #919's branch into #920
claude Nov 14, 2026
a393208
Merge #920's branch into #921
claude Nov 14, 2026
bad9f41
Name a new signup's columns and the Build tab's defaults in its language
claude Nov 14, 2026
40985a9
Say in the CHANGELOG that new signups' default names follow their lan…
claude Nov 14, 2026
8bc4be4
Reword the Build tab's language prop comment
claude Nov 14, 2026
b14b06a
Merge #921's branch into #925
claude Nov 14, 2026
435e410
Merge #925's branch into #926
claude Nov 14, 2026
4bfca33
Write Magic Compose drafts in the description's language
claude Nov 14, 2026
d2f5938
Start a Magic Compose signup in the language its draft is written in
claude Nov 14, 2026
cb49cc8
Save screenshots and email HTML for a translation's review
claude Nov 14, 2026
49d832a
Add a translating guide, a Swedish glossary and a translate skill
claude Nov 14, 2026
15d274e
Read a draft's reported language as a whole language tag
claude Nov 14, 2026
ebecefd
Merge #928's branch into #929
claude Nov 14, 2026
f1c1bb1
Catch translations whose English changed since they were made
claude Nov 14, 2026
2c8a074
Merge #929's branch into #930
claude Nov 14, 2026
5f4e0bb
Put each email's subject in the text the translation review reads
claude Nov 14, 2026
a920482
Merge #929's address round into the stale check
claude Nov 14, 2026
98657d1
Ask about the organizer's language and their open signups after a lan…
claude Nov 14, 2026
2bb311d
Bring each language question into view after its save
claude Nov 14, 2026
852d990
Give No the focus after a language save, first in the row
claude Nov 14, 2026
793e4f1
Take #928's draft-language change back out
claude Nov 14, 2026
1ece68b
Merge #929's branch into #930 (#928 taken back out)
claude Nov 14, 2026
9e237b3
Merge #930's branch into #933 (#928 taken back out)
claude Nov 14, 2026
5f7d444
Replace the after-save language questions with a switch button
claude Nov 14, 2026
6062c1e
Keep a longer "Saved" line's words evenly spaced
claude Nov 14, 2026
768f1cb
Store an organizer's language once, when their account is created
claude Nov 14, 2026
45fb6a1
Take the switch's count from what's stored, not the address
claude Nov 14, 2026
7a8c9b6
Merge #933's latest (the switch's count from what's stored)
claude Nov 14, 2026
750e570
Let the site default win when an account stores its language
claude Nov 14, 2026
eaa788a
Merge main into claude/issue-625-signup-locale
claude Nov 15, 2026
009a51b
Merge main (Next.js 15.5.29, #984, #806) into the client messages PR
claude Nov 15, 2026
3d90da2
Merge #897's final head into claude/issue-625-settings-control
claude Nov 15, 2026
271a335
Merge main: #897 landed as c1f13bd, same tree as its head
claude Nov 15, 2026
67dbde0
Raise the edit page budget for Next.js 15.5.29
claude Nov 15, 2026
0f5ae9d
Merge #899's final head into claude/issue-626-organizer-locale-core
claude Nov 15, 2026
e4c7170
Merge main: #899 landed as 1d2a721, same tree as its head
claude Nov 15, 2026
9d4ec17
Merge the client messages PR (main's Next.js 15.5.29, #984, #806) int…
claude Nov 15, 2026
1dee0ac
Raise the edit page budget for Next.js 15.5.29
claude Nov 15, 2026
2074a5f
Merge #901's final head into claude/issue-628-signup-row-loader
claude Nov 15, 2026
f1e9bb4
Merge main: #901 landed as c2fb12a, same tree as its head
claude Nov 15, 2026
f031cc5
Merge the dialog text PR (main's Next.js 15.5.29, #984, #806) into th…
claude Nov 15, 2026
1330c8e
Merge the Swedish seed PR (main's Next.js 15.5.29, #984, #806) into t…
claude Nov 15, 2026
47ec19d
Merge #902's final head into claude/issue-626-organizer-locale-column
claude Nov 15, 2026
d348453
Merge main: #902 landed as 9f39d58, same tree as its head
claude Nov 15, 2026
5487a05
Merge the edit page locale PR (main's Next.js 15.5.29, #984, #806) in…
claude Nov 16, 2026
4ccf859
Merge #903's final head into claude/issue-626-account-language
claude Nov 16, 2026
4dbb0cc
Merge main: #903 landed as f8dabd9, same tree as its head
claude Nov 16, 2026
a1fa37d
Merge the edit page text PR (main's Next.js 15.5.29, #984, #806) into…
claude Nov 16, 2026
d34b5b0
Merge the error reasons PR (main's Next.js 15.5.29, #984, #806) into …
claude Nov 16, 2026
084a0d4
Merge #904's final head into claude/issue-627-signup-starts-in-language
claude Nov 16, 2026
b31a87c
Merge main: #904 landed as e2b4f49, same tree as its head
claude Nov 16, 2026
7b0d70e
Raise the edit page budget for Next.js 15.5.29
claude Nov 16, 2026
a13405e
Merge the client error text PR (main's Next.js 15.5.29, #984, #806) i…
claude Nov 16, 2026
fd3afe4
Merge #905's final head into claude/issue-627-mcp-create-locale
claude Nov 16, 2026
300bfc7
Merge main: #905 landed as 950f718, same tree as its head
claude Nov 16, 2026
58de416
Merge the email subjects PR (main's Next.js 15.5.29, #984, #806) into…
claude Nov 16, 2026
0c3c170
Merge #906's final head into claude/issue-628-page-locale
claude Nov 16, 2026
02989f4
Merge main: #906 landed as 614a0d7, same tree as its head
claude Nov 16, 2026
eedebd5
Merge the email templates PR (main's Next.js 15.5.29, #984, #806) int…
claude Nov 16, 2026
b108a9b
Merge #907's final head into claude/issue-628-path-header
claude Nov 16, 2026
7797da1
Merge main: #907 landed as ba75aae, same tree as its head
claude Nov 16, 2026
329d114
Merge the calendar share text PR (main's Next.js 15.5.29, #984, #806)…
claude Nov 16, 2026
07d80d2
Merge #908's final head into claude/issue-625-locale-in-api
claude Nov 16, 2026
9694d0d
Merge main: #908 landed as 80d071b, same tree as its head
claude Nov 16, 2026
353242f
Merge the calendar file name PR (main's Next.js 15.5.29, #984, #806) …
claude Nov 16, 2026
7910cb1
Merge #909's final head into claude/issue-629-common
claude Nov 16, 2026
4320ec9
Merge main: #909 landed as debb086, same tree as its head
claude Nov 16, 2026
f242d12
Merge #910's final head into claude/issue-629-server-text
claude Nov 16, 2026
d9ec84e
Merge main: #910 landed as bda7dfd, same tree as its head
claude Nov 16, 2026
40116ab
Merge #911's final head into claude/issue-629-client-messages
claude Nov 16, 2026
17e8e0f
Merge main: #911 landed as 2f93094, same tree as its head
claude Nov 16, 2026
20a474d
Merge #912's final head into claude/issue-629-dialog-text
claude Nov 16, 2026
ac3e06f
Merge main: #912 landed as 2e2e314, same tree as its head
claude Nov 16, 2026
6c85da5
Merge #913's final head into claude/issue-629-swedish-seed
claude Nov 16, 2026
baefdf4
Merge main: #913 landed as 271e16d, same tree as its head
claude Nov 16, 2026
01f9d2b
Merge #914's final head into claude/issue-630-edit-page-locale
claude Nov 16, 2026
6a7d27e
Merge main: #914 landed as 9324bc0, same tree as its head
claude Nov 16, 2026
e97074e
Merge #915's final head into claude/issue-630-edit-page-text
claude Nov 16, 2026
b961f87
Merge main: #915 landed as c5ac17a, same tree as its head
claude Nov 16, 2026
54f38b7
Merge #916's final head into claude/issue-631-error-reasons
claude Nov 16, 2026
f58589b
Merge main: #916 landed as d492687, same tree as its head
claude Nov 16, 2026
4814f8b
Merge #917's final head into claude/issue-631-client-error-text
claude Nov 16, 2026
997b554
Merge main: #917 landed as fe30dcb, same tree as its head
claude Nov 16, 2026
17e294e
Merge #918's final head into claude/issue-632-email-subjects
claude Nov 16, 2026
278fd84
Merge main: #918 landed as 00c230a, same tree as its head
claude Nov 16, 2026
14aa4e4
Merge #919's final head into claude/issue-632-email-templates
claude Nov 16, 2026
9ffaccc
Merge main: #919 landed as 471b451, same tree as its head
claude Nov 16, 2026
eddba5d
Merge #920's final head into claude/issue-633-calendar-share-text
claude Nov 16, 2026
0c82935
Merge main: #920 landed as 809b797, same tree as its head
claude Nov 16, 2026
49229ce
Merge #921's final head into claude/issue-633-calendar-file-name
claude Nov 16, 2026
0861a72
Merge main: #921 landed as 360d235, same tree as its head
claude Nov 16, 2026
ce1f313
Merge #925's final head into claude/issue-634-default-columns
claude Nov 16, 2026
6395824
Merge main: #925 landed as 2035f0e, same tree as its head
claude Nov 16, 2026
9583463
Merge #926's final head into claude/issue-635-prompt-language
claude Nov 16, 2026
472332c
Merge main: #926 landed as 75488be, same tree as its head
claude Nov 16, 2026
2072f84
Merge main into claude/issue-635-prompt-language
claude Nov 16, 2026
abbcc46
Merge #927's final head into claude/issue-637-translating-guide
claude Nov 16, 2026
297c5a0
Merge main: #927 landed as 48d501b, same tree as its head
claude Nov 16, 2026
50cf7b3
Merge #929's final head into claude/issue-637-stale-check
claude Nov 16, 2026
a6b6852
Merge main: #929 landed as 7e03236, same tree as its head
claude Nov 16, 2026
7c7c4dc
Merge #930's final head into claude/issue-639-post-save-prompts
claude Nov 16, 2026
d7dd6e5
Merge main: #930 landed as d4f02b8, same tree as its head
claude Nov 16, 2026
d577fa2
Merge main into claude/issue-639-post-save-prompts
claude Nov 16, 2026
e820aa5
Merge #933's final head into claude/issue-627-stored-language
claude Nov 16, 2026
facdcd9
Merge main: #933 landed as fbd0277, same tree as its head
claude Nov 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ OAUTH_STATIC_CLIENTS=
# error. So leave it blank for now. Once a language has shipped (the
# CHANGELOG will say when), setting it switches every signup without a
# language of its own (every signup made before signups had one) to it at
# once, sv set early included; left blank, each organizer will get their own
# browser's language.
# once, sv set early included, and every organizer whose account stores no
# language; while it's set, new accounts store none. Left blank, a new account
# stores its browser's top language if it has shipped and isn't English, and
# the rest get English (docs/translating.md, "An organizer's language").
# Read when the app starts, so changing it needs a restart, not a rebuild.
DEFAULT_LOCALE=

Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ All notable changes to OpenSignup are documented here. Format follows [Keep a Ch
- `DEFAULT_LOCALE`, an optional setting for the instance's language (#625), for an instance that serves one language community. Today it accepts `en` and `sv`, and neither changes anything, since English is the only language shipped so far: Swedish is being translated, and until it ships, `sv` leaves every page in English. Any other value stops the app like any other bad setting: the reminder worker exits at startup, and every page that needs the database fails, both with an "Invalid environment" error. A language becomes valid once its translation has begun, and takes effect once it ships. Then every signup without a language of its own follows the setting (today that is every signup), so `sv` set now switches them all to Swedish with the upgrade that ships it; left unset, each organizer's own language will apply. It's read when the app starts, not built in: "Branding your instance" in the README says where it goes on each platform. Signups can now hold a language too, in `settings.locale`: `POST /api/signups` and `PATCH /api/signups/[id]` take one that has shipped to participants (only `en` so far), refuse any other with `invalid_input` on `settings.locale`, and clear it on `null`. A language stored earlier that has since stopped shipping doesn't stop other changes to the signup. The signup's page, its sign-up sheet (with the description in the calendar file it saves and the text it gives the phone's share menu), the pages for changing or cancelling a spot and for turning reminders off, and the page a broken edit link shows, show their dates and wording in it, the footer aside (a page for a signup that doesn't exist, or was deleted, is in the instance's language); its participants' emails (the confirmation, the reminder and the email about a moved slot) are written in it too, subject line, slot dates and times included, the "OpenSignup" at their head aside, and their `<html lang>` names it. The AI connector's `get_signup`, and the results of `create_signup` (which takes one too, below) and `update_signup`, show it as saved, and `update_signup` takes one as the REST API does: refused with `invalid_input` on `settings.locale` unless it has shipped, cleared on `null`. `GET /api/public/signups/[slug]` gains `settings.locale`, the language the signup's page is in, so API clients can mark its content: the signup's own once that has shipped to participants, else the instance's (`en` today, whatever is stored).
- A place for each organizer's own language (#626): migration `0015` adds `organizers.locale`, an empty, nullable text column. Nothing sets it yet, and nothing anyone sees follows it. It's read with the rest of the organizer's account, on each of their pages and each request from their AI assistant, in the query that already ran there, so neither sends another statement to the database. A stored value is passed along as it is, so one that names no language can't stop anyone signing in.
- The privacy page now lists, among what an organizer's account holds, the language they choose for their new signups (#626). Account Settings has a "Language for new signups" choice for it, which appears only once a second language has shipped to participants and offers only those, so it isn't there yet. New signups don't follow it yet either.
- New signups start in their organizer's language (#627), once there's a choice: made by `POST /api/signups`, the New signup form or Magic Compose, a signup takes the organizer's saved language, else the instance's `DEFAULT_LOCALE`, else the top language their browser asks for, else English, each only if it has shipped to participants. While only English has shipped, which is today, they store no language, as before, so nothing changes yet. A `settings.locale` sent to `POST /api/signups` still wins, and is still refused unless it has shipped. Changing the organizer's language later doesn't move signups already made. `signup.created` activity rows for a signup created with a language gain `locale` and `localeSource` (`setting`, `instance`, `browser`, `api` or `default`), and the privacy page's activity-log paragraph says so. The AI connector's `create_signup` follows the same rule, without the browser step (an assistant's browser language is its vendor's, not the organizer's), and takes an optional `locale`, which wins over the organizer's and is recorded as `api`; one that hasn't shipped to participants (anything but `en` so far) is refused with `invalid_input` on `locale`, naming the ones that have, before anything is created or counted against the hourly create limit.
- New signups start in their organizer's language (#627), once there's a choice: made by `POST /api/signups`, the New signup form or Magic Compose, a signup takes the language stored on the organizer's account, else the instance's `DEFAULT_LOCALE`, else English, each only if it has shipped to participants. While only English has shipped, which is today, they store no language, as before, so nothing changes yet. A `settings.locale` sent to `POST /api/signups` still wins, and is still refused unless it has shipped. Changing the organizer's language later doesn't move signups already made. `signup.created` activity rows for a signup created with a language gain `locale` and `localeSource` (`setting`, `instance`, `api` or `default`), and the privacy page's activity-log paragraph says so. The AI connector's `create_signup` follows the same rule, and takes an optional `locale`, which wins over the organizer's and is recorded as `api`; one that hasn't shipped to participants (anything but `en` so far) is refused with `invalid_input` on `locale`, naming the ones that have, before anything is created or counted against the hourly create limit.
- An organizer's language is stored once, when their account is created (#627), and the site default wins: on an instance that sets `DEFAULT_LOCALE` nothing is stored and the account follows it; otherwise the top language of the browser they sign up in is stored if it has shipped to participants and isn't English, whether they sign in with the magic link, the six-digit code or a sign-in provider such as Google. Otherwise none is stored, and they get the instance's `DEFAULT_LOCALE`, else English, as accounts made before this do, so setting or changing `DEFAULT_LOCALE` later moves every account with none. `docs/translating.md` has a table of every case, which the tests run. Nothing works a language out from the browser again: a later sign-in leaves the stored one as it is, and only the organizer changes it, in account Settings. Their new signups, Magic Compose's drafts and the Settings choice all follow it. The account-creation activity row (`workspace.created`) records it as `locale`, and the privacy page says so. While only English has shipped, which is today, nothing is stored, so nothing changes.
- A button in account Settings that switches the organizer's open signups to their language (#639): under "Language for new signups", "Switch your 3 open signups to Svenska" ("signup" for one) shows while some of their open signups are in another language. It switches the signups they made themselves that are open now, in workspaces where they can edit; drafts, closed and archived signups, other members' signups, and those in a workspace the organizer only views stay as they are. Each signup it changes gets the `signup.updated` activity row a save on its Settings tab writes, and the page then says how many of the organizer's open signups use the language, "Saved. Your 3 open signups now use Svenska.", in the button's place. Nothing appears after a language is saved. Like the language choices, the button appears only once a second language has shipped to participants, so it isn't there yet.
- A new signup's two starting columns, "What" and "Date", are named in the signup's language (#634), as are the names the Build tab gives a field saved without one ("Untitled") and a new list's first option ("Option 1"): participants read all four. The columns' refs stay `what` and `date` in every language. Signups made by Magic Compose or an AI assistant don't start from these columns, so they're unaffected. While only English has shipped, nothing changes. The Build tab also sorts its group headings in the signup's alphabetical order. It used to sort them in the server's language and again in the browser's, so where the two disagree (Swedish puts Å, Ä and Ö after Z) the browser redrew the list and logged an error.
- An organizer who opens their own signup's public link now sees a strip across the top of the page (#647), styled like the organizer app's header and above the brand mark, outside the page's content: "**Your signup.** Only organizers see this bar.", with **See responses** and **Edit signup**, which go to the signup's Responses and Build tabs. Screen readers meet it as an "Organizer" navigation landmark. It shows on an open or closed signup to any member of the signup's workspace, viewers included, who is signed in on that browser. Participants see no change, and neither does an organizer from another workspace. The page now reads the organizer's session; a visitor with no session cookie still costs it nothing, since Auth.js answers without the database, and a signed-in organizer's visit sends two more statements (the session and their workspaces), which `budgets.json` pins as its own case.
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Helpers used by every service:

### Auth

`src/auth/config.ts` — Auth.js v5 with magic-link provider. `src/auth/adapter.ts` — custom Drizzle adapter that, on first login, creates an Organizer + personal Workspace + owner Member in one transaction. Magic-link emails go through our `EmailTransport` (not Auth.js's nodemailer) so there is one email pipeline. `src/auth/session.ts` builds the `Actor` consumed by the policy module. A signed-out visit to an organizer page redirects to `/login` with that page (path and query) as `callbackUrl`: `src/middleware.ts`, the only middleware, copies the `/app` request path into `ORGANIZER_CALLBACK_HEADER`, and `requireOrganizerSession` turns it into the redirect. Every organizer page and server action calls `requireOrganizerSession` itself rather than trusting the `(chrome)` layout's check, because a client-side navigation re-renders the page but not the layout. The magic-link email also carries a six-digit code (`src/auth/login-code.ts`: email-keyed HMAC, callback URL encrypted at rest, single use, rate-limited) so sign-in can finish in the window that requested it; redemption hands the callback URL back to the client for a top-level navigation — a server-action `redirect()` to it would lose Auth.js's cookie. `/login` and `/login/check` poll `/api/auth/session` and move on once a session exists.
`src/auth/config.ts` — Auth.js v5 with magic-link provider. `src/auth/adapter.ts` — custom Drizzle adapter that, on first login, creates an Organizer + personal Workspace + owner Member in one transaction. That's also the one place an organizer's language is set without them (`newOrganizerLocale`): none while `DEFAULT_LOCALE` is set (the site default wins), else the top `Accept-Language` language of the callback request (read like the IP, in `src/auth/request-context.ts`) if it has shipped to participants and isn't English, else none; the table in `docs/translating.md` is tested row by row. Nothing reads the browser's language again; pages, actions and MCP all take the stored one, else `DEFAULT_LOCALE`, else English (`getOrganizerLocale`). Magic-link emails go through our `EmailTransport` (not Auth.js's nodemailer) so there is one email pipeline. `src/auth/session.ts` builds the `Actor` consumed by the policy module. A signed-out visit to an organizer page redirects to `/login` with that page (path and query) as `callbackUrl`: `src/middleware.ts`, the only middleware, copies the `/app` request path into `ORGANIZER_CALLBACK_HEADER`, and `requireOrganizerSession` turns it into the redirect. Every organizer page and server action calls `requireOrganizerSession` itself rather than trusting the `(chrome)` layout's check, because a client-side navigation re-renders the page but not the layout. The magic-link email also carries a six-digit code (`src/auth/login-code.ts`: email-keyed HMAC, callback URL encrypted at rest, single use, rate-limited) so sign-in can finish in the window that requested it; redemption hands the callback URL back to the client for a top-level navigation — a server-action `redirect()` to it would lose Auth.js's cookie. `/login` and `/login/check` poll `/api/auth/session` and move on once a session exists.

### OAuth authorization server (AI connectors)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ These values are built into the app, so they must be set when you build it. Sett
- **Fly.io**: copy the template (`cp fly.example.toml fly.toml`) and set your values under `[build.args]`. Git ignores `fly.toml`, so your settings stay out of the repository. `fly secrets` only apply when the app starts, so they do not work here.
- **Local development** (`pnpm dev`): put them in `.env.local`. Next.js reads it each time it starts.

`DEFAULT_LOCALE` sets your instance's language, for an instance that serves one language community. Today it accepts `en` and `sv`, and neither changes anything, because English is the only language OpenSignup has shipped: Swedish is being translated, and until it ships, `sv` leaves every page in English. Any other value stops the app: the reminder worker exits at startup, and every page that needs the database fails with an "Invalid environment" error. So leave it unset for now. Once a language has shipped (the CHANGELOG will say when), setting it switches every signup that has no language of its own to that language at once, and that includes every signup made before signups had a language. That holds for `sv` set early too: the upgrade that ships Swedish switches them. Left unset, each organizer will get the language of their own browser.
`DEFAULT_LOCALE` sets your instance's language, for an instance that serves one language community. Today it accepts `en` and `sv`, and neither changes anything, because English is the only language OpenSignup has shipped: Swedish is being translated, and until it ships, `sv` leaves every page in English. Any other value stops the app: the reminder worker exits at startup, and every page that needs the database fails with an "Invalid environment" error. So leave it unset for now. Once a language has shipped (the CHANGELOG will say when), setting it switches every signup that has no language of its own to that language at once, and that includes every signup made before signups had a language. That holds for `sv` set early too: the upgrade that ships Swedish switches them. It's also the language of every organizer whose account stores none, and while it's set a new account stores none, so every organizer follows it until they choose another language in account Settings. Left unset, a new account stores its browser's top language if it has shipped and isn't English, and organizers with none stored get English. The table in [docs/translating.md](docs/translating.md#an-organizers-language) shows each case.

Unlike the values above, `DEFAULT_LOCALE` is read when the app starts, so changing it needs a restart, not a rebuild:

Expand Down
6 changes: 4 additions & 2 deletions docs/connect-ai-assistant.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ the browser:
in the same workspace can. It starts in your language for new signups, as
one you make in the browser does, unless the assistant names a language
OpenSignup offers for signups (only English so far). Your language is the
one you saved, else your site's default, else English: an assistant can't
pass on the language your browser asks for.
one stored on your account (the one you chose in Settings, or, on a site
with no default language, your browser's language when you created the
account, if OpenSignup offers it and it isn't English), else your site's
default, else English.
- **Change** a signup: title, description, tags, closing time, fields, slots,
and its settings: whether people must give an email address, whether
reminders go out, how slots are grouped, how many hours before its start a
Expand Down
Loading
Loading