Skip to content

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

Open
DrawusMas wants to merge 1 commit into
NousResearch:mainfrom
DrawusMas:add-russian-locale
Open

feat(i18n): add Russian (ru) locale for desktop app#41677
DrawusMas wants to merge 1 commit into
NousResearch:mainfrom
DrawusMas:add-russian-locale

Conversation

@DrawusMas

Copy link
Copy Markdown

Summary

Adds full Russian (ru) locale support to the Hermes Desktop app.

Changes

  • New file: apps/desktop/src/i18n/ru.ts — Complete Russian translation covering ~850 strings across all 29 UI sections
  • Modified: apps/desktop/src/i18n/types.ts — Added 'ru' to the Locale union type
  • Modified: apps/desktop/src/i18n/languages.ts — Added Russian to LOCALE_OPTIONS (name: Русский, englishName: Russian) and LOCALE_ALIASES (ru, ru-ru, ru_ru)
  • Modified: apps/desktop/src/i18n/catalog.ts — Registered ru translation module

Coverage

All UI sections translated:

  • Common, Boot, Notifications, Titlebar, Keybinds, Language
  • Settings (Providers, Gateway, MCP, Model, Sessions, Toolsets)
  • Skills, Agents, Command Center, Messaging (all platforms)
  • Profiles, Cron, Artifacts, Sidebar, Composer
  • Updates, Install, Onboarding, Model Picker, Shell
  • Right Sidebar, Preview, Assistant, Prompts, Desktop, Errors, UI

Testing

npx tsc --noEmit passes with no errors.

Closes #40347

- Add ru.ts with full Russian translation (~850 strings, 29 sections)
- Add 'ru' to Locale type in types.ts
- Add Russian to LOCALE_OPTIONS and LOCALE_ALIASES in languages.ts
- Register ru translation in catalog.ts

Covers all UI sections: common, boot, notifications, titlebar, keybinds,
language, settings, skills, agents, commandCenter, messaging, profiles,
cron, artifacts, sidebar, composer, updates, install, onboarding,
modelPicker, modelVisibility, shell, rightSidebar, preview, assistant,
prompts, desktop, errors, ui.

Related: NousResearch#40347

@tonydwb tonydwb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Summary

Verdict: Approved

Pure documentation addition, no code changes. Large locale catalog is appropriate for an i18n data file; no security, naming, or correctness concerns.


Reviewed by Hermes Agent

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have labels Jun 8, 2026
@Anatoly17

Copy link
Copy Markdown

Hi! I independently submitted a Russian locale PR (#46634, marked as duplicate of this one).

My translation was done on the latest main (commit 6cb88a0, June 14 2026), so it covers new strings added after this PR was opened — particularly in messaging, updates, install, and shell sections. It also has more complete pluralization for Russian (which has 3 plural forms: 1, 2-4, 5+).

If it would help, feel free to cherry-pick any missing strings from my ru.ts:
https://github.com/Anatoly17/hermes-agent/blob/feat/i18n-russian-locale/apps/desktop/src/i18n/ru.ts

Happy to consolidate into this PR if that's preferred. Thanks for the work on this!

@DrMaks22

Copy link
Copy Markdown

Thanks for pushing the Russian Desktop locale work. I audited the current RU Desktop PR cluster and I agree this PR is the right canonical place to consolidate the effort, rather than opening another duplicate PR.

I checked this branch against current origin/main (0bbf325a8) and found one technical blocker plus a few copy-quality items that are worth fixing before merge.

Verification:

  • git merge --no-commit --no-ff pr/41677 applies cleanly on current main.
  • cd apps/desktop && npm run test:ui -- src/i18n/languages.test.ts src/i18n/runtime.test.ts src/i18n/context.test.tsx src/components/language-switcher.test.tsx passes (4 files, 22 tests).
  • cd apps/desktop && npm run typecheck currently fails because ru.ts is stale against the current en.ts: there are missing keys such as notifications.native, settings.nav.notifications, profiles.cloneFrom*, updates.*Backend, shell.statusbar.backendVersion/clientLabel/backendLabel/showTerminal/hideTerminal, plus a few keys that no longer exist such as composer.editQueued, rightSidebar.terminalFocus, assistant.thread.editableCheckpoint, and onboarding.shortcut.

Suggested technical path:

  • Either fully sync ru.ts with the current en.ts, or switch ru.ts to the existing defineLocale() partial-locale pattern so missing Desktop-only strings safely fall back to English.
  • Keep tests behavior-based: locale registration, aliases (ru, ru-RU, ru_ru), display.language persistence, and fallback behavior. Avoid tests that pin exact Russian wording.
  • Use proper Russian plural rules, including the 11-14 exception; count < 5 will produce incorrect forms for values like 11, 12, 13, 14.

Suggested Russian copy polish before merge:

  • Prefer Hermes Desktop as the product name instead of translating it to рабочий стол in errors/status text.
  • Avoid visible calques such as компоновщик, поповер, сырые данные, не поднялся, and Снимите HERMES_DESKTOP_REMOTE_URL....
  • Better wording examples: всплывающая панель instead of поповер, необработанные данные instead of сырые данные, не запустился instead of не поднялся, and Удалите из окружения HERMES_DESKTOP_REMOTE_URL... instead of Снимите....
  • Keep commands, env vars, paths, IDs, MCP, OAuth, localhost, etc. unchanged.

Happy to help with a native Russian technical editorial pass or provide a focused patch if you or the maintainers want to consolidate the branch here.

@Anatoly17

Copy link
Copy Markdown

@DrMaks22 The missing keys you identified (notifications.native, shell.statusbar, etc.) are all present in my translation (#46634), since it was done against the current main (commit 6cb88a0, June 14 2026) — after those sections were added to en.ts.

It also uses defineLocale() throughout, so any future keys added to en.ts will automatically fall back to English without breaking the build.

If it helps move things forward, the up-to-date ru.ts is here:
https://github.com/Anatoly17/hermes-agent/blob/feat/i18n-russian-locale/apps/desktop/src/i18n/ru.ts

Happy to open a fresh PR based on this file if that's easier than rebasing #41677.

@DrMaks22

DrMaks22 commented Jul 9, 2026

Copy link
Copy Markdown

Rechecked the current RU Desktop localization cluster and kept this path duplicate-free: instead of opening another upstream PR, I prepared a focused helper patch against this canonical branch:

DrawusMas#1

What the helper patch does:

  • adds proper Russian plural handling, including the 11-14 exception;
  • polishes visible calques such as компоновщик, системный промпт, and prompt-as-промпт in user-facing UI copy;
  • tightens the Tool Call Display wording (Удобный / Технический) and raw-data terminology;
  • keeps commands, env vars, product names, and technical identifiers unchanged.

Verification on the helper branch:

  • git diff --check -> clean
  • npm run type-check --workspace apps/desktop -> passes
  • 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

If the author/maintainers still want #41677 to remain the canonical focused RU Desktop PR, this helper should be safe to merge into the branch for a stronger native Russian technical pass.

@Anatoly17

Copy link
Copy Markdown

Thanks for the review and the plural-handling patch — good catch on the 11–14 exception.

I've refreshed #46634: rebased onto current main, added proper Russian pluralization (shared pluralRu/countRu helper covering the 11–14 case), fixed several count strings that weren't declining correctly, and reconciled the locale with the keys that main has since renamed/removed. typecheck passes and the i18n suite (languages/runtime/context) is green.

Since both #41677 and #46634 cover the same ground, it'd be cleanest to land one. #46634 is now fully current against main and test-clean — happy to have it be the canonical RU Desktop PR, or to fold my plural/terminology work into whichever branch the maintainers prefer. Let me know which way you'd like to consolidate.

@DrMaks22

DrMaks22 commented Jul 9, 2026

Copy link
Copy Markdown

Thanks, @Anatoly17. I rechecked the refreshed #46634 at b23a07f17 locally.

Verification on the refreshed branch:

  • npm run typecheck --workspace apps/desktop -> passes
  • 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
  • git diff --check -> clean

I agree that only one RU Desktop PR should land. Since #46634 is now current-main, defineLocale()-based, and test-clean, it is a strong candidate if maintainers are comfortable superseding the earlier duplicate triage. I also opened a tiny helper patch for the remaining Russian wording polish:

Anatoly17#1

That patch only touches user-facing RU copy (сырые данные, системный промпт, prompt-as-промпт, a couple of Desktop labels) and keeps commands/env vars/product names unchanged.

From my side, either consolidation route is fine: land #46634 with that small polish, or fold the same current-main/plural/editorial work back into #41677. The important thing is to keep one focused, test-clean RU Desktop PR rather than adding another duplicate.

@Anatoly17

Copy link
Copy Markdown

Merged your polish patch into #46634Anatoly17#1 (501fdeb76). The RU wording pass is now in: prompt-as-запрос, системная инструкция, необработанные данные, the Hermes Desktop labels, and слэш-команда.

Rechecked on the merged branch:

  • npm run typecheck --workspace apps/desktop → passes
  • 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

So #46634 now carries the current-main rebase, the shared plural helper, and your editorial polish — one focused, test-clean RU Desktop PR. Thanks for the review and the collaboration, @DrMaks22.

Over to the maintainers on which PR to land — happy for #46634 to be the canonical RU Desktop PR, and equally fine to fold the same commits into #41677 if that's preferred. Either way, one PR.

@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 14, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the substantial Russian Desktop translation work. The feature is still needed on current main, but this branch needs reconciliation with the current i18n contract before it can be safely salvaged.

Problems

  • apps/desktop/src/i18n/ru.ts:5 declares ru: Translations, while current Translations requires keys absent from this branch, including common.expand and common.formatJson (apps/desktop/src/i18n/types.ts:73-75) and boot.errors.gatewayConnectionLost (apps/desktop/src/i18n/types.ts:124). The current branch therefore cannot typecheck as-is.
  • The diff changes no test files. The existing behavior suites in apps/desktop/src/i18n/languages.test.ts, context.test.tsx, and runtime.test.ts need Russian alias, persistence, and fallback coverage.

Suggested changes

  • Reconcile the locale with current en.ts/types.ts and use defineLocale() (apps/desktop/src/i18n/define-locale.ts:39-40) so intentionally untranslated new strings fall back to English.
  • Add focused behavior tests for ru, ru-RU, and ru_ru, plus persisted language selection and runtime fallback.

Automated hermes-sweeper review.


import type { Translations } from './types'

export const ru: Translations = {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This complete Translations object is stale against current main: Translations now requires keys such as common.expand, common.formatJson (types.ts:73-75), and boot.errors.gatewayConnectionLost (types.ts:124) that are absent here. Reconcile this file with current en.ts/types.ts; using defineLocale() can preserve English fallback for intentionally untranslated current and future keys.

@timoncool

Copy link
Copy Markdown

Hi @DrawusMas @DrMaks22 — triage pointed my #66833 here as the canonical RU thread, so sharing some data so we can consolidate on the most complete path rather than run parallel PRs.

I maintain a complete Russian locale (timoncool/hermes-ru-locale) and just refreshed it against current main in #66833:

  • 2303 / 2303 keys — 100% coverage, including the recent additions: Hermes Cloud gateway, desktop plugins, keybindings, native notifications, UI scale, layout editor.
  • npm run typecheck (renderer + electron) and eslint are clean.

For reference, this branch is currently ~825 keys behind current main (none of those recent features yet), plus a handful of keys that changed shape or no longer exist upstream and would need updating on a rebase.

I'd rather consolidate than keep a duplicate. Happy to do whichever is easiest for you:

  1. hand the missing keys over as a patch onto this branch once it's rebased onto main, or
  2. use the already-current feat(i18n): add Russian (ru) desktop locale #66833 as the base and fold in your wording refinements.

No ego on the mechanism — I just want the most complete, current RU to land. 🙂

@alt-glitch alt-glitch added the comp/desktop Electron desktop app (apps/desktop/*) label Jul 18, 2026
@DrMaks22

Copy link
Copy Markdown

Following @timoncool's consolidation proposal above, I did not open another upstream RU Desktop PR. Instead, I prepared a focused helper directly against the complete #66833 branch:

timoncool#1

The helper folds in the professional Russian editorial work, correct 11-14 plural handling, canonical settings field copy, and behavior tests requested by the sweeper reviews. Its branch has explicit 2303/2303 key parity; typecheck, 5 files / 37 tests, lint with 0 errors, and the production build pass.

I also validated the complete series on current main (614dc194e): it applies cleanly, and the only new locale key is settings.nav.billing (Оплата), producing 2304/2304 parity with the same green validation.

This gives maintainers a concrete duplicate-free consolidation path: merge the helper into #66833, rebase it onto current main with the one billing key, then select that single complete RU Desktop PR and close the older duplicates.

@teknium1 teknium1 added the area/i18n Localization, locales, translations label Jul 19, 2026
@DrMaks22

Copy link
Copy Markdown

Consolidation update for the canonical RU thread: the complete current-main candidate is now #72250.

It preserves the original Git authorship from the #66833 consolidation path, includes the native editorial/plural/test work discussed here, and is cleanly rebased onto current main. The catalog has exact 2526/2526 leaf-key coverage with parity enforced by test; typecheck, ESLint, production build, the full UI suite, and the Electron suite pass.

To avoid further duplicate review, #72250 is intended as the single current RU Desktop merge candidate. The older stale RU branches can be closed once maintainers confirm that direction.

@alt-glitch alt-glitch added needs-decision Awaiting maintainer decision before any implementation duplicate This issue or pull request already exists and removed needs-decision Awaiting maintainer decision before any implementation sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Jul 26, 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-moderate Sweeper blast radius: moderate — a subsystem or single platform type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🇷🇺 Russian locale for Desktop app — installer available

7 participants