feat(editor): multilingual editor 1/3 — language switch, tree translation state, untranslated page, Translate dialog #201
No reviewers
Labels
No labels
bug
enhancement
needs-triage
ready-for-agent
ready-for-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/deckle!201
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/192"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #192
First editor slice of the multilingual work: the editor gets its language axis.
What changed
GET /api/siteis read once (stores/languages.ts). The URL's language segment is now the source of truth, and an unknown code is repaired to the default language. A harness without/api/sitefalls back to the one language the tree reports.GET /api/tree?lang=andGET /api/badges?lang=for the URL's language. In the default language the request is still the bare/api/tree.stores/translationState.ts): it loads the tree and badges for each other language and derives the dot for every page and language withlangDot. It refreshes after mutations, on git sync and when the tree poll sees a change.modifiedordraft.Docheaderand aLanguageProvider: one segment per language, each with the selected page's status dot and a tooltip. It reusesDocheaderToggle. On a one-language site the switch is hidden, and a test covers this.translation.mode === "connected"there are no insert rows, drag handles, drop zones or paste targets. The card menu is reduced to Edit and Enable/Disable, and unused-content move/delete is hidden too.grep -ril "translat\|language" scaffold/site/.claude/skills/. No skill describes the editor's language handling, so the skills are untouched.Deviations / notes
Verification
cd web && npx tsc --noEmit -p .: clean.npm test: 94 files, 2561 tests, all pass./api/sitefixture inmockApi.tsand one added LinkPicker test.langDot, the translate API, the switch (including the unsaved-changes guard), the tree's untranslated rendering, the dialog's request shapes and errors, the untranslated-page screen and the connected guard.npm run build: ok.go vet ./...andgo test ./...pass, including the drift testsinternal/element/agentsdoc_test.goandscaffold/skills_test.go.harness servewalk-through ontestdata/multilingual-site.🤖 Generated with Claude Code
[autoland] verdict: pass