Repository navigation
i18n: add Russian (ru) locale - #1284
betraalexandr wants to merge 1 commit into
Conversation
Adds ru following i18n/README.md: all 3,956 entries translated and reviewed (Review: human), registered in lingui.config.ts, the bundled locale list, scripts/i18n.ts and the i18n tests, plus Russian glossary terms (ceiling, floor plan, room, unit, wall, walkthrough). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thanks @betraalexandr! This follows the "bundle another language" steps in Two things:
CI for this fork is waiting on maintainer approval to run. |
Aymericr
left a comment
There was a problem hiding this comment.
[Maintainer] Reviewed at 57c2b8e.
The wiring follows i18n/README.md (ru in lingui.config.ts, TARGET_LOCALES, bundledLocalePacks, glossary, and the locale-pack test). I counted 3,956 entries, all marked Review: human and none fuzzy, which matches the description.
I spot-checked architectural terms and they read as considered Russian, not raw machine output: Wall → Стена, Rooms → Комнаты, Ceiling → Потолок, Floor plan → План этажа, Site → Участок (not «сайт»), Slab → Плита перекрытия, Unit → Помещение (the glossary sense, not a measurement unit), Gate → Калитка, Walkthrough → Прогулка, Share → Поделиться. Display settings → Настройки отображения matches the test.
One consistency issue to look at: Level is «Уровень» in some inspector strings and «Этаж» in the site panel, which is exactly why the glossary left level untranslated. Please pick one sense per UI surface (storey vs. generic level) before this ships.
Not approving for merge yet:
- Rebase and re-extract.
mainhas grown since this was cut (3,956 here vs about 3.96k+ now). New strings should come in asReview: requireduntil you review them; please do not bulk-mark themhuman. - Screenshot of
?lang=ru(navbar, Build panel, a dialog) is still missing. - CI has not run on this head (fork workflow waiting for approval: CI run 43631868730).
Translation quality of the existing pack looks good enough to approve after 1–2.
|
Review at
P0/P1: 0. CI hasn't run on this fork PR yet because it needs a maintainer to approve the workflow run; it merges once that's green. |
Aymericr
left a comment
There was a problem hiding this comment.
[Maintainer] Re-checked at 57c2b8e against current main (9c00a41), which now has the #1310 lazy loader and the Italian locale (#1200) as the pattern. Reviewed with Codex (gpt-6.2-astra) in two rounds: a full review, then every claim re-verified against the code. No new push since my last review, and the branch now conflicts, so I can't run CI on it yet.
P1 — Russian is not wired into the lazy loader. The PR only adds ru to the eager bundledLocalePacks. The app loads catalogs through loadBundledLocale() (apps/editor/app/layout.tsx:44). On main, ru-RU resolves to null (lazy-locales.ts:38), so Russian would never load and the UI would stay English. The PR's test registers every pack by hand, so it wouldn't catch this.
What to change (model: #1200, edb4ba2f):
- Rebase onto
mainand resolve the six conflicts:lingui.config.ts,scripts/i18n.ts,scripts/i18n.test.ts,scripts/i18n-literals.test.ts: keepmain. They now read the shared lists fromscripts/i18n-locales.ts, so don't restore literal arrays (the old ones omitit).packages/editor/src/i18n/locales.ts: keepmain's imports and registration loop. Add only therumessages import andru: { locale: 'ru', messages: ru }.i18n/glossary.json: keepmain's Italian values and notes. Merge your Russian values for ceiling, floor plan, room, wall and walkthrough, plus the newunitentry and its note.
- Lazy loader: in
packages/editor/src/i18n/lazy-locales.ts, add'ru'toBUNDLED_LOCALESandcase 'ru': return (await import('./locales/ru/messages')).messagesinimportLocaleMessages. No resolver change is needed. - Per-locale entry: add
packages/editor/src/i18n/locales/ru/index.ts(copylocales/it/index.ts:locale,messages,registerLocale()), plus"./locales/ru": "./src/i18n/locales/ru/index.ts"inpackages/editor/package.json. - Tooling registry: append
'ru'toTARGET_LOCALESinscripts/i18n-locales.ts. Add it toPREVIEW_LOCALESonly if you want Russian to ship as a preview with drafts. Otherwisecheck --reviewedwill fail on the drafts from step 5. - Re-extract: keep your
ru/messages.poand runbun run i18n:extract. Against currentmainit lacks 224 IDs, has 1 retired (node.item.panel.info), and 3editor.actionMenu.pointAskButton.*entries whose English changed. New empty entries come in asReview: missing. Fill them asfuzzy+Review: required; don't mark themhuman. Then runbun run i18n:compileandbun run i18n:check. - Tests (
locales.test.tsauto-merges): keep yourНастройки отображения/Комнатыassertions, addruto the sorted pack-key list, and addru-RU → ru, an isolatedregisterLocale()test, and aloadBundledLocale('ru-RU')test that serves Russian without loading other locales. - README:
i18n/README.md:200("To bundle another language") is stale. Please describe the shared target list, lazy loader, per-locale entry and package export instead of a literal Lingui edit.
Still open from my earlier review: pick one sense per surface for Level («Уровень» vs «Этаж»), and add a ?lang=ru screenshot of the reviewed surfaces.
No P0 found in the non-catalog diff. Once the above is in and CI is green at the new head, I'm happy to approve and merge. I'm not pushing to your fork.
…912) (#1357) Ports #1284 (Russian locale, wired through the lazy locale loader like #1200; 227 new strings as fuzzy / Review: required drafts) and #912 (store assets as raw bytes in IndexedDB; legacy File/Blob records still load). Co-authored-by: Aleksandr Betra <69962782+betraalexandr@users.noreply.github.com> Co-authored-by: Duhan K <157699651+DoudouDoudouk@users.noreply.github.com>
|
Thank you @betraalexandr! Your Russian locale has landed on Left out of #1357, and welcome as follow-up PRs:
Closing this as landed. Thanks again! |
What does this PR do?
Adds Russian (
ru) as a bundled locale, followingi18n/README.md.packages/editor/src/i18n/locales/ru/messages.po(+ compiledmessages.ts): all 3,956 entries translated, markedReview: human.lingui.config.ts,packages/editor/src/i18n/locales.ts,scripts/i18n.ts:ruadded to the locale lists.scripts/i18n.test.ts,scripts/i18n-literals.test.ts,packages/editor/src/i18n/locales.test.ts:ruadded to the locale lists and the locale-pack test.i18n/glossary.json: Russian forms forceiling,floor plan,room,unit,wall,walkthrough. (levelandscanare left out: Russian needs different words depending on context.)No copy, component or dependency changes. Plural messages use
one / few / many / other.How it was reviewed: translated with AI assistance using a project glossary, then reviewed in context by a native Russian speaker during daily use of the editor (including item search); marked
Review: human. Rare strings (e.g. some error messages) may not have been seen in the UI. Happy to adjust on feedback.How to test
bun install --frozen-lockfilebun run i18n:extractleaves no diff;bun run i18n:checkpasses;bun scripts/i18n.ts check --reviewedreports nothing forru.bun test scripts/i18n.test.ts scripts/i18n-literals.test.tsandbun test src/i18ninpackages/editorpass.?lang=ru.Screenshots / screen recording
None yet; can add if useful.
Checklist
bun devbiome checkon the touched files is clean)mainbranchDisclosure: prepared with the help of an AI agent (Claude Code). Run:
i18n:extract,i18n:check,i18n:literals -- check, the i18n script tests, thepackages/coreandpackages/editori18n tests,tsgo --noEmitinpackages/editor. Not run: the fullbun run ci.🤖 Generated with Claude Code
Note
Low Risk
Adds translations and config only; no runtime logic, security, or data-handling changes.
Overview
Adds Russian (
ru) as a shipped bundled language across the Lingui/i18n pipeline.lingui.config.ts,scripts/i18n.ts, andpackages/editor/src/i18n/locales.tsnow includeruin locale lists and register compiledrumessages with the editor pack.i18n/glossary.jsongains Russian architectural terms (e.g. room, wall, floor plan, unit) so tooling stays consistent with other locales.Tests in
locales.test.ts,i18n.test.ts, andi18n-literals.test.tsassert Russian coverage alongside existing target locales. Use?lang=ruto run the editor in Russian once the catalog files are present in the branch.Reviewed by Cursor Bugbot for commit 57c2b8e. Bugbot is set up for automated code reviews on this repo. Configure here.