Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Organizers have no saved language

Abierto
#626 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
next.js, typescript

Línea de trabajo

Start with #625 and the existing session flow in src/auth/organizer-session.ts, src/auth/bearer.ts, and src/mcp/context.ts; then read the locale helpers and Account Settings entry points named in the issue. Implement the stored locale, audience-filtered fallback order, and tests listed under “Done when,” including the database query check. Done means the listed lint, typecheck, knip, unit, and database commands pass.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement pipeline:proposed pipeline:ux

Needs your OK: this adds a language to each organizer's account, used for their new signups now and for the app itself later. Nothing shows until Swedish ships; the privacy page says we store it. Swap pipeline:proposed for pipeline:ready to have it built.

What happens

New signups should start in their organizer's language (the next step in #619), and later the app should use it too. There's nowhere to keep it:

  • The browser's Accept-Language is a weak guess. Many Swedes run their phones in English.
  • AI assistants have no browser at all. They create signups through MCP.

Fix, in outline

  • organizers.locale: a nullable text column, added with a Drizzle migration. It's lenient like the signup's (#625).

  • getOrganizerLocale(session, acceptLanguage | null) in src/i18n/organizer.ts works out the effective language, in this order:

    1. the saved value;
    2. DEFAULT_LOCALE, when the operator set it (#625);
    3. on a browser request, the browser's top-ranked Accept-Language language, if it's shipped (only the top one: normal negotiation would match sv,en;q=0.8 to English);
    4. English.

    Each step is filtered by the audience's SHIPPED list.

  • No new query. OrganizerSession gains locale, selected in the query loadOrganizerSessionById already runs (src/auth/organizer-session.ts). It travels through getOrganizerSession() to routes, and through BearerResolution (src/auth/bearer.ts) into the MCP ToolContext (src/mcp/context.ts), because tool handlers may not query the database themselves.

  • MCP passes null for the browser. An assistant's Accept-Language is the vendor's, not the organizer's.

  • updateOrganizerLocale(db, actor, locale) lets an organizer change only their own. The value must be in SHIPPED.participant.

  • Account Settings gets "Language for new signups", rendered only when SHIPPED.participant has more than one entry.

  • The privacy page says we store the organizer's language setting, and its "Last updated" date moves.

Watch for

  • Keep it out of src/i18n/server.ts. The worker imports that file under tsx, and getOrganizerLocale may need next/headers.
  • Sign-in and bearer code go to the owner as high risk.
  • Tests that build OrganizerSession by hand gain the field: src/auth/bearer.test.ts, src/oauth/flow.db.test.ts and src/app/app/signups/[id]/preview/page.test.tsx.
  • The Auth.js adapter and the e2e seed's organizer insert are unaffected by a nullable column.

Choices this makes

  • Store it on the organizer, not in a cookie. Default: a column. It works without a browser, follows them across devices, and needs no cookies-page change.
  • One setting for new signups now and the app later. Default: one. Someone who wants the app in English but signups in Swedish changes each signup's language in its Settings tab; a second setting can come if people ask for it.
  • The order: saved → DEFAULT_LOCALE → the browser's first language → English.

Order

After #625, because defaultFor, DEFAULT_LOCALE and the lenient-language rule come from it.

Done when

  • Unit tests cover every step of the order, including MCP's null and a sv,en;q=0.8 browser before Swedish ships.
  • A db test shows loadOrganizerSessionById returns locale with no extra statement.
  • pnpm lint && pnpm typecheck && pnpm knip && pnpm test and pnpm test:db 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.

Lenguaje dominante
TypeScript
Estrellas
19
Forks
4
Merge medio
21 h 3 min
PR fusionados (30 d)
176

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de richshaw/OpenSignup

Todos los issues de richshaw/OpenSignup

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.