feat: add configurable home language for visible product strings - #2783
feat: add configurable home language for visible product strings#2783thelad-dev wants to merge 9 commits into
Conversation
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (4): Last reviewed commit: "no-mistakes: apply CI fixes" | Re-trigger Greptile |
Sichtbare Produkttexte folgen config/language mit englischem Standard; konkrete Sprachen bleiben eine lokale Home-Entscheidung.
|
Speaking as Kun's firstmate: Opt-in home language for visible product strings. Default stays English; any other tag is a tracked pack or a local overlay. Calm wires two Pi strings through the resolver; background diagnostics stay English. VISION:
Security: no. Language tags are regex-bounded before they become filenames; catalogs are JSON objects of strings only. Overlap: Fork CI approved (runs 32555816808 CI, 32555816824 and 32555834695 Require no-mistakes). no-mistakes/CI have not finished, so this is not merge-eligible yet. Docs nit for the author, not a captain question: This is waiting on CI, not on the captain. |
|
Speaking as Kun's firstmate: Follow-up after fork CI started: no-mistakes is red (blocking). The signature line is present, but the structured CI itself is still in progress (several portable/Herdr jobs running; coverage guard, repo invariants, and two parallel shards already green). This is waiting on the author, not the captain. |
Intent
Firstmate soll um eine Home-Sprache erweitert werden. Die sichtbare Produktkommunikation folgt config/language; der Standard ist Englisch. Welche konkrete Sprache ein Home wählt — Deutsch, Spanisch, Französisch oder eine andere — ist eine lokale Home-Entscheidung und keine Festlegung im Upstream-Repo von kunchenguid. Zusätzliche Sprachen kommen als optionale Katalogdateien oder lokale Overlays, nicht als fest verdrahtete Default-Texte. Hintergrund-Diagnosen dürfen englisch bleiben. Die Änderung passt den bestehenden no-mistakes-PR nach kunchenguid/firstmate an, wie CONTRIBUTING verlangt.
What Changed
fm-language.tsliestconfig/language, merged optionale Kataloge unterlanguages/<tag>.jsonund lokale Overlays unterconfig/languages/<tag>.jsonund fällt bei fehlenden oder ungültigen Tags auf englische Quelltexte zurück./calm-Hilfe und Tool-Kollisionswarnungen) statt fest verdrahteter Texte.docs/configuration.md,docs/calm.mdundAGENTS.mdergänzt, AFK-Skill auf Home-Sprache umgestellt und Shell-Tests für Standard-Englisch, Katalog-, Overlay- und Regionaltag-Fallback hinzugefügt.Risk Assessment
✅ Low: The home-language resolver is small and well-bounded, prior review findings are resolved (docs restored, command-help lifecycle documented), and the change matches the stated intent without introducing reachable correctness or security regressions.
Testing
Ich habe die Sprachauflösung über die Calm-Extension-API gegen Default-Englisch, es-Pack/Overlay/Fallback und ein deutsches Home-Overlay geprüft; dabei zeigen CLI-Transkripte und ein HTML-Artefakt die sichtbaren Produkttexte. Eine Live-Pi-TUI-Screenshot-Evidenz war hier nicht möglich, weil weder tmux noch ein Browser verfügbar sind; stattdessen wurde das reale Extension-Interface ausgeführt.
Evidence: Home-Sprache: Resolver-Evidenz (Default, es, de, Warnung/Diagnose)
Evidence: Offizieller test_home_language-Lauf
Evidence: Englische Default-Kollisionswarnung
Evidence: Gerendertes HTML mit sichtbaren Calm-Produkttexten (EN-Default vs. DE-Overlay)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed (2) ✅
.pi/extensions/fm-calm.ts:483- The/calmcommand description is resolved once at extension initialization viaformatHomeString(language, "calm.command.description"), whileconfig/calmis re-read on everysession_start(line 421) and the collision warning re-readsconfig/languageat notify time (lines 379–383). After the extension first loads, changingconfig/languageand starting a new Pi session with/new,resume, orforkleaves the command help in the old language until a full Pireloadrebuilds extension registrations.docs/calm.mdstates both visible strings followconfig/language, so this lifecycle gap is user-visible.🔧 Fix: Calm-Hilfe-Lebensdauer in Doku festhalten
1 error still open:
docs/configuration.md:388- Commit 9a2830c accidentally deleted roughly 360 lines from docs/configuration.md: the watched-tools section is cut off mid-prose afterannounce_args, and entire sections for Relay (.env), Process-to-event sources, Spoken interface/captain inbox, and Environment variables are gone (file shrank from ~763 to ~390 lines). This removes operator documentation that architecture.md, remote-secondmates.md, verification/public-followup.md, and other docs link to via anchors such as#relay-env,#process-to-event-sources-stateprocevent, and#promised-public-replies-statepublic-followup.🔧 Fix: configuration.md-Abschnitte wiederhergestellt
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
tests/fm-calm-pi-extension.test.sh→test_home_language(Default Englisch, ungültiger Tag, es-Pack, lokales Overlay, es-mx-Fallback)Erweitertes Node-Fixture gegenfm-calm.ts/fm-language.tsmitconfig/language=deund lokalemconfig/languages/de.json(deutscher/calm-Hilfetext, deutsch sichtbare Kollisionswarnung, englische Konsole)Node-Fixture für englisches Default-Home: Kollisionswarnung und Diagnose bleiben EnglischPrüfung, dass im Upstream keine fest verdrahteten Nicht-Englisch-Strings in.pi/extensions/liegen und keinlanguages/-Verzeichnis im Repo existiert✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.