Repository navigation
feat(desktop): the System UI in Japanese, from a lang line the host sends - #31
Merged
Merged
Conversation
…ends Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 andlw(), 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 (enorja; 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.jsonmay carrytranslations: { 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