Repository navigation
feat(i18n): add Russian (ru) UI language support - #16736
AlexZander85 wants to merge 3 commits into
Conversation
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>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughAdds Russian as a built-in UI language with Merge Risk: ⚪ Minimal · up to 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)
✅ Passed checks (3 passed)
Full details: Description checkExplanation 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
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (15)
config/localization-coverage-allowlist.jsonsrc/main/i18n/main-i18n.tssrc/renderer/src/components/settings/appearance-search.tssrc/renderer/src/i18n/i18n.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/ru.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/i18n/supported-languages.tssrc/shared/ui-language.test.tssrc/shared/ui-language.tssrc/shared/ui-locale.test.tssrc/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>
|
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 |
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— newUI_LANGUAGE_RUSSIAN = 'ru'constant and expandedBuiltInUiLanguagetype union.src/shared/ui-locale.ts—'ru'added toSUPPORTED_UI_LOCALES, tonormalizeSupportedUiLocalehandling, and toresolveUiLocale(), including resolution of the system localeru-*prefix.src/renderer/src/i18n/supported-languages.ts— a "Русский" entry in Settings → Appearance → Language, with the native-name fallback "Русский".src/renderer/src/i18n/i18n.tsandsrc/main/i18n/main-i18n.ts— lazyru.jsonloaders wired into both the renderer and main i18next backends, mirroring the other non-English locales.src/renderer/src/components/settings/appearance-search.tsandconfig/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 inen.json).en/es/ja/ko/zh.json— backfilled therussian: "Русский"language label so it renders in every existing locale.src/shared/ui-language.test.ts,src/shared/ui-locale.test.ts— extended to coverru.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 remainingauto-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
autosection 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 forru.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/i18nsuites: 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
ruinfrastructure 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 singlerussianlabel line).Agent skill upstream boundary
Notes
SUPPORTED_UI_LOCALES/BuiltInUiLanguagedoes not affect existing values; theruloader is an additive lazy import. New test assertions do not modify existing behavior.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (typecheck and the relevant test suites are confirmed locally; a fullpnpm lint/pnpm buildrun was not executed in this environment — CI will cover)