Repository navigation
Description
The workflow
I want to use bb as a workbench for teams whose interface language is not English, while allowing independently distributed plugins to follow the same language setting.
The desired workflow is:
- Select
System,English, orSimplified Chinesein bb settings. - Have the app resolve and persist that preference without requiring a restart.
- Let plugin authors register plugin-owned message catalogs rather than adding their translations to bb core.
- Let plugin components and host-rendered plugin metadata react to the current locale.
- Preserve existing plugins that pass plain string titles and descriptions.
A working prototype based on main at 62fe3bc46 is available in airclear/bb:feat/i18n-extension. Its design note is docs/i18n-extension-design.md.
What happens today
bb has no shared locale preference or app-level localization runtime. Core interface text is embedded as English strings. Plugin components have no API for reading the app locale or formatting localized dates and numbers, and plugins cannot register isolated catalogs. Host-rendered plugin titles and descriptions only accept strings.
A plugin can implement its own unrelated localization state, but that creates duplicate language selectors, inconsistent locale resolution, and no way to localize labels rendered by the host.
What you would expect
bb should provide a small localization mechanism rather than a complete translation in the first change:
- A persisted
system | en | zh-CNlocale preference and one canonical resolver shared by the web app and Desktop shell. - An app-level runtime that updates
document.lang, lazy-loads the active catalog, and switches without restarting. - Experimental plugin APIs for registering plugin-owned eager or lazy catalogs and reading the current locale, translating messages, and formatting dates and numbers.
- Backward-compatible localized descriptors for host-rendered homepage, settings, and command metadata; ordinary strings must remain valid.
- Isolation by plugin id and frontend generation so unloads, reloads, invalid catalogs, and late lazy-loader results cannot affect other plugins.
- Required English fallback messages, with no requirement to translate all existing bb UI as part of the mechanism.
The prototype uses platform Intl APIs and adds no third-party i18n dependency. It deliberately excludes agent output, prompts, terminal output, logs, provider content, and full Chinese translation.
Context and alternatives
I searched open and closed issues for i18n, internationalization, and localization and found no matching request.
Alternatives considered in the prototype design:
- Plugin-only language settings: rejected because host-rendered metadata cannot follow them and users would manage multiple language preferences.
- One global plugin message namespace: rejected because independently authored plugins could collide and unload/reload ownership would be unclear.
- Adding a full ICU dependency immediately: deferred; the prototype covers fallback strings, named interpolation,
zero/one/otherplural forms, andIntlformatting with a contract that can evolve later. - Translating bb in the same change: explicitly out of scope so the mechanism can be reviewed independently from translation volume.
The prototype includes automated coverage for locale normalization, fallback, interpolation, plurals, runtime switching, document.lang, eager/lazy plugin catalogs, loader failure containment, generation isolation, host-rendered plugin metadata, old string compatibility, settings persistence, and the Desktop locale seam. The full app and Desktop suites and the repository build pass on the branch.
Checks
- I searched open and closed issues for the same request.
- The body ends with
> AGENT GENERATED.
AGENT GENERATED
Activity
bb-slop-cop commentedon Sep 15, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotApplied Type Feature, Priority Medium, Effort High, and labels
ui,plugins. No existing classifications needed preserving; all values were verified after writing.Shared localization and plugin APIs add new functionality requiring architectural design. No reproduction report or pull request: this is a feature request, so the bug-only steps do not apply.
MainFrame100 commentedon Oct 5, 2026
We'd also like to see this. We're a Russian-speaking team using bb every day, and an English-only interface is a real barrier for some of our teammates. Right now there's no clean way to localize it: theme overrides only cover styles, and replacing strings through a content script would break with every release.
An extensible mechanism like the one proposed here, with a locale preference plus dictionaries for the core app and plugins, would solve this.
dillonzq commentedon Oct 14, 2026
Strong +1 for this proposal! A built-in i18n foundation would make bb much more accessible to non-English-speaking users.
I especially support having a shared locale preference across the web app and Desktop, switching languages without a restart, and giving plugins their own translation catalogs so the entire experience can follow one language setting. Simplified Chinese support would be particularly valuable to me.
I also like the approach of landing the localization infrastructure first, without blocking it on a full UI translation. Thanks for putting together a working prototype — I'd love to see this adopted upstream!
uzarsalan commentedon Nov 8, 2026
I tried the other direction for the core app and have a working prototype, in case it helps decide how bb should do this.
Prototype (not a PR):
uzarsalan/bb@i18n-poc, 6 commits on top of55135d1e50(diff).What it does:
msg,t, plural) and.pocatalogs;enis the source locale,ruthe first translation. Macros run in a second Babel pass before React Compiler, and the active catalog loads lazily.languagekey ingeneralSettings(en | ru, defaulten): domain schema, server handler, existing CLI settings command, docs. No migration is needed for a new key.ruentry translated,one/few/many/otherplurals included.lintscript: runslingui extract, compares msgid sets before and after, and fails on emptyrutranslations, including plural forms.On the branch
@bb/apptypecheck, lint (0 errors), test (675 files) and build pass, and I ran the built app to confirm Settings → General renders in Russian.How this relates to the proposal here:
Intl(no dependency) versus Lingui (macros and.potooling, one added dependency). I can port the Russian catalog and the gate to whichever you prefer.t, and I have not verified that they re-render on a language change.Questions for maintainers: which core mechanism do you want, and is
generalSettings.languagethe right place for the preference? If a direction is agreed, I would send small PRs by area after sign-off, perCONTRIBUTING.md.Ilyafisk commentedon Nov 13, 2026
I put together two branches that may help with this issue:
main, preserving their commit authorship, and adds aRU/ENbutton in the sidebar footer. The button updates the same persisted setting as Settings → General → Language and the CLI command, without a restart. I verified the button in the running app, then confirmed Settings → General rendered in Russian. The focused tests, app typecheck, lint, catalog gate, and production app build pass.The toggle prototype currently translates the surfaces covered by the Lingui prototype, not the entire UI or plugin content. The full translation would need to be moved into catalogs in smaller patches before it could be merged. I am sharing these branches here for feedback and will follow the feature sign-off process in
CONTRIBUTING.mdbefore opening a PR againstget-bb/bb.wanettagrieme-spec commentedon Nov 28, 2026
Hi BB team,
I’m writing on behalf of a MacBook user who needs the Russian-language version of BB for their day-to-day work. Would you be willing to review this translation and consider including it in a signed, notarized macOS build? Having this version available on their MacBook would make a real difference to their ability to use BB at work.
The Russian UI patch is based on BB 0.50.1 (
a08e116). It adds a Russian/English language switch that persists across restarts and translates settings, chats, projects, and several bundled plugin screens. We tested those flows in an isolated Apple Silicon build. Some strings still need translation, and we’d welcome your guidance on how best to align the patch with the localization approach discussed here.Thank you for considering the request.