v0.250.0: i18n slice 1 release C — the language switch on every dashboard page (R-556)
gates / gates (push) Successful in 20s

- addLanguageData: the v0.247.0 hide condition (switch only on non-Hungarian pages or with ?lang=) is
  deleted; every template is converted, so the offer no longer leads to a half-English page.
- 89 layout parity fixtures re-captured; each equals its predecessor plus exactly one switch form after
  the version span (checked byte-for-byte, 89 of 89). The 17 standalone fixtures are unchanged.
- TestLanguageSwitch_EndToEnd: a Hungarian household with no ?lang= sees the form (red-proofed by
  restoring the condition: this test and 89 parity cases fail).
- CHANGELOG v0.250.0, README §18, CONTEXT.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
2026-09-17 18:43:01 +02:00
parent ac149c2aa4
commit be2efe5624
94 changed files with 156 additions and 119 deletions
+6 -4
View File
@@ -206,9 +206,11 @@ func TestLanguageSwitch_EndToEnd(t *testing.T) {
return rec.Body.String()
}
// v0.250.0: the switch is offered to everyone — a Hungarian household with no ?lang= sees the form.
// RED-PROOF: put back the „show only when not Hungarian or ?lang=" condition in addLanguageData.
hu := body("/launcher")
if strings.Contains(hu, `action="/settings/language"`) {
t.Error("a Hungarian household must not see the language switch in this release")
if !strings.Contains(hu, `action="/settings/language"`) || !strings.Contains(hu, `name="lang" value="en"`) {
t.Error("a Hungarian household with no ?lang= must see the language switch (form and the English choice)")
}
if !strings.Contains(hu, "<h2>Indítópult</h2>") || !strings.Contains(hu, `<html lang="hu"`) {
t.Error("default launcher is not Hungarian")
@@ -248,8 +250,8 @@ func TestLanguageSwitch_EndToEnd(t *testing.T) {
if s.settings.GetLanguage() != "hu" {
t.Fatal("switch back to hu not saved")
}
if back := body("/launcher"); strings.Contains(back, `action="/settings/language"`) || !strings.Contains(back, "<h2>Indítópult</h2>") {
t.Error("back on Hungarian: the page must be Hungarian with no switch")
if back := body("/launcher"); !strings.Contains(back, `action="/settings/language"`) || !strings.Contains(back, "<h2>Indítópult</h2>") {
t.Error("back on Hungarian: the page must be Hungarian, with the switch still offered")
}
}