Component: Language Suggestion Banner
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 56/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- nextjs, react, tailwindcss, typescript
- Área
- frontend, internationalization
Línea de trabajo
Read CONTRIBUTING.md and the Contributor Rulebook first, then inspect existing components in src/registry/components/, their exports in src/registry/components/index.ts, registry entries in src/registry/registry.ts, and related tests and docs. Implement the listed banner API and behaviors, following the project conventions. Add the requested tests in test/ and documentation under content/docs/components/language-switchers/; done means the component is registered, documented, and the listed matching, rendering, and dismissal cases are covered.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Component: Language Suggestion Banner
A slim banner that notices the visitor's browser prefers another language the site supports, and offers to switch: "This page is also available in Deutsch. Switch?"
Requirements
- TypeScript-first with exported props interface
- Reads
navigator.languageson the client and picks the first one that matcheslocales(match the primary subtag too, sode-AT→de) - Renders nothing when the best match is already the current locale, or when nothing matches
- Two actions: switch (calls
onSwitch(code)) and dismiss - Remembers a dismissal in
localStorageunder a configurablestorageKey, so it doesn't come back on every page - Banner text is passed in as props (no hardcoded English), with the suggested language's name shown in that language via
Intl.DisplayNames - No hydration mismatch: render
nulluntil mounted - Accessible:
role="region"with a label, buttons reachable by keyboard - Tailwind CSS compatible, follows the shadcn theme tokens
Expected API
<LanguageSuggestionBanner
locales={[{ code: "en" }, { code: "de" }, { code: "it" }]}
currentLocale="en"
onSwitch={(code) => router.push(`/${code}`)}
labels={{
message: (language) => `This page is also available in ${language}.`,
switch: "Switch",
dismiss: "Dismiss",
}}
/>
Deliverables
- Component source in
src/registry/components/ - Export in
src/registry/components/index.tsand entry insrc/registry/registry.ts - Tests in
test/covering: exact match, subtag match (de-AT), no match, already-current locale, dismissal persisted - Documentation page in
content/docs/components/language-switchers/
See CONTRIBUTING.md and the Contributor Rulebook.
- Lenguaje dominante
- TypeScript
- Estrellas
- 39
- Forks
- 16
- Merge medio
- 18 h 14 min
- PR fusionados (30 d)
- 35
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de babelize/babelize-elements
-
accessibility help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
babelize/babelize-elements#94 ·
Los mantenedores suelen responder en 1 día
-
component help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
babelize/babelize-elements#93 ·
Los mantenedores suelen responder en 1 día
-
Component: Relative TimeAbiertocomponent date-time good first issue
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
babelize/babelize-elements#92 ·
Los mantenedores suelen responder en 1 día
-
Component: Timezone PickerAbiertocomponent date-time good first issue
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
babelize/babelize-elements#91 ·
Los mantenedores suelen responder en 1 día
-
component enhancement help wanted
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
babelize/babelize-elements#47 ·
Los mantenedores suelen responder en 1 día
Todos los issues de babelize/babelize-elements
Issues similares
-
[fullsend] E2E: scorecard — filecheck GitLab entity metrics unavailable due to initialDelay timingAbiertoe2e-failure ready-to-code
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
redhat-developer/rhdh-plugin-export-overlays#4698 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
devswha/herdr-web-ui#2884 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
b:minor bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
software-mansion/argent#1771 ·
Los mantenedores suelen responder en 1 día
-
Resources: New palettes of XiamenPosiblemente ocupada @rmt-svc la tomó hoy. Abiertoresources
Dificultad 1/5 1-3 horas Aptitud para principiantes 74/100
railmapgen/rmg-palette#2491 ·
Los mantenedores suelen responder en 4 días