Skip to content

feat(i18n): migrate renderer strings to i18next + catalog fixes - #514

Open
roxi3906 wants to merge 1 commit into
aipoch:mainfrom
roxi3906:claude/magical-kare-96a630
Open

feat(i18n): migrate renderer strings to i18next + catalog fixes#514
roxi3906 wants to merge 1 commit into
aipoch:mainfrom
roxi3906:claude/magical-kare-96a630

Conversation

@roxi3906

Copy link
Copy Markdown
Contributor

Résumé

Full i18next migration of all hardcoded UI strings in the renderer across 6 namespaces: common, components, home, onboarding, settings, workspace.

New catalog keys

  • components.reviewer.reflaggedre-flagged ×{{count}} (was hardcoded in ReviewerCard, missed in original migration)
  • settings.model.list — 7 new keys for ProviderList strings that were never migrated: browserLoginHint, tokenPrefix, modelPrefix, keyPrefix, modelsCount (plural-aware), expiresLabel
  • settings.model.endpoint.speaksThe — tooltip/aria-label for endpoint protocol
  • All keys translated into zh-Hans and zh-Hant

Bug fixes

  • Curly apostrophe (U+2019) in en/settings.json browserLoginHint replaced with straight apostrophe (U+0027) — toContain in jsdom was failing silently on the mismatch

Simplifications

  • home-dialogs.render.test.tsx: replaced 26-line inline mock reimplementing translateForTest with a single createI18nTestStub() import from the shared test stub
  • provider-key-security.ts: removed ApiKeySecurityCopyKeys named union type (9 lines); TypeScript infers the return type from the as const branches
  • resources.test.ts: leafPaths now derived from leafValues instead of duplicating its traversal logic

Tests

7392 tests pass. The one failing file (kernel-executor.test.ts) is a pre-existing environmental issue unrelated to this PR.

🤖 Generated with Claude Code

@github-actions github-actions Bot added the enhancement New feature or request label Jul 30, 2026
@roxi3906
roxi3906 force-pushed the claude/magical-kare-96a630 branch 12 times, most recently from ca30962 to 4d5a900 Compare August 3, 2026 09:35
- Convert all hardcoded UI strings in components and pages to
  useTranslation() / t() across 6 namespaces: common, components,
  home, onboarding, settings, workspace
- Add missing ReviewerCard reflagged key (components.reviewer.reflagged)
- Add 8 missing ProviderList keys in settings.model.list/.endpoint
  (browserLoginHint, tokenPrefix, modelPrefix, keyPrefix, modelsCount,
  expiresLabel, endpoint.speaksThe) with en/zh-Hans/zh-Hant translations
- Fix curly-apostrophe in en/settings.json browserLoginHint (U+2019→U+0027)

Simplifications (ponytail-review follow-up):
- home-dialogs.render.test: replace 26-line inline mock with
  createI18nTestStub() from shared test stub
- provider-key-security: remove unnecessary ApiKeySecurityCopyKeys named
  union; TS infers from as-const branches
- resources.test: derive leafPaths from leafValues (-4 lines)

All 7392 tests pass (kernel-executor failures are pre-existing/environmental)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@roxi3906
roxi3906 force-pushed the claude/magical-kare-96a630 branch from 4d5a900 to e6efdb9 Compare August 3, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant