Skip to content

feat(desktop): the System UI in Japanese, from a lang line the host sends - #31

Merged
doodlewind merged 1 commit into
mainfrom
feat/desktop-japanese
Oct 6, 2026
Merged

doodlewind merged 1 commit into
mainfrom
feat/desktop-japanese

Conversation

@doodlewind

Copy link
Copy Markdown
Contributor

Pocket Studio's laptop runs Pocket Shell Desktop, and the Studio now has a Japanese version. The System UI's own words (Start menu, desktop icons, menus, folder windows, the About and Shut Down dialogs, the Pocket app placeholder) now come from a catalog in English and Japanese.

  • src/system-ui/words.ts: the catalogs and lw(), the active one. Japanese uses the names Japanese desktops of the period used (マイ コンピュータ, ごみ箱, メモ帳, 右端で折り返す). File names (README.TXT, Program Files) and shortcut names (Cmd+W) are the same in both.
  • svc.ts: a host line {t:"lang", id, titles}: the language (en or ja; another id is ignored) and the installed apps' titles in it by package id. Without one the shell is English, as before.
  • app.tsx: labels read the catalog where they are drawn; open windows are retitled on a lang line (Pocket apps, Notepad by its document name, folders, About, Shut Down). Menu bars of Notepad and Minesweeper windows already open keep their labels until reopened.
  • pocket-apps.ts: pocket.about.json may carry translations: { ja: { body: [...] } }; aboutBody(about, lang) picks it.
  • chrome.tsx: a desktop label wider than its 74 px cell moves to stay on the screen, and is cut with "..." only where an icon stands beside it in the next column on the same row (until selected). English labels draw as before (checked in the three themes).

Glyphs: the theme faces are baked with ASCII; Japanese is drawn by PocketJS's browser realm at run time (pocket-nexus/pocketjs#560, text.glyphs.runtime). This repository's own hosts (macOS, 3DS, iPod) do not send a lang line, so nothing changes there.

Checks: bun run --cwd shells/desktop typecheck, bun test test/system-ui.test.ts (74 pass; new tests for the catalogs, the lang line, About translations, the label cut and shift).

Not done: the welcome note and README.TXT (Notepad documents) stay English: Notepad lays text out in the text worker, which measures with the baked atlases.

🤖 Generated with Claude Code

…ends

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@doodlewind
doodlewind merged commit ce6d0b0 into main Oct 6, 2026
2 checks passed
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