Skip to content

Localize the core UI: language setting and Russian translation (Lingui prototype) #7268

Closed

Description

@uzarsalan

The workflow

I use bb every day in Russian, and so does my team. I want to switch the bb interface to Russian in Settings and have the core UI follow that setting, without a restart and without patching the bundle.

Concretely:

  1. Open Settings → General and pick Русский in a new Language selector (or run bb settings general language ru).
  2. The Settings screens render in Russian, including correct plural forms.
  3. Anyone can add another language by adding a catalog file, and CI fails if a new user-visible string is not in the catalog or a catalog has an untranslated entry.

What happens today

bb has no language setting and no i18n layer. UI text is string literals in JSX (apps/app/src, packages/core-ui, shared-ui, thread-view). Rough count on main: about 190 files with visible text and about 900 literals in attributes, option objects and JSX text (the real total is likely 2–3k with toasts, errors and the command palette), plus about 40 toLocale*String / Intl.* call sites that would need to follow the selected locale. Theme overrides only cover styles, and replacing strings from a content script breaks with every release.

What you would expect

Related: #3721 proposes the plugin-facing localization mechanism (own runtime on Intl, no third-party dependency, system | en | zh-CN). This issue is complementary and I do not want to open a competing PR. It covers the core app and the translation workflow, and it is also a question about which core mechanism you prefer.

What I prototyped, so the question is concrete:

  • Lingui v5 with macros (msg, t, plural) and .po catalogs, en as source locale and ru as the first translation. Macros are applied by a second Babel pass before React Compiler; the catalog for the active locale is loaded lazily.
  • A language general setting (en | ru, default en) in generalSettings (domain schema, server handler, CLI via the existing settings command, docs). A new key needs no migration.
  • Settings → General translated: language selector, interface/threads/links/terminals sections, settings navigation, settings search index, command palette settings actions, CLI command/skills/voice sections, App links. The catalog has 172 entries and every ru entry is translated, including one/few/many/other plurals.
  • A catalog gate wired into the app lint script: it runs lingui extract, compares the sets of msgids before and after, and fails on empty ru translations (including plural forms).

Verification on the branch (@bb/app): typecheck, lint (0 errors), test (675 files) and build pass; I also ran the gate and the language tests myself, and ran the built app and confirmed Settings → General renders in Russian.

Prototype (not a PR): uzarsalan/bb@i18n-poc, head 6c7543c50f, 6 commits on top of 55135d1e50 (diff: main...uzarsalan:bb:i18n-poc).

Questions for maintainers:

  1. Should the core UI use Lingui, or the mechanism from Add an extensible localization mechanism for the app and plugins #3721? I can port the Russian catalog and the gate to either.
  2. Is a language key in generalSettings the right place for the preference?
  3. If this direction is wanted, I would send small PRs by area (settings first, then navigation, composer, threads, dialogs) after sign-off, as CONTRIBUTING.md asks.

Context and alternatives

  • Known gaps in the prototype: only Settings → General is extracted. Search, Plugins and plugin names in the settings sidebar, Automations and Skills route titles, Keyboard command names, and all other settings sections are still English. Some helpers outside React hooks use the global t, which may not re-render on a language change; I have not verified that.
  • Not covered: plugin-contributed strings (needs an SDK contract, see Add an extensible localization mechanism for the app and plugins #3721), agent output, prompts, terminal output and logs.
  • Alternative considered: a content-script plugin that rewrites DOM text from a dictionary. It works as a stopgap but breaks whenever a string changes and cannot translate plurals or host-rendered metadata.
  • Number of people affected: my team of Russian speakers at least; the thread on Add an extensible localization mechanism for the app and plugins #3721 shows more.
  • I searched open and closed issues for i18n, localization, translation, language and russian; Add an extensible localization mechanism for the app and plugins #3721 is the only related one and is linked above.

Checks

  • I searched open and closed issues for the same request.
  • The body ends with > AGENT GENERATED.

AGENT GENERATED

Activity

  1. uzarsalan commented on Nov 8, 2026

    @uzarsalan
    Author

    Moved to #3721: the prototype and the questions for maintainers are in #3721 (comment) so the discussion stays in one place.

    AGENT GENERATED

  2. added
    ui
    on Nov 8, 2026
  3. bb-slop-cop commented on Nov 8, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Applied missing classifications: Type: Feature · Priority: Medium · Effort: High · Labels: ui.

    This adds core localization and a language preference rather than correcting existing behavior. It meaningfully improves accessibility for non-English speakers, but requires architecture decisions and cross-cutting translation infrastructure. No existing classifications were present; the issue remains closed.

    No bug report or fix PR: this is a feature request requiring product and architecture decisions.

    AGENT GENERATED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ui

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions