Skip to content

feat(i18n): add Russian (ru) UI language support - #16736

Closed
AlexZander85 wants to merge 3 commits into
stablyai:mainfrom
AlexZander85:feat/russian-ui
Closed

AlexZander85 wants to merge 3 commits into
stablyai:mainfrom
AlexZander85:feat/russian-ui

Conversation

@AlexZander85

Copy link
Copy Markdown

ELI5

Orca can now be switched into Russian. "Russian" (ru) is added as a built-in interface language exactly like the existing Chinese, Korean, Japanese, and Spanish locales. Where the translation doesn't cover a key yet, that string falls back to the current English text — this is the repository's standard model for in-repo locales and is safe, with no crashes or broken UI.

What Changed

  • src/shared/ui-language.ts — new UI_LANGUAGE_RUSSIAN = 'ru' constant and expanded BuiltInUiLanguage type union.
  • src/shared/ui-locale.ts — 'ru' added to SUPPORTED_UI_LOCALES, to normalizeSupportedUiLocale handling, and to resolveUiLocale(), including resolution of the system locale ru-* prefix.
  • src/renderer/src/i18n/supported-languages.ts — a "Русский" entry in Settings → Appearance → Language, with the native-name fallback "Русский".
  • src/renderer/src/i18n/i18n.ts and src/main/i18n/main-i18n.ts — lazy ru.json loaders wired into both the renderer and main i18next backends, mirroring the other non-English locales.
  • src/renderer/src/components/settings/appearance-search.ts and config/localization-coverage-allowlist.json — Russian search keyword "язык" for appearance search (with a matching coverage allowlist entry).
  • src/renderer/src/i18n/locales/ru.json — a new Russian catalog: 5,792 keys (42.65% of the 13,581 in en.json).
  • en/es/ja/ko/zh.json — backfilled the russian: "Русский" language label so it renders in every existing locale.
  • src/shared/ui-language.test.ts, src/shared/ui-locale.test.ts — extended to cover ru.

Why

Russian is among the most requested languages by users. The change follows the already-established pattern for adding a locale (en/es/ja/ko/zh): wire up the full localization infrastructure plus a catalog, and rely on the repo's documented behavior that untranslated keys fall back to the current English text (missing keys are explicitly allowed by verify-localization-catalog.mjs; the CJK/Spanish locales are similarly incremental). This delivers a working Russian UI immediately, while the remaining auto-section codemod hash keys can be filled in follow-up PRs.

Honest caveat: to reach useful coverage, the high-frequency strings in the codemod-only auto section were translated with machine translation (MyMemory, en→ru) plus manual overrides for working terms (pull request, merge, Codex, etc.). Short UI strings and all stable named sections (menu, tray, settings, browser, components, dashboard) are hand/localized by the contributor. It would be worth a human review pass over the longer machine-translated strings before merging.

Linked Issue

No dedicated issue exists — this is a standalone locale addition following the repository's existing multi-locale pattern; the only issue it addresses is internalization coverage.

Fixes #(none)

Visual Proof

N/A — the change adds a "Русский" entry to the language dropdown in Settings → Appearance → Language and introduces a new locale catalog; it does not alter the existing UI of any already-shipped locale. The passing localization gates and unit tests are the verification; there is no before/after visual delta for existing locales.

Testing

  • node config/scripts/verify-localization-catalog.mjs — passes for ru.json: 5,792 entries, no extra keys and no interpolation/placeholder mismatches (validated for {{value0}}, {{count}}, etc.).

  • node config/scripts/verify-localization-extraction.mjs — passes (only the pre-existing informational baseline notes).

  • node config/scripts/audit-localization-coverage.mjs --check — passes, including the new Russian keyword allowlist entry ("язык").

  • pnpm run typecheck — passes.

  • Automated tests — src/shared + src/renderer/src/i18n suites: 582 files / 6,071 tests passing (includes the existing es/ja/ko/zh iteration suites, unaffected).

  • This is a declarative JSON + i18next change with no platform-specific code; separate cross-platform GUI launches (macOS/Linux/Windows/SSH) were not run in this environment.

  • I manually tested these changes locally (at the infrastructure level via the localization gates and tests; no GUI launch was performed in this sandbox)

  • Automated tests added/updated, or explained why not below (see Testing above)

AI Disclosure

This PR was created by an AI agent (OpenHands). The bulk of the auto-section translations were produced via machine translation (MyMemory, en→ru) and then hand-corrected for product/domain terminology; all stable named sections and the high-frequency term glossary are authored manually.

Review

Review focus: (1) confirm the ru infrastructure mirrors the existing es/ja/ko/zh pattern end-to-end; (2) sanity-check the Russian wording, especially the longer machine-translated strings; (3) verify no placeholder/extra-key regressions and no unrelated changes to other catalogs (their only diff is the single russian label line).

Agent skill upstream boundary

  • Not applicable — this is a pure UI localization change and does not touch any upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Security: no secrets, network code, or code-execution paths are touched; the change consists of static JSON catalogs and locale constants.
  • Cross-platform (Linux / Windows / mac) and SSH/remote: the translations are declarative and drive the shared i18next pipeline already used by every locale; no platform-specific paths, shell calls, or shortcuts are introduced.
  • Mobile: no mobile-specific surfaces were changed beyond the shared locale catalog.
  • Backwards compatibility: appending a member to SUPPORTED_UI_LOCALES / BuiltInUiLanguage does not affect existing values; the ru loader is an additive lazy import. New test assertions do not modify existing behavior.

Checklist

  • This PR is small and focused
  • I explained what changed and why (including ELI5)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (typecheck and the relevant test suites are confirmed locally; a full pnpm lint / pnpm build run was not executed in this environment — CI will cover)

Add Russian as a built-in interface language across the localization
stack: new ru.json catalog, lazy locale loaders in renderer and main,
supported-language choice in settings, locale resolution, and the
appearance-search language keyword. Backfill the russian label in the
existing en/es/ja/ko/zh catalogs.

Co-authored-by: openhands <openhands@all-hands.dev>
Machine-assisted translation of the high-frequency auto-section strings
raises Russian UI coverage to 42.6% (5792/13581 keys), with curated
corrections for domain terms (pull request, merge, Codex) and English
fallback for untranslated keys. All localization gates and tests pass.

Co-authored-by: openhands <openhands@all-hands.dev>
@coderabbitai

coderabbitai Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6ddb60de-b109-467e-8552-15994119116e

📥 Commits

Reviewing files that changed from the base of the PR and between 4c7007c and c9e3987.

📒 Files selected for processing (1)
  • src/renderer/src/components/settings/appearance-search.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

Adds Russian as a built-in UI language with ru locale normalization and resolution. Adds Russian to selectable language choices, fallback labels, and locale catalogs. Adds renderer and main-process lazy locale loaders. Adds Russian search keywords for the appearance language setting. Extends tests for language normalization and locale resolution.

Merge Risk: ⚪ Minimal · up to c9e39

This adds Russian language support with English fallback for untranslated strings and does not alter existing locale behavior; no actionable merge-blocking risk remains beyond normal checks and review.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the change, rationale, testing, AI disclosure, review focus, compatibility considerations, and checklist. However, the required Linked Issue section is not satisfied because it … Provide a valid linked issue in the Linked Issue section and update the Fixes #... entry. If no issue exists, create one before merging and reference it here; do not use Fixes #(none).,
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 8 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding Russian (ru) UI language support.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description covers the change, rationale, testing, AI disclosure, review focus, compatibility considerations, and checklist. However, the required Linked Issue section is not satisfied because it states that no issue exists and uses Fixes #(none), while the template requires an issue link.

  • Fix all pre-merge checks with AI

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4f6ffc2d-5774-40c7-a3ef-f8f4d4fe870d

📥 Commits

Reviewing files that changed from the base of the PR and between 026389a and 4c7007c.

📒 Files selected for processing (15)
  • config/localization-coverage-allowlist.json
  • src/main/i18n/main-i18n.ts
  • src/renderer/src/components/settings/appearance-search.ts
  • src/renderer/src/i18n/i18n.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/ru.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/supported-languages.ts
  • src/shared/ui-language.test.ts
  • src/shared/ui-language.ts
  • src/shared/ui-locale.test.ts
  • src/shared/ui-locale.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Adds settings.appearance.language.russian to the language search keywords
so searching "Русский" finds the language setting, matching the other
locales' label indexing. The native word "язык" was already indexed.

Co-authored-by: openhands <openhands@all-hands.dev>
@NooBiToo

Copy link
Copy Markdown

@OrcaWin

OrcaWin commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Thank you for this! Russian (Русский) is now a built-in UI language as of #34717, so I'm closing this in its favor. Wording fixes are welcome as follow-up PRs against src/renderer/src/i18n/locales/ru.json.

@OrcaWin OrcaWin closed this Oct 28, 2026
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.

4 participants