Skip to content

i18n: seven languages, live language setting, language handed to apps (0.4.117) - #138

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: no language system; every interface string was written in the pages, and apps knew nothing of the operator's language.

After: one catalogue per language (en, fr, de, ru, zh, pl, sk) under src/locales/, a live language setting (empty follows the browser), /i18n.js served to every page with t() and data-i18n in ui.JS, and the chosen language handed to apps through AppHost.language / set_language.

How: src/i18n.py (stdlib only) loads and validates catalogues, picks CLDR plural forms and fills {params} by regex, never str.format. English is the fallback; Accept-Language is negotiated to a bound. The setting is read from the file like update_branch, so saving it is applying it. A language select is added to the console's configuration form. Docs: new Docs/I18n/guide, plus Architecture, AppAPI, Setup, WebConsole design and AGENTS.md.

This PR is the system and a seed of shared keys (common.*, state.*, count.*, language.*). Migrating the existing page strings is the next PR.

Tests: tests/test_i18n.py (124 tests: same keys and params in every language, plural rules checked against the browser's Intl.PluralRules, hostile headers and catalogues, the console route, apps being told). Unit suite 5046 passed, integration 155 passed.


Generated by Claude Code

…es and apps; 0.4.117

Catalogues for en fr de ru zh pl sk under src/locales, read through src/i18n.py
(plural forms by CLDR rule, English fallback, Accept-Language negotiated to a
bound). The language setting is live; the console serves /i18n.js to every page,
and AppHost hands the language to the apps.

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 fd91004 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