Skip to content

fix(i18n): complete Russian desktop fallback copy - #2

Open
DrMaks22 wants to merge 4 commits into
Anatoly17:feat/i18n-russian-localefrom
DrMaks22:codex/ru-desktop-fallback-polish
Open

fix(i18n): complete Russian desktop fallback copy#2
DrMaks22 wants to merge 4 commits into
Anatoly17:feat/i18n-russian-localefrom
DrMaks22:codex/ru-desktop-fallback-polish

Conversation

@DrMaks22

@DrMaks22 DrMaks22 commented Jul 9, 2026

Copy link
Copy Markdown

Summary

  • route the Desktop intro/welcome copy through the existing i18n catalog, with Russian copy for the standard personality modes and safe English fallback for other locales
  • fill the remaining visible Russian fallback gaps found during live Desktop QA: settings/sidebar/project actions, cron counters, context usage, preview save errors, assistant resume copy, and tool title templates
  • polish Russian wording to avoid machine-translation artifacts while preserving command names, provider names, tool ids, paths, and technical tokens where appropriate

Verification

  • 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
  • git diff --check -- apps/desktop/src/components/chat/intro.tsx apps/desktop/src/i18n/types.ts apps/desktop/src/i18n/index.ts apps/desktop/src/i18n/en.ts apps/desktop/src/i18n/ru.ts
  • live smoke-tested in a separate local Hermes RU Test.app bundle on macOS; the main Hermes.app installation was not modified

This is intended as a follow-up polish patch for the canonical RU Desktop PR, so it should be easy to merge into NousResearch#46634 or cherry-pick if maintainers prefer another consolidation path.

Anatoly17 and others added 3 commits July 9, 2026 14:35
Full Russian translation for all desktop UI strings. Registers the locale in types.ts, languages.ts, and catalog.ts, and uses defineLocale() so any untranslated string falls back to English.

Adds pluralRu()/countRu() helpers with correct Russian plural rules (incl. the 11-14 exception) and routes all count-based strings through them. Reconciled against current main: dropped removed keys (credentials.or/escToCancel, providers.removeExternal->removeExternalGeneric, agents.tokensK, commandCenter.restartMessaging, sidebar.reorderWorkspace, modelPicker.persistGlobal(Session), clarify.shortcutSuffix/back/send) and moved desktop.branchTitle to its count form.
@DrMaks22

DrMaks22 commented Jul 9, 2026

Copy link
Copy Markdown
Author

Follow-up pushed in 374e079 for the new screenshots showing remaining English in the RU desktop build.

Covered in this patch:

  • routed the Mixture of Agents settings copy through the existing i18n catalog instead of hardcoded JSX strings;
  • added RU copy for MoA preset/reference/aggregator controls;
  • localized the stale auxiliary-model warning with proper Russian count handling;
  • added RU platform onboarding copy for messaging integrations, including the Telegram intro that was falling back to English;
  • added RU Telegram field copy for allow-all-users and home-channel/thread settings;
  • updated the shared translation type plus EN/ZH keys so typecheck keeps all locales structurally complete.

Checks run on the patch branch:

  • 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
  • git diff --check
  • local Hermes RU Test.app pack/install smoke build

I also ran the ru-localization quality lint; its findings are in existing runtime YAML/docs surfaces, not in the changed desktop files.

@Anatoly17
Anatoly17 force-pushed the feat/i18n-russian-locale branch 2 times, most recently from e704708 to f0c9606 Compare July 14, 2026 10:19
Anatoly17 pushed a commit that referenced this pull request Aug 15, 2026
Addresses both review findings on the remote-gateway download PR:

1. Unbounded buffering (finding #1). fetchBuffer / fetchBufferViaOauthSession
   accumulated the entire response (then copied it again via Buffer.concat)
   before saveGatewayFile even opened the save dialog, so a large gateway file
   could exhaust the native process. Both auth paths now stream: once response
   headers arrive the connect timeout is cleared, the filename is derived, the
   save dialog is shown, and the body is piped to the chosen destination with
   backpressure. A read/write error tears down the stream and unlinks the
   partial file. The byte-moving, data-URL decoding, and filename/path helpers
   are extracted into gateway-file-download.ts so they're unit-testable without
   Electron.

2. No fallback for older gateways (finding #2). saveGatewayFile required the new
   /api/fs/download route. Desktop and the remote gateway update independently,
   so a gateway predating this PR 404s. Added a 404-only compatibility fallback
   to the existing capped /api/fs/read-data-url route (bounded, so it only
   serves smaller files — enough to keep older backends working).

Tests: gateway-file-download.test.ts covers streaming, backpressure,
error-cleanup (unlink on write/response error), data-URL decoding, filename
derivation (incl. traversal reduction), and 404 detection;
gateway-file-download-transport.test.ts asserts both transports stream (no
whole-body Buffer.concat) and that the 404 fallback is wired. Both registered
in the desktop platform test list. Server-side /api/fs/download tests
(streaming + sensitive-file reject) already pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants