Public signup pages always say lang="en", whatever the signup's language
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- next.js, react, typescript
- Ambito
- accessibility, backend, frontend, internationalization, testing
Direzione di ricerca
Read src/services/signups.ts, src/services/signups.cached.ts, and the signup layout and page files named in the issue; check prerequisites #621 and #625 first. Trace how the row is loaded and how locale reaches metadata and the preview, then run the query-budget test and the named unit, database, and accessibility checks. Done means Swedish renders lang="sv" and sv_SE, English remains unchanged, and the public page stays within five statements.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Needs your OK: this marks a signup's pages, and its organizer preview, with the signup's language, for screen readers and link previews. Until Swedish ships every signup is English, so nothing changes yet. Swap pipeline:proposed for pipeline:ready to have it built.
What happens
After #621 the participant pages have their own root layout, but it still says lang="en". Screen readers read Swedish content with English pronunciation, and browsers offer to translate it "from English".
Fix, in outline
- One cached read, shared by the layout and the page.
- Split a pure
getSignupRowBySlug(db, slug)(one statement, skipping deleted rows) out ofgetPublicSignupinsrc/services/signups.ts. - Have
getPublicSignupaccept the row it already read rather than reading it again. It's also called with a rawdbby/api/public/signups/[slug]. - Its
cache()wrapper,loadSignupRowBySlug, lives insrc/services/signups.cached.ts. - Both the layout and
loadPublicSignupgo through it, so React dedupes it within a request andGET /s/[slug]stays at 5 statements.
- Split a pure
- The layout sets
<html lang>and next-intl's request language from the signup:resolveLocale(settings.locale, defaultFor('participant', instanceDefaultLocale()))(#625). An unknown or deleted slug gets the default. - Every page passes its own language too. A soft navigation renders a page without its layout; the "Edit" links on the signup page are
<Link>s. - Not-found pages get no params. The middleware (
src/middleware.ts) copies/s/:path*paths into the request header it already sets for/app.src/i18n/request.tsthen resolves the slug's language from it, or the participant default when there's no live signup. og:locale. Set it in the page's owngenerateMetadataopenGraph, because Next replaces a parent'sopenGraphper segment. Set it in the layout's for the edit and unsubscribe pages, which set none.- The organizer's Preview (
src/app/app/signups/[id]/preview/page.tsx) wraps the participant view inlang={signupLocale}.
Watch for
- The query-budget test (
src/app/query-budget.db.test.ts) callsPublicSignupPage()directly under vitest, wherecache()does nothing and there's no layout. Keep it counting the page alone, with a comment saying why. Add a unit test (a spy) thatloadPublicSignupgets its row throughloadSignupRowBySlug, so a second read can't creep back. - The edit and unsubscribe pages load by token, so the layout's read is one extra statement there. They have no statement budget.
- A deleted signup is gone to every service (CLAUDE.md), so the new read must skip deleted rows.
- The middleware change goes to the owner as high risk.
Order
After #621 and #625: the layout comes from #621, and the signup's language and defaultFor from #625.
Done when
- A signup with
settings.locale = 'sv'(set directly in a test) renderslang="sv"andog:localesv_SE, and an English signup is unchanged. GET /s/[slug]stays within its 5-statement budget, and the spy test passes.pnpm lint && pnpm typecheck && pnpm knip && pnpm test,pnpm test:dband the a11y e2e spec pass.
Planned with the owner in https://claude.ai/code/session_01EFKmj716ZY3b3SwR8TV8Y2 and checked against the code on main at 35288fa. The full plan is private to the owner's account: https://claude.ai/artifact/VgQH6U2s2EVx3LX991fJi8 (a Claude session on that account can open it with the Artifact tool's read action). This is part of step 1.1 there.
- Lingua principale
- TypeScript
- Stelle
- 19
- Fork
- 4
- Merge medio
- 22h 46m
- PR unite (30g)
- 170
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di richshaw/OpenSignup
-
bug pipeline:proposed pipeline:ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
richshaw/OpenSignup#711 ·
I maintainer di solito rispondono entro 1 giorno
-
Participant name and notes limits are typed twice, in the schemas and on the participant pagesForse già presa @bfs2021 l’ha presa 2 giorni fa. Apertaenhancement good first issue pipeline:ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
richshaw/OpenSignup#705 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement pipeline:proposed pipeline:ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
richshaw/OpenSignup#654 ·
I maintainer di solito rispondono entro 1 giorno
-
The "what people see" picture on the Close or reopen a signup help page is too small to read on a phoneForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaenhancement pipeline:proposed pipeline:ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
richshaw/OpenSignup#652 ·
I maintainer di solito rispondono entro 1 giorno
-
On a phone, a signup's page has two links called "Settings" that go to different placesForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaenhancement pipeline:proposed pipeline:ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
richshaw/OpenSignup#589 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di richshaw/OpenSignup
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
components-web-app/docs#307 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
localstack/localstack-mcp-server#112 ·
I maintainer di solito rispondono entro 1 giorno
-
area:frontend kind:bug priority:p1 ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
bug ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
PhyberApex/kuroshiro#1687 ·
I maintainer di solito rispondono entro 1 giorno
-
Performance (Web Vitals) collector: LCP/FCP from background tabs are not discarded, inflating p75Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
umami-software/umami#4720 ·
I maintainer di solito rispondono entro 3 giorni