deepseek-harness/apps/web
creatixchu cb754a0319 feat(locale): derive the initial Settings language from the browser
A first visit resolved to Chinese regardless of the browser: LocaleService
read `dsh.locale` and fell straight back to `zh` when nothing was stored,
ignoring the languages the browser already states it reads.

The initial locale now resolves through three ordered sources — the persisted
preference, then `navigator` (first entry of the ordered language list whose
primary subtag names a shipped locale, so `zh-Hans-CN` -> zh and `en-GB` ->
en), then `FALLBACK_LOCALE`. An explicit choice still wins and nothing writes
the detected locale back to storage, so "has the user chosen?" stays a
question only the stored value answers.

Specs asserting the shipped Chinese copy now state the browser they assume:
the web e2e scenarios open their page with `locale: ZH_BROWSER_LOCALE`, and
package specs pin it through the new `pinBrowserLanguages` test helper.
`settings-chrome.e2e.ts` gains an English-browser scenario as the
assembled-app proof.
2026-07-31 15:26:46 +08:00
..
public feat(web): add favicon and update IconActions behavior 2026-07-30 19:59:16 +08:00
src Merge remote-tracking branch 'origin/master' into codex/trim-redundant-comments 2026-07-25 13:06:40 +08:00
tests feat(locale): derive the initial Settings language from the browser 2026-07-31 15:26:46 +08:00
index.html feat(web): add favicon and update IconActions behavior 2026-07-30 19:59:16 +08:00
package.json refactor(web): collapse the shell boot into the AppWebEntry class 2026-07-25 10:23:40 +08:00
tsconfig.json Merge remote-tracking branch 'origin/master' into worktree/composer-scroll-sync 2026-07-31 13:22:52 +08:00
vite.config.ts refactor(web): collapse the shell boot into the AppWebEntry class 2026-07-25 10:23:40 +08:00