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

Aperta
#937 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
38
Fork
24
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getodk/web-forms

Tutte le issue di getodk/web-forms

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.