Skip to content

feat(i18n): add Russian (ru) locale for desktop app - #46634

Closed
Anatoly17 wants to merge 6 commits into
NousResearch:mainfrom
Anatoly17:feat/i18n-russian-locale
Closed

feat(i18n): add Russian (ru) locale for desktop app#46634
Anatoly17 wants to merge 6 commits into
NousResearch:mainfrom
Anatoly17:feat/i18n-russian-locale

Conversation

@Anatoly17

@Anatoly17 Anatoly17 commented Jun 15, 2026

Copy link
Copy Markdown

Full Russian translation for all desktop UI strings (~1000 lines). Adds ru.ts translation file and registers the locale in types.ts, languages.ts, and catalog.ts. Uses defineLocale() for English fallback on any untranslated strings.

What does this PR do?

Adds a full Russian (ru) locale for the Hermes Desktop UI

Related Issue

Fixes # (no issue)

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • Added apps/desktop/src/i18n/ru.ts with ~1000 translated strings

  • Registered 'ru' in types.ts, languages.ts (aliases: ru, ru-ru), and catalog.ts

  • Used defineLocale() so future untranslated keys fall back to English automatically

How to Test

  1. Launch Hermes Desktop
  2. Go to Settings → Language
  3. Select "Русский"
  4. Verify all UI elements display in Russian

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform:

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

For New Skills

  • This skill is broadly useful to most users (if bundled) — see Contributing Guide
  • SKILL.md follows the standard format (frontmatter, trigger conditions, steps, pitfalls)
  • No external dependencies that aren't already available (prefer stdlib, curl, existing Hermes tools)
  • I've tested the skill end-to-end: hermes --toolsets skills -q "Use the X skill to do Y"

Screenshots / Logs

@alt-glitch alt-glitch added type/feature New feature or request comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Jun 15, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #41677 — both add a full Russian (ru) locale for the Desktop app i18n (catalog/languages/ru.ts/types). #41677 is the earliest still-open PR in this saturated ru-i18n cluster (also competing: #40701, #42705). Marking this as duplicate of the canonical open PR.

@DrMaks22

DrMaks22 commented Jul 9, 2026

Copy link
Copy Markdown

I did another live Desktop QA pass against the current RU Desktop branch and found a few remaining English fallback surfaces, especially the intro/welcome copy, project/sidebar actions, cron counters, context usage, preview save errors, assistant resume copy, and tool-title wrappers.

I opened a focused follow-up PR into the canonical RU branch here: Anatoly17#2

Verification on that patch:

  • 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 for the touched Desktop i18n files
  • live smoke-tested in a separate local macOS bundle (Hermes RU Test.app), leaving the main Hermes.app untouched

The wording pass also removes several unnecessary English/Russian hybrids from the Russian intro copy while preserving command names, provider names, tool ids, paths, and technical tokens where they should remain unchanged.

@DrMaks22

DrMaks22 commented Jul 9, 2026

Copy link
Copy Markdown

A follow-up patch for the newly spotted RU desktop gaps is ready here: Anatoly17#2 (latest commit 374e079).

It addresses the screenshots with remaining English in:

  • Settings → Model → Mixture of Agents: preset/reference/aggregator controls and explanatory copy now go through the existing i18n catalog.
  • Messaging → Telegram: onboarding intro plus allow-all-users and home-channel/thread field labels/help now have RU copy instead of falling back to backend English.
  • The stale auxiliary-model warning is also localized with Russian count handling.

Validation on the patch branch is green:

  • 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

Recommended next step: fold/merge Anatoly17#2 into this canonical RU Desktop PR so #46634 carries the screenshot-driven polish before maintainer review.

@Anatoly17

Copy link
Copy Markdown
Author

Thanks for the thorough QA pass, @DrMaks22 — the MoA / intro / stale-aux English-fallback gaps you spotted are real and worth fixing.

That said, I'd like to keep #46634 scoped to the Russian locale itself (the ru.ts translation plus its registration), so it stays a small, focused, easy-to-review PR. Anatoly17#2 goes further: it refactors components (intro.tsx, model-settings.tsx) and extends the shared catalog (en.ts, types.ts, zh.ts), which affects the base English UI and all locales — not just Russian. That's genuinely useful work, but it's a separate concern from "add the RU locale," and it deserves review by the maintainers who own those components.

Could you open #2 as its own PR directly against NousResearch/hermes-agent:main? That way the component / i18n-catalog work lands on its own merits with clear attribution, and the RU locale PR stays focused. I'm happy to translate any new keys it introduces into Russian once the catalog changes are settled.

Thanks again for the collaboration.

@DrMaks22

Copy link
Copy Markdown

Thanks, @Anatoly17 — agreed on keeping #46634 focused on the Russian locale itself. I split the component/catalog work out and opened it directly against upstream main here: #61970.\n\nThat PR does not include the RU locale or duplicate #46634; it only routes the remaining hardcoded Desktop intro / Mixture of Agents / stale auxiliary-model copy through the shared i18n catalog, with English source strings and zh parity where needed.\n\nValidation on the split PR:\n- git diff --check\n- npm install --workspace apps/desktop\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 -> 4 files / 22 tests passed\n\nOnce #61970 lands or the catalog shape is accepted, the new keys can be translated cleanly in the canonical RU locale PR.

@DrMaks22

Copy link
Copy Markdown

Follow-up from the Desktop visual/i18n audit: I opened a small helper PR against the canonical RU branch:

Anatoly17#3

It localizes the remaining Russian fallbacks for assistant tool titles/actions plus a few adjacent thread/clarify labels, while keeping the existing defineLocale() shape and all tool/provider/model identifiers unchanged.

Validation on that branch:

  • 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 -> 4 files / 22 tests passed
  • RU quality lint: no findings in apps/desktop/src/i18n/ru.ts; remaining lint findings are pre-existing in unrelated locales/*.yaml / security docs

This is intentionally small so it can be folded into #46634 if you want the canonical RU Desktop PR to carry the latest polish before maintainer review.

@Anatoly17

Copy link
Copy Markdown
Author

Updated this PR onto the latest upstream main.

The refreshed branch now includes:

Validation on the final branch:

  • npm run typecheck --workspace apps/desktop — passed
  • i18n UI tests — 4 files / 22 tests passed
  • git diff --check — clean

Current status: 5 commits, 4 i18n files changed, no merge conflicts. The PR remains focused on the Russian Desktop locale and its registration.

@DrMaks22

Copy link
Copy Markdown

Thanks, @Anatoly17 — confirmed, and thank you for preserving authorship while folding the helper commits into the focused RU branch.

I’ll keep the shared component/catalog work separate in #61970 as discussed; I’ve also addressed the sweeper review there with focused Intro and ModelSettings i18n regression tests.

From my side, the Russian Desktop locale path now looks well-scoped and ready for maintainer review. Happy to handle any specific wording or coverage requests if reviewers spot anything else.

@DrMaks22

Copy link
Copy Markdown

Current RU Desktop consolidation status after the latest review pass:\n\n- #46634 now carries the current-main Russian locale, Hermes Cloud gateway strings, the Russian plural helper, and the focused tool-title/action wording polish that was folded in with authorship preserved.\n- I am keeping the shared component/catalog work separate in #61970; that PR has now been rebased onto current main and revalidated.\n- I agree with the existing direction that only one RU Desktop locale PR should land. From my side, #46634 remains the cleanest focused candidate unless maintainers explicitly prefer folding this branch back into #41677.\n\nHappy to handle any further wording or coverage requests, but I am not planning to open another duplicate RU Desktop locale PR.

Anatoly17 and others added 6 commits July 14, 2026 13:18
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.
Translate the newly added Hermes Cloud strings that were falling back
to English: the cloud* sign-in / agent-picker block plus modeTitle and
remoteAuthHint. Update restartingMessage to match the reworded English
(the desktop shell now stays open on reconnect).

No changes to en.ts, zh.ts, types.ts, or components.
Add behavior-based coverage for the Russian locale without pinning exact
Russian wording:
- normalizeLocale / isLocale / isSupportedLocaleValue / localeConfigValue
  for `ru` and the `ru-RU` and `ru_ru` aliases
- I18nProvider restores a persisted Russian locale from display.language
  and saves the selected Russian locale back to config
- runtime translator resolves the active Russian locale and falls back to
  English when a Russian key cannot be resolved

Test-only change; no production code, ru.ts, or other translations touched.
@Anatoly17
Anatoly17 force-pushed the feat/i18n-russian-locale branch from e704708 to f0c9606 Compare July 14, 2026 10:19
@Anatoly17

Copy link
Copy Markdown
Author

Follow-up: rebased once more onto current main (226e8de82) and added focused behavior-based coverage for the Russian locale.

The new tests cover:

  • ru, ru-RU, and ru_ru locale recognition;
  • saving and restoring Russian through display.language;
  • runtime fallback to English for intentionally untranslated keys.

The tests do not pin exact Russian wording and no production code was changed by the test commit.

Final validation:

  • Desktop typecheck — passed
  • i18n UI tests — 4 files / 27 tests passed
  • git diff --check — clean

Current head: f0c9606b97; 6 commits, 7 files, no merge conflicts.

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the focused Desktop locale contribution. Current main has no Russian entry in the selectable locale list (apps/desktop/src/i18n/languages.ts:7-32) or translation catalog (apps/desktop/src/i18n/catalog.ts:7-12), so the requested capability is still absent. The implementation follows the existing partial-locale contract: defineLocale() merges locale overrides onto English for fallback (apps/desktop/src/i18n/define-locale.ts:39-40), and the diff registers ru in the catalog, locale aliases, and locale union while adding behavior tests for aliases, config persistence, and runtime fallback.

No verified blocking correctness or design-fit defect was found in the PR diff. This is an automated hermes-sweeper review.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users labels Jul 14, 2026
@teknium1 teknium1 added the area/i18n Localization, locales, translations label Jul 19, 2026
@Anatoly17

Copy link
Copy Markdown
Author

Closing this PR in favor of #72250 as the single canonical Russian Desktop locale.

@timoncool and @DrMaks22 — thank you for driving the consolidation. #72250 carries a complete catalog against current main, which is a strictly better outcome for Russian users than this partial locale. I'd much rather see one well-maintained RU Desktop PR land than three competing ones.

I also appreciate that the consolidated branch preserves the work from this thread with the original Git authorship — the locale alias / config-persistence / runtime-fallback behavior tests, and the pluralRu/countRu helpers with the 11–14 plural exception, are carried over intact.

Happy to help review or translate remaining keys on #72250 if that's useful. Thanks to the maintainers and to the sweeper review for the feedback along the way.

@Anatoly17 Anatoly17 closed this Aug 10, 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/*) duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users 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.

4 participants