fix: opt out of browser auto-translation

The app ships its own 7-language i18n and serves localized content, but mobile
browsers (Google Translate) were auto-translating the Chinese UI into broken
English (brand, nav, language dropdown). Add translate="no" + the Google
notranslate meta, and keep the attribute set on language changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
TerryM
2026-06-02 10:47:36 +08:00
parent 5a5acfcbc2
commit 8acb3a281b
2 changed files with 6 additions and 1 deletions

View File

@@ -153,6 +153,8 @@ export function DocumentMeta() {
const canonical = `${window.location.origin}${pathname}${search}`;
document.documentElement.lang = lang;
// Keep browser auto-translation off — the app is already fully localized.
document.documentElement.setAttribute("translate", "no");
document.title = title;
setMeta('meta[name="description"]', "name", "description").content =