refactor: switch the whole project to English

talk is going to be published. Code comments, CLI output, error messages,
daemon log lines, MCP descriptions and results, test names and assertions,
README, spec, skill, build scripts and flake are now English. Only the
spoken announcement texts stay bilingual: the wrap result and the test
sentence are German or English depending on the detected language.

Language fallback is now configurable: `lang = "en" | "de"` (env
TALK_LANG, default en) is used when detection cannot tell (numbers, single
words, ties) and for talk's own announcements. langdetect.Detect takes the
fallback as an argument instead of hard-coding German. `talk setup` asks for
it; `talk doctor` and `talk status` show it.

Vocabulary pinned across packages so the process-boundary tests observe
stable strings: chain log lines ("chain: tier X skipped (not available)",
"falling back to the next tier", "spoken via X"), queue lines ("discarded:
quiet hours ... active", "replaced by toast", "max_age"), CLI notes
("speaking directly", "daemon started at", "no daemon", "nothing to cancel"),
status block with aligned English labels, MCP messages, origin guard 403.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
m3ta-chironandClaude Fable 5.1 committed 2026-10-24 11:15:35 +02:00
1 parent 4d30bd95ad
commit 85fa64cfe6
95 files changed
+4707 -4854

No files matched your search

+11 -11
View File
@@ -1,8 +1,8 @@
package test
// Prozessgrenzen-Test für den Ruhezeit-Toast: quiet_mode = toast in aktiver
// Ruhezeit löst eine Desktop-Benachrichtigung aus — hier ein fake
// notify-send im PATH des Daemons, das seine Argumente protokolliert.
// Process-boundary test for the quiet-hours toast: quiet_mode = toast during
// active quiet hours fires a desktop notification — here a fake notify-send
// in the daemon's PATH that logs its arguments.
import (
"os"
@@ -13,9 +13,9 @@ import (
"time"
)
func TestRuhezeitToastZeigtNotification(t *testing.T) {
func TestQuietHoursToastShowsNotification(t *testing.T) {
if runtime.GOOS != "linux" {
t.Skip("fake notify-send gibt es nur auf Linux")
t.Skip("the fake notify-send exists only on Linux")
}
root := t.TempDir()
bin := filepath.Join(root, "bin")
@@ -29,25 +29,25 @@ func TestRuhezeitToastZeigtNotification(t *testing.T) {
}
fake := newFakeProvider(t, 0)
d := startDaemon(t, root, fake.srv.URL, map[string]string{
"TALK_QUIET_HOURS": fensterUm(),
"TALK_QUIET_HOURS": windowAround(),
"TALK_QUIET_MODE": "toast",
"PATH": bin + string(os.PathListSeparator) + os.Getenv("PATH"),
})
code, m := speak(t, d, `{"text":"Build fertig, bitte Review"}`)
code, m := speak(t, d, `{"text":"Build done, please review"}`)
if code != 202 || m["discarded"] != "quiet_hours" || m["toast"] != true {
t.Fatalf("speak in Ruhezeit (toast): %d %v", code, m)
t.Fatalf("speak during quiet hours (toast): %d %v", code, m)
}
deadline := time.Now().Add(3 * time.Second)
for {
if b, err := os.ReadFile(seen); err == nil {
if !strings.Contains(string(b), "Build fertig, bitte Review") || !strings.Contains(string(b), "talk") {
t.Errorf("notify-send-Argumente = %q", b)
if !strings.Contains(string(b), "Build done, please review") || !strings.Contains(string(b), "talk") {
t.Errorf("notify-send arguments = %q", b)
}
break
}
if time.Now().After(deadline) {
t.Fatalf("notify-send wurde nicht gerufen — Daemon-Log:\n%s", d.stderr.String())
t.Fatalf("notify-send was not called — daemon log:\n%s", d.stderr.String())
}
time.Sleep(25 * time.Millisecond)
}