Repository navigation
Add Japanese localization for CLI, server messages, guide, and app UI - #8552
ozekimasaki wants to merge 7 commits into
Conversation
Raise the ja text tokens and give settings rows a little more vertical room so Japanese prose does not look cramped. Headings, numeric chrome, shortcuts, and inputs keep normal tracking.
|
Thanks for the pull request, @ozekimasaki. It was closed automatically because it does not meet the requirements below yet. This is an automated check, not a review of the change. Contributor approval. bb reviews pull requests only from approved contributors, and you are not on the list yet. Join the #contributors channel in Discord (https://discord.gg/kvBU6tJhcJ), post a link to your pull request, and explain what it changes and why. A maintainer then adds you to the list and reopens the pull request. Linked issue. Every pull request must close an open issue in this repository. The issue keeps the problem tracked even if this pull request closes or we take a different approach. Open an issue for the change, or find an existing one, and add See CONTRIBUTING.md for details. |
Human comments
What was wrong
bb shipped with English-only CLI help, server error messages, guide templates, and app UI. There was no locale switch, so Japanese users could not run the product in Japanese, and the app used a Latin-first font stack that rendered Japanese text with inconsistent glyph shapes and cramped line spacing.
What changed
--lang/BB_LANGselect the locale for the CLI and app (jaoren, defaulten). The app resolves the locale from?lang, a persistedbb.uiLocale, the injected__BB_LOCALE__, thennavigator.languages; it sets<html lang>and formats dates and numbers withIntl. The server resolves its locale fromBB_LANG/LC_*andAccept-Languagefor shell injection and error responses.README.ja.md. The UI catalog is wired through a build-time transform that wraps display strings intr()and falls back to English for missing keys.html[lang="ja"], Japanese text uses a platform Japanese fallback stack while Latin glyphs keep Inter:"Inter Variable", Inter, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", Meiryo, sans-serif. No font files are bundled and no CDN is used. Line height is raised for the small UI tiers (13px text: 18.57px -> 23px, 12px text: 16px -> 19px, 15px text: 22px -> 24px),leading-snuguses 1.6, and body tracking is0.01em. Headings,kbd, code, inputs, and tabular numbers keep normal tracking. Settings rows get 12px vertical padding and their descriptions 4px top margin.theme.test.ts.There are no wire-format changes and no
HOST_DAEMON_PROTOCOL_VERSIONbump. English output and layout are unchanged by default.How you verified
pnpm typecheck,pnpm lint,pnpm build, and the workspace test suites were run. The app theme test (41 tests) and settings-related tests (49 tests) pass; the CLI and server localization suites pass.--helppaths; only pass-through content (plugin run) and JSON schema field names remain English.Ctrl,Shift), marketplace/skill prose, and plugin-owned UI (see limitations).Known limitations:
ThreadDetailPromptAreahas two failing tests on this branch (inline-queued-message-editornot found and "Cancel queued edit" not found) that are independent of the catalog content.Related context: #3721 proposes a generic, plugin-extensible localization mechanism. This PR is a concrete Japanese locale for bb core and does not implement plugin-owned catalogs.
Fixes #8554