Language detection should prioritise a base language match over an exact match later in the order

Abierto
#937 1 comentario 0 reacciones 1 asignado Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
62/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

Start by tracing how browser language preferences are matched to the form's button language, especially when the form does not specify a language. Reproduce the case with only es-PA configured; the expected result is Spanish buttons rather than English. The issue does not name a file or test, so locate the language-detection entry point and its related tests before making changes.

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

Descripción

Expected Behaviour

Users can configure multiple languages in the browser in the order of preference. These include specific language, such as 'es-PA' for Spanish spoken in Panama. If the user specifies 'es-PA' and the form doesn't define a language, then the form buttons should be in Spanish.

Observed Behaviour

The form buttons are in English.

Reproduction Steps

Steps:

  1. Configure the browser to use 'es-PA' and nothing else
  2. Load a form which doesn't specify a language
Additional Context

Reported on the forum with additional use cases: https://forum.getodk.org/t/web-forms-1-1-1-six-issues-ui-language-fallback-title-wrapping-guidance-hints-region-names-contrast-select-one-external/58660

Lenguaje dominante
TypeScript
Estrellas
38
Forks
24
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

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 getodk/web-forms

Todos los issues de getodk/web-forms

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.