Skip to content

fix(i18n): route desktop fallback copy through catalog - #61970

Open
DrMaks22 wants to merge 2 commits into
NousResearch:mainfrom
DrMaks22:codex/desktop-i18n-surface-copy
Open

fix(i18n): route desktop fallback copy through catalog#61970
DrMaks22 wants to merge 2 commits into
NousResearch:mainfrom
DrMaks22:codex/desktop-i18n-surface-copy

Conversation

@DrMaks22

Copy link
Copy Markdown

Summary

  • route the Desktop intro fallback copy through the existing i18n catalog instead of hardcoded English in intro.tsx
  • move the Mixture of Agents settings copy and stale auxiliary-model warning into settings.model
  • add typed English source strings plus zh catalog entries for the newly exposed keys

Why

This follow-up came from the RU Desktop localization QA in #46634. The remaining English screenshots were not only missing Russian copy: some strings were still hardcoded in components, so they need a small shared catalog/component change before any locale can translate them cleanly.

Keeping this separate lets #46634 stay focused on adding the Russian locale, while this PR handles the cross-locale Desktop i18n surface.

Validation

  • git diff --check
  • npm install --workspace apps/desktop
  • npm run typecheck --workspace apps/desktop
  • npm run test:ui --workspace apps/desktop -- src/i18n/languages.test.ts src/i18n/runtime.test.ts src/i18n/context.test.tsx src/components/language-switcher.test.tsx → 4 files / 22 tests passed

Related: #46634

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) labels Jul 10, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for splitting the shared Desktop i18n surface out of the Russian-locale work.

Problems

  • This changes catalog selection in apps/desktop/src/components/chat/intro.tsx and localized warning/MoA rendering in apps/desktop/src/app/settings/model-settings.tsx, but adds no regression tests. Existing intro coverage only checks layout clearance at apps/desktop/src/components/assistant-ui/thread/streaming.test.tsx:426-430; existing warning tests assert the English path at apps/desktop/src/app/settings/model-settings.test.tsx:151-180.

Suggested changes

  • Add a focused Intro i18n test and a ModelSettings test under I18nProvider with the zh locale, covering the catalog-backed fallback and stale-aux/MoA strings.

Automated hermes-sweeper review.

@DrMaks22

Copy link
Copy Markdown
Author

Thanks for the focused review. I added the requested regression coverage in commit 88704f8c2:

  • apps/desktop/src/components/chat/intro.test.tsx covers the Intro catalog fallback path under I18nProvider with the zh locale.
  • apps/desktop/src/app/settings/model-settings.test.tsx now wraps ModelSettings in a real QueryClientProvider harness and adds a zh I18nProvider case covering the localized stale-aux warning plus MoA preset/reference/aggregator strings.

Validation after the update:

  • git diff --check
  • npm run typecheck --workspace apps/desktop
  • npm run test:ui --workspace apps/desktop -- src/i18n/languages.test.ts src/i18n/runtime.test.ts src/i18n/context.test.tsx src/components/language-switcher.test.tsx src/components/chat/intro.test.tsx src/app/settings/model-settings.test.tsx -> 6 files / 31 tests passed

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 11, 2026
@DrMaks22
DrMaks22 force-pushed the codex/desktop-i18n-surface-copy branch from 88704f8 to 415cea9 Compare July 13, 2026 10:23
@DrMaks22

Copy link
Copy Markdown
Author

Updated this PR onto current main (head 415cea968) and resolved the i18n catalog conflict by preserving the newer upstream fallback-model keys while keeping the MoA / Intro / stale-aux strings catalog-backed.\n\nValidation on the refreshed branch:\n- git diff --check\n- npm run typecheck --workspace apps/desktop\n- npm run test:ui --workspace apps/desktop -- src/i18n/languages.test.ts src/i18n/runtime.test.ts src/i18n/context.test.tsx src/components/language-switcher.test.tsx src/components/chat/intro.test.tsx src/app/settings/model-settings.test.tsx -> 6 files / 31 tests passed\n\nThe PR remains scoped to the shared Desktop i18n surface and does not include the Russian locale itself.

@teknium1 teknium1 added the area/i18n Localization, locales, translations label Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/i18n Localization, locales, translations comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants