feat: default all users to English, make locale opt-in#29
Merged
Conversation
Drop browser locale auto-detection from i18n. Everyone now defaults to English; Simplified/Traditional Chinese are opt-in via the options page. - Remove the "auto" / "Follow browser" preference and resolveAuto() (chrome.i18n.getUILanguage probing) - LocalePref is now "en" | "zh_CN" | "zh_TW"; add DEFAULT_LOCALE = "en" - normalize() folds any legacy/unknown stored value (incl. "auto") to English, so existing "Follow browser" users degrade gracefully - Drop the now-unused langFollowBrowser message from all catalogs - Test the legacy "auto" fallback Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Established GitHub UI terms shouldn't be localized — they should match GitHub's own English labels next to them. Revert these to English in both zh_CN and zh_TW: - Releases (repo nav tab + feature name) - Watchers / Forks / Stargazers (Watch/Fork/Star popup headings, empty states) - Commits / Commit (group header, feature names, descriptions) - Tag/Tags (commit tag badge title, commit-tags description) Surrounding prose stays Chinese (e.g. "Releases 标签页", "暂无 Watchers"). Update the commitTagTitle test assertion to "Tag: v1.0.0". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Changes the i18n default so everyone gets English out of the box. Browser-locale auto-detection is removed — Simplified / Traditional Chinese are now strictly opt-in via the options page.
Why
The "Follow browser" default meant users with a Chinese browser UI silently saw a translated extension. We want a predictable English baseline and let users actively choose another language.
Changes
"auto"/ Follow browser preference andresolveAuto()(thechrome.i18n.getUILanguage()probing).LocalePrefis now"en" | "zh_CN" | "zh_TW"; addDEFAULT_LOCALE = "en".normalize()folds any legacy/unknown stored value (including a previously-saved"auto") to English — existing "Follow browser" users degrade gracefully.langFollowBrowsermessage from all three catalogs and the picker option inoptions.html.langFollowBrowserassertion, add coverage for the legacy"auto"→ English fallback.Compatibility
zh_CN/zh_TW).auto), now see English.Verification
pnpm test→ 189 passedpnpm build→ clean🤖 Generated with Claude Code