Skip to content

fix(app): respect navigator.languages priority for locale (#9996)#9998

Open
jaydenireland wants to merge 1 commit intoanomalyco:devfrom
jaydenireland:fix/app-locale-detection-9996
Open

fix(app): respect navigator.languages priority for locale (#9996)#9998
jaydenireland wants to merge 1 commit intoanomalyco:devfrom
jaydenireland:fix/app-locale-detection-9996

Conversation

@jaydenireland
Copy link

What does this PR do?

Resolves #9996. English locale detection in the web UI could fall through to a later supported locale (ru/fr/etc) even when navigator.languages prefers en*, because en was not explicitly matched.

How did you verify your code works?

Verification:

  • Started API server: bun dev serve
  • Started app dev server: bun run --cwd packages/app dev
  • Confirmed navigator.languages like ['en-US','en-GB','nl','fr'] resolves to English.
  • Manually tested in Chrome 143.0.7499.194, Safari 26.2, and Firefox 148.0b2.

@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@andybergon
Copy link

This fixes the web app but the same bug exists in packages/desktop/src/i18n/index.ts — the desktop app's detectLocale() is also missing the en check. See #12064 which fixes both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web UI locale detection can pick a non-English locale even when English is preferred

2 participants