Skip to content

i18n: console, fleet, node, package and terminal pages in seven languages (0.4.118) - #139

Merged
fnyaker merged 1 commit into
mainfrom
claude/project-thread-lqklgh
Oct 18, 2026
Merged

fnyaker merged 1 commit into
mainfrom
claude/project-thread-lqklgh

Conversation

@fnyaker

@fnyaker fnyaker commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Requested by Maître · project thread

Before: the i18n system from #138 existed but the pages still held their sentences in English, written into the markup and the JS.

After: about 900 sentences of the console, fleet, node, package and terminal pages are catalogue keys with translations in fr, en, de, ru, zh, pl and sk. Setting language to de (or following a German browser) shows the console in German. The chat page is left out on purpose: it is being rewritten on this system.

How: pure-text elements and attributes carry data-i18n / data-i18n-attr with their English kept inside (a test holds it equal to the catalogue, so the two cannot drift). Messages passed to toast(), setMessage() and .textContent = call t() with parameters, and plural() takes its noun from count.* entries so it follows each language's plural rules. setHTML translates before it compares, so the repaint-skip still works in a translated page, and a MutationObserver translates markup added later. Verified in headless Chromium in German and Chinese: all five pages load with no script error and show translated text.

Not migrated yet (documented in Docs/I18n/guide): paragraphs mixing text and inline markup, JS strings composed outside those three calls, command-palette labels, and the chat page. A test refuses any new literal in the three migrated calls. Translations were drafted by model and want a native read for technical vocabulary.

Tests: 134 in tests/test_i18n.py (keys, parameters and plural forms identical across languages; every key a page asks for exists; no key unused; English inline equals the catalogue). Unit 5056 passed, integration 155 passed. A few structural assertions in test_webassets, test_console_layout and test_map_growth were adapted to the new markup.


Generated by Claude Code

…logue; 0.4.118

Pure-text elements and attributes carry data-i18n (English kept inside, held
equal to the catalogue by a test); toast/setMessage/textContent messages call
t(); plural() takes its noun from the catalogue. About 900 sentences in seven
languages. setHTML translates before it compares, and a MutationObserver
translates markup added later. The chat page is left for its rewrite.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0194znU5X7AzhxHW4wQoKm58
@fnyaker fnyaker self-assigned this Oct 18, 2026
@fnyaker
fnyaker merged commit e32dcc5 into main Oct 18, 2026
13 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.

2 participants