A signup has no language, and an instance has no default language
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- next.js, typescript
調査の方向性
Start with src/i18n/config.ts, src/lib/env.ts, and src/schemas/signups.ts, then follow how signup settings are parsed and how toPublicSignup exposes fields. Check the Settings tab, MCP registry snapshots, and the listed docs and changelog. Done means the language setting and fallback behavior match the stated rules, tests cover the cases in the issue, and the listed checks pass.
索引モデルが issue の本文から書いたものです。
説明
Needs your OK: this stores a language on each signup and adds an optional DEFAULT_LOCALE setting for operators. Nothing shows in the app until Swedish ships (the launch step in #619). The MCP update_signup description and the public signup API gain a locale. Swap pipeline:proposed for pipeline:ready to have it built.
What happens
Nothing records which language a signup is written in, so its pages and emails can't follow it. An operator who runs OpenSignup for one language community, a Swedish school for example, has no way to say so.
Fix, in outline
settings.localeinSignupSettingsSchema(src/schemas/signups.ts), stored asz.string().max(35).optional(). It's lenient on purpose: an unknown stored value must not make the whole settings object fail to parse, which would breakrequiresEmail,sendsReminders, the Build tab'sparseand every later update.- Validate only a value the caller sent.
createSignupandupdateSignupreject a language outsideSHIPPED.participantwithinvalid_input.updateSignupmerges the stored settings under the patch before parsing, so checking the merged object would make every unrelated save fail on a signup whose stored language has since left the list. It's the same trapsentGroupByalready avoids. - Read it with
resolveLocale(value, fallback), pure, insrc/i18n/config.ts: the value if it's inCATALOG_LOCALES, else the fallback. DEFAULT_LOCALE, an optional runtime variable insrc/lib/env.ts(z.enum(CATALOG_LOCALES).optional(); a bad value fails at startup like any env error). When set, it's the instance's language.defaultFor(audience, instanceDefault), pure, inconfig.ts: the instance's language when it's set and in that audience'sSHIPPEDlist, else'en', so an operator who setssvearly doesn't get half-translated pages. OnlyinstanceDefaultLocale()insrc/i18n/server.tscallsgetEnv().- A "Signup language" control in the signup's Settings tab: a plain form like "Ask for an email address", with no client JS, rendered only when
SHIPPED.participanthas more than one entry. So nothing shows yet. - API and MCP.
- Add
localetotoPublicSignup's allow-list (src/app/s/[slug]/public-signup.ts), so API clients can mark the content's language. update_signupgets the setting automatically, since its settings schema derives fromSignupSettingsSchema. Add a.describe()listing the allowed values, and update the registry snapshots.
- Add
- Docs.
- An
.env.exampleentry. - A line in the README's "Branding your instance": set it when the instance serves one language community, and leave it unset to follow each organizer's browser.
- Where a runtime variable goes on each platform:
.envfor Docker Compose,[env]orfly secretson Fly. - Say plainly that setting it also switches every signup that has no language of its own (all signups made before this work) to that language at once.
- An
Watch for
- Keep
config.tspure.env.tsimportsCATALOG_LOCALESfrom it, so the reverse import would be a cycle, and unit tests don't setDATABASE_URL. - It's not a build argument. Nothing statically prerendered needs it, so it needs no
NEXT_PUBLIC_prefix and noDockerfilewiring. - Check
docs/connect-ai-assistant.mdif it lists settings, and add a CHANGELOG entry.
Choices this makes
- Store it in
settings(jsonb). Default: yes. No migration, no new query. DEFAULT_LOCALEis optional, and when set it comes before the browser's guess for organizers (the next step). Default: yes, so a self-hosted Swedish school is Swedish whatever its organizers' phones say. opensignup.org leaves it unset.
Order
After #620, because CATALOG_LOCALES and SHIPPED come from it.
Done when
- Tests: a sent unknown language is refused; a stored unknown language doesn't break
requiresEmail,sendsRemindersor an unrelated settings save;resolveLocaleanddefaultForcases. - The Settings control renders when
SHIPPED.participanthas two entries (a test) and not otherwise. pnpm lint && pnpm typecheck && pnpm knip && pnpm testandpnpm test:dbpass.
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
- 平均マージ
- 19時間 34分
- マージ済み PR(30日)
- 165
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
richshaw/OpenSignup のほかの issue
-
enhancement pipeline:proposed pipeline:ux
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
richshaw/OpenSignup#654 ·
メンテナーはふだん 1 日以内に返信
-
enhancement pipeline:proposed pipeline:ux
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
richshaw/OpenSignup#653 ·
メンテナーはふだん 1 日以内に返信
-
enhancement pipeline:proposed pipeline:ux
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
richshaw/OpenSignup#652 ·
メンテナーはふだん 1 日以内に返信
-
SMTP timeout notes in smtp.ts and the changelog describe nodemailer 10.0, not 10.1対応中かも @agammann が 1 日前に担当しました。 オープンenhancement good first issue pipeline:ready
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
richshaw/OpenSignup#645 ·
メンテナーはふだん 1 日以内に返信
-
A signup page's first Tab skips the header and lands on the next tab対応中かも @richshaw が今日担当しました。 オープンbug good first issue pipeline:building pipeline:ux
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
richshaw/OpenSignup#644 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
richshaw/OpenSignup の issue をすべて見る
似ている issue
-
e2e-failure ready-to-code
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
redhat-developer/rhdh-plugin-export-overlays#4580 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
devdotfast/whiteboard#1415 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area/sessions comp/desktop desktop/sessions P2 type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
NousResearch/hermes-agent#145383 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
enhancement p2 setup
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信