Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Public signup pages always say lang="en", whatever the signup's language

オープン
#628 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
next.js, react, typescript

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

enhancement pipeline:proposed pipeline:ux

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 of getPublicSignup in src/services/signups.ts.
    • Have getPublicSignup accept the row it already read rather than reading it again. It's also called with a raw db by /api/public/signups/[slug].
    • Its cache() wrapper, loadSignupRowBySlug, lives in src/services/signups.cached.ts.
    • Both the layout and loadPublicSignup go through it, so React dedupes it within a request and GET /s/[slug] stays at 5 statements.
  • 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.ts then 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 own generateMetadata openGraph, because Next replaces a parent's openGraph per 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 in lang={signupLocale}.

Watch for

  • The query-budget test (src/app/query-budget.db.test.ts) calls PublicSignupPage() directly under vitest, where cache() does nothing and there's no layout. Keep it counting the page alone, with a comment saying why. Add a unit test (a spy) that loadPublicSignup gets its row through loadSignupRowBySlug, 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) renders lang="sv" and og:locale sv_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:db and 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.

主要言語
TypeScript
スター
19
フォーク
4
平均マージ
20時間 9分
マージ済み PR(30日)
156

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

richshaw/OpenSignup のほかの issue

richshaw/OpenSignup の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。