Skip to content

feat(tui): add Russian localization - #61366

Closed
krotname wants to merge 3 commits into
anomalyco:devfrom
krotname:tui-russian
Closed

krotname wants to merge 3 commits into
anomalyco:devfrom
krotname:tui-russian

Conversation

@krotname

@krotname krotname commented Nov 3, 2026 •

Copy link
Copy Markdown

Issue for this PR

Refs #37216. Continues the terminal localization work in #52000 by @imyu37, rebased onto the current dev layout.

Type of change

  • Bugfix
  • New feature
  • Refactor
  • Docs

What does this PR do?

Adds English and Russian translation catalogs to the TUI, with lazy loading, typed translation keys, locale-aware numbers, dates and Russian plural rules. English is the default. The language picker is available in settings and the command palette, and persists the selection in the TUI configuration:

{
  "language": "ru"
}

Completes the Russian UI for sessions, prompts, dialogs, permissions, forms, settings, integrations, model usage limits, goals and statistics. It also translates Mini's footer, menus, settings, tool summaries and scrollback. Tool inputs, paths, model names and user-authored content keep their original values.

The original implementation's extraction has been adapted to today's packages and components, including UI added after #52000. This PR includes only English and Russian catalogs.

How did you verify your code works?

Validation ran in an isolated Linux container, from packages/tui:

  • bun run test: 1,664 passed, 2 skipped, 0 failed (194 files).
  • bun run typecheck: passed.
  • Scoped Prettier and oxlint --deny-warnings: passed.
  • Mini localization regression suite: 10 passed.

The regression tests check complete Russian key and placeholder coverage, plural forms, keyboard and mouse language selection, persistence after reopening, narrow terminal layouts, Mini settings and translated structured scrollback. Existing English tests exercise the default language.

Screenshots / recordings

Russian Mini settings, captured from the terminal renderer at 100 columns:

Russian terminal settings

The same settings are tested at 44 columns.

Checklist

  • Tested locally (validation ran in an isolated Linux container).
  • No unrelated changes.

@krotname
krotname marked this pull request as ready for review November 5, 2026 10:03
@opencodejr opencodejr Bot closed this Nov 5, 2026
@opencodejr

opencodejr Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Thanks for picking up the terminal localization work from #52000, @krotname. It's clearly a lot of careful work!

At about 8,900 changed lines across 124 files, this is too large to review well as one pull request. It also depends on the TUI i18n design in #37216, which hasn't been agreed yet. Could you split it into smaller, focused pull requests that can each be reviewed on their own? For example:

  • i18n infrastructure: src/i18n (loaders, locales, typed translate, number/date/plural helpers), the language setting and the language picker, with only an English catalog and a few components converted to show the pattern.
  • English string extraction, in batches by area: for example dialogs, then prompt/session routes, then sidebar/feature plugins. No visible change for English users.
  • Mini localization: footer, menus, settings, tool summaries and scrollback.
  • Russian catalog: ru.ts and its coverage/plural tests, once the infrastructure is in.

Agreeing on the design in #37216 first would make the first step much easier to review. You're welcome to open those pull requests.

@krotname

krotname commented Nov 5, 2026

Copy link
Copy Markdown
Author

Thanks for the concrete breakdown. I proposed the smaller design in #37216 (comment). I will wait for maintainer agreement before opening the infrastructure PR, then follow with focused English extraction, Mini and Russian catalog PRs.

I would like to keep this implementation as a draft reference during that discussion. GitHub reports viewerCanReopen=false for my account, so I cannot restore it myself. Could a maintainer reopen it as a draft, or confirm that it should stay closed while the focused series replaces it? The full diff is not being resubmitted for merge.

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.

1 participant