Skip to content

feat(i18n): add Russian (ru) locale for Desktop UI + CLI polish - #57654

Open
Dimapitaya wants to merge 1 commit into
NousResearch:mainfrom
Dimapitaya:i18n/russian-locale
Open

feat(i18n): add Russian (ru) locale for Desktop UI + CLI polish#57654
Dimapitaya wants to merge 1 commit into
NousResearch:mainfrom
Dimapitaya:i18n/russian-locale

Conversation

@Dimapitaya

Copy link
Copy Markdown

Closes #52137

What

Adds a complete Russian (ru) locale for the Hermes Desktop UI and finishes the remaining English strings in the CLI/agent ru.yaml catalog.

Desktop (apps/desktop/src/i18n/)

  • New ru.ts — full defineLocale({...}) translation of the main UI: common, boot, notifications, titlebar, settings (all sections), skills, agents, command center, messaging (all messenger field copy), profiles, cron, artifacts, sidebar, composer, status stack, updates, onboarding, model picker, shell, preview, assistant, prompts, errors.
  • Includes fieldLabels + fieldDescriptions (defineFieldCopy({...})) for the settings panel, following the ja.ts pattern.
  • Correct Russian pluralization (one / few / many) via a small plural() helper.
  • Registered in types.ts (Locale union), catalog.ts (TRANSLATIONS), and languages.ts (LOCALE_OPTIONS + LOCALE_ALIASES: ru, ru-ru).

CLI (locales/ru.yaml)

  • Translated the remaining English strings: Matrix /resume guidance messages and gateway status labels (Model/Context), plus the newer blocked_not_owner message.

Verification

  • npx tsc -p apps/desktop --noEmit → clean (exit 0)
  • npx vitest run --environment jsdom apps/desktop/src/i18n → 21/21 passing
  • ru.yaml validated with a YAML parser; structurally matches en.yaml

Notes

  • Desktop locales deep-merge over English (defineLocale), so any future key falls back to English gracefully.
  • Partial by design where upstream copy is highly technical; no functional/runtime code touched — translation strings only.

Обновление Hermes сбросило main на апстрим и отбросило прежний ru-коммит.
Восстановлено cherry-pick + адаптация под изменённый контракт en.ts:
- clarify: send -> continueLabel, убраны back/shortcutSuffix
- sidebar.row: убран удалённый reorderWorkspace
- assistant.branchTitle: строка -> функция (n => ...)
- ru.yaml: разрешён конфликт, добавлен перевод новой строки blocked_not_owner

Typecheck: exit 0. i18n unit-tests: 21/21.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) comp/cli CLI entry point, hermes_cli/, setup wizard duplicate This issue or pull request already exists labels Jul 3, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #40701 (earliest open canonical Russian Desktop locale). This adds the same apps/desktop/src/i18n/ru.ts desktop UI locale that the saturated ru-i18n cluster already tracks — prior siblings #53643 (closed) and #50083 (open) were deduped to #40701 for the identical addition. Also relates to the feature request #52137 and competing PRs #41677 / #50083. Maintainer picks which ru-locale PR to land.

@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 supplying the Russian Desktop catalog and completing the CLI strings. The Desktop gap still exists on current main: apps/desktop/src/i18n/catalog.ts:7-11 has no ru registration.

Problems

  • The added catalog is behind current en.ts: it omits common.expand, common.formatJson, and common.tryHint (apps/desktop/src/i18n/en.ts:28-30,43), as well as boot.errors.gatewayConnectionLost (apps/desktop/src/i18n/en.ts:79). defineLocale() merges English fallbacks (apps/desktop/src/i18n/define-locale.ts:39-40), so it remains functional but is not a complete Russian UI.
  • The PR adds aliases without covering them in apps/desktop/src/i18n/languages.test.ts:6-42, which currently tests the alias/config contract for all existing Desktop locales.

Suggested changes

  • Refresh ru.ts from current en.ts and translate the current missing keys, or label it partial.
  • Add Russian alias, config-value, and runtime translation assertions beside the existing i18n tests.

This is an automated hermes-sweeper review.

return many
}

export const ru = defineLocale({

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.

defineLocale() will make omitted keys fall back to English, but current main has keys absent from this catalog, including common.expand/formatJson/tryHint and boot.errors.gatewayConnectionLost in apps/desktop/src/i18n/en.ts:28-30,43,79. Please refresh this catalog from current en.ts or scope the PR as partial.

@teknium1 teknium1 added sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users area/i18n Localization, locales, translations labels Jul 15, 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/cli CLI entry point, hermes_cli/, setup wizard 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 type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Add Russian (ru-RU) localization for Hermes Agent UI

3 participants