Skip to content

feat: default all users to English, make locale opt-in#29

Merged
rrbe merged 2 commits into
mainfrom
feat/default-english-locale
Jun 3, 2026
Merged

feat: default all users to English, make locale opt-in#29
rrbe merged 2 commits into
mainfrom
feat/default-english-locale

Conversation

@rrbe
Copy link
Copy Markdown
Owner

@rrbe rrbe commented Jun 3, 2026

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

  • Remove the "auto" / Follow browser preference and resolveAuto() (the chrome.i18n.getUILanguage() probing).
  • LocalePref is now "en" | "zh_CN" | "zh_TW"; add DEFAULT_LOCALE = "en".
  • normalize() folds any legacy/unknown stored value (including a previously-saved "auto") to English — existing "Follow browser" users degrade gracefully.
  • Drop the unused langFollowBrowser message from all three catalogs and the picker option in options.html.
  • Update tests: remove the langFollowBrowser assertion, add coverage for the legacy "auto" → English fallback.

Compatibility

  • Users who already picked 简体/繁體 keep their choice (stored zh_CN / zh_TW).
  • Users who never set a language, or who explicitly chose "Follow browser" (auto), now see English.

Verification

  • pnpm test → 189 passed
  • pnpm build → clean

🤖 Generated with Claude Code

rrbe and others added 2 commits June 3, 2026 20:43
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>
@rrbe rrbe merged commit fca2c64 into main Jun 3, 2026
1 check passed
@rrbe rrbe deleted the feat/default-english-locale branch June 3, 2026 13:46
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