Skip to content

feat(i18n): add Russian (ru) locale to Hermes Desktop - #70673

Open
saimon4eg wants to merge 1 commit into
NousResearch:mainfrom
saimon4eg:feat/i18n-ru-v2
Open

feat(i18n): add Russian (ru) locale to Hermes Desktop#70673
saimon4eg wants to merge 1 commit into
NousResearch:mainfrom
saimon4eg:feat/i18n-ru-v2

Conversation

@saimon4eg

Copy link
Copy Markdown

What

Adds Russian language support to Hermes Desktop.

Uses the defineLocale() partial-locale pattern (same as ja.ts) — any missing keys fall back to English.

Changes

  • apps/desktop/src/i18n/ru.ts — 2889 lines, all sections translated
  • Locale type — added 'ru' to the union
  • Catalog — imported and registered ru
  • Languages — added Русский to LOCALE_OPTIONS and LOCALE_ALIASES

Closes #64929.

Uses the defineLocale() partial-locale pattern (same as ja.ts) —
any missing keys fall back to English, so the locale stays healthy
as upstream adds new keys.

Includes:
- Desktop locale (apps/desktop/src/i18n/ru.ts) — 2889 lines
- Locale type, catalog, languages, and aliases wired up
@alt-glitch alt-glitch added type/feature New feature or request comp/desktop Electron desktop app (apps/desktop/*) area/i18n Localization, locales, translations P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Jul 24, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #40701: this is the same Russian Desktop locale implementation (catalog, languages, types, and ru.ts) as the established open canonical PR. #64929 is the closed predecessor for this clean resubmission.

@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 Russian Desktop locale contribution. There are two substantive issues before this older duplicate patch could be used.

Problems

  • apps/desktop/src/i18n/ru.ts:117 uses an English-style count === 1 / count < 5 split. It renders incorrect Russian forms for 11 and 21. The active #40701 candidate has an Intl.PluralRules('ru') helper and tests those edge cases.
  • This four-file diff adds no tests. Current locale coverage is established in apps/desktop/src/i18n/languages.test.ts:5-47, context.test.tsx:187-210, and runtime.test.ts:18-68; Russian needs equivalent alias, persistence, runtime, and plural coverage.
  • Current main now registers Arabic in the same integration files (catalog.ts:1-13, languages.ts:32-82, types.ts:8), so this patch cannot be applied verbatim without preserving that work.

Suggested changes

  • Consolidate on the maintained #40701 Russian implementation, which already carries plural handling and dedicated locale tests, rather than independently salvaging this older table.

Automated hermes-sweeper review.

region: 'Уведомления',
hide: 'Скрыть',
show: 'Показать',
more: count =>

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.

Russian plural categories are not 1 versus < 5: 11 needs уведомлений, while 21 needs уведомление. Please route count-bearing copy through an Intl.PluralRules('ru') helper and add edge-case tests (at least 11 and 21).

@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 30, 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 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