Skip to content

fix(agora): correct language defaults - #1298

Merged
nicobao merged 1 commit into
zkorum:mainfrom
nicobao:hotfix/browser-language-defaults
Nov 8, 2026
Merged

nicobao merged 1 commit into
zkorum:mainfrom
nicobao:hotfix/browser-language-defaults

Conversation

@nicobao

@nicobao nicobao commented Nov 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Preserve saved display-language preferences. Prefer the Intl runtime locale for Chromium derivatives; prefer website-language settings for Firefox and Safari.
  • Fall back to validated, viewer-scoped backend conversation-language metadata, then English, without extra detection requests or polling.
  • Load application messages and Quasar packs together before rendering, with a shared 500 ms deadline and immediate English rendering fallback on error.
  • Perform one background recovery attempt per failed locale after mount, without a page reload, spinner, or retry loop. Ignore obsolete account, route, and language-selection work.
  • Keep preferred request/persisted languages separate from temporary English rendering fallback. Keep display-language and spoken-language updates independent, and never restore cleared account preferences because a resource fails.
  • Use matching Quasar packs, including zh-Hans → zh-CN, zh-Hant → zh-TW, and Russian Quasar controls for Kyrgyz while keeping the application locale ky.
  • Use typed query-key snapshots for conversation requests and discard aborted responses before redirects or cache writes. Remove i18n type suppressions, duplicated recovery/saving paths, and unused translations.

Validation

  • cd services/agora && pnpm test — 1,732 tests across 230 files passed.
  • cd services/agora && pnpm exec vue-tsc --noEmit — passed.
  • Targeted ESLint on changed frontend files — passed.
  • git diff --staged --check — passed.

Manual smoke checks

  • With no saved preference, check Brave/Chromium where website languages say English but the Intl locale is French; initial display should be French.
  • Confirm saved English still wins, and Firefox/Safari continue to prioritize website-language preferences.
  • Check French built-in Quasar controls, Chinese script mappings, Kyrgyz application text with Russian Quasar controls, and RTL languages.
  • Simulate a failing/slow language resource: rendering should fall back quickly, retain the preferred request language, and attempt recovery once in the background.

Operational notes

  • Based directly on main; unrelated pending work is excluded.
  • The SQL repair is intentionally not included. Any existing incorrect database preferences will be repaired manually as a separate operation.
  • Background resource recovery is best-effort; a chunk removed by deployment may still require a later manual reload.

Deploy: agora

Preserve saved display-language preferences, prefer the Intl runtime locale on Chromium derivatives, and retain navigator-language precedence on Firefox and Safari. Use validated, viewer-scoped conversation detection metadata as a last fallback before English without additional requests or polling.

Load app translations and matching Quasar language packs together before rendering, with one 500 ms deadline and immediate English rendering fallback on errors. Retry registered failures once per locale after mount without reloading or hiding the page. Keep preferred request and persisted languages separate from temporary rendering fallbacks, and reject stale account, navigation, and language-selection operations.

Use matching Quasar packs for supported languages, including Chinese script mappings and Russian controls for Kyrgyz while preserving the Kyrgyz application locale. Infer lazy i18n types without suppression comments, consolidate preference saving, remove obsolete error translations, and keep display/spoken preference updates independent.

Snapshot conversation request language and viewer identity from typed query keys, preserve explicit Accept-Language headers, and discard aborted responses before redirects or cache writes. Keep parsed backend preferences authoritative on resource failure and prevent failed resource loading from restoring cleared account preferences.

Add regression coverage for browser families, precedence, initial load deadlines, pack mappings, background recovery, account/navigation races, request snapshots, and cancellation. Verify 1,732 frontend tests, Vue/TypeScript checking, targeted ESLint, and diff whitespace checks.

Exclude the operational SQL repair; it will be run manually and is not part of this commit.

Deploy: agora
@netlify

netlify Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for agoracitizen canceled.

Name Link
🔨 Latest commit 331eb14
🔍 Latest deploy log https://app.netlify.com/projects/agoracitizen/deploys/6aefd71df0432a926e129671

@nicobao
nicobao merged commit ddd7947 into zkorum:main Nov 8, 2026
5 of 6 checks passed
@nicobao
nicobao deleted the hotfix/browser-language-defaults branch November 8, 2026 02:08
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.

1 participant