R-516 item 12: the last eleven formal forms in the dashboard copy use the te-form
launcher, layout remove-dialog, deploy, debug, import, remote-backup, shared backups, system settings and the password-changed flash. Formal-form ceiling 13 -> 0 (the ratchet now refuses any new one the gate's stems see). 119 parity fixtures changed by exactly those bytes. flash.login.password_changed listed as REWORDED in the go-parity map; pinned by TestR516_FormalFormsAreGone. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"gitea.dooplex.hu/admin/felhom-controller/internal/config"
|
||||
"gitea.dooplex.hu/admin/felhom-controller/internal/i18n"
|
||||
"gitea.dooplex.hu/admin/felhom-controller/internal/monitor"
|
||||
"gitea.dooplex.hu/admin/felhom-controller/internal/settings"
|
||||
)
|
||||
@@ -111,3 +112,44 @@ func TestR516_HealthBannersFollowTheHousehold(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// R-516 item 12 — the last formal („ön") forms in the dashboard copy are in the product's te-form.
|
||||
// The i18n gate's ratchet (HU_FORMAL_CEILING = 0) keeps new ones out; this pins the reworded bytes.
|
||||
func TestR516_FormalFormsAreGone(t *testing.T) {
|
||||
b, err := i18n.Shared()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
want := map[string]string{
|
||||
"alert.deadapp.group": "%d telepített alkalmazás nem fut — nézd meg a rendszermonitort",
|
||||
"flash.login.password_changed": "Jelszó sikeresen módosítva. Jelentkezz be az új jelszóval.",
|
||||
"launcher.biztosan_kikapcsolja_a_megosztast_a": "Biztosan kikapcsolod a megosztást? A link azonnal érvénytelenné válik.",
|
||||
"launcher.olvassa_be_telefonnal_a_gyors": "Olvasd be telefonnal a gyors megnyitáshoz.",
|
||||
"deploy.a_kontener_leallt_ellenorizze_a": "A konténer leállt. Ellenőrizd a naplókat.",
|
||||
"debug.kattintson_a_gombra_a_telemetria": "Kattints a gombra a telemetria futtatásához.",
|
||||
"app_import.a_feltoltes_megszakadt_ellenorizze_a": "A feltöltés megszakadt — ellenőrizd a kapcsolatot, majd próbáld újra.",
|
||||
}
|
||||
for key, w := range want {
|
||||
got, fellBack, ok := b.Text("hu", key)
|
||||
if !ok || fellBack || got != w {
|
||||
t.Errorf("%s: %q, want %q", key, got, w)
|
||||
}
|
||||
}
|
||||
// Negative control over EVERY Hungarian value: the formal stems this row removed do not return.
|
||||
// ASCII-folded, so an accent difference cannot hide one.
|
||||
fold := strings.NewReplacer("á", "a", "é", "e", "í", "i", "ó", "o", "ö", "o", "ő", "o", "ú", "u", "ü", "u", "ű", "u")
|
||||
stems := []string{"kerjuk, jelentkezzen", "nezze meg", "olvassa be", "kattintson a", "ellenorizze", "ujratelepiti az", "vegye fel a kapcsolatot", "huzza ide"}
|
||||
for _, key := range b.Keys("hu") {
|
||||
v, _, _ := b.Text("hu", key)
|
||||
lv := fold.Replace(strings.ToLower(v))
|
||||
for _, st := range stems {
|
||||
if strings.Contains(lv, st) {
|
||||
t.Errorf("%s still carries the formal %q: %q", key, st, v)
|
||||
}
|
||||
}
|
||||
}
|
||||
// Positive control: the fold must see a te-form stem, or the loop above judged nothing.
|
||||
if lv := fold.Replace(strings.ToLower(want["deploy.a_kontener_leallt_ellenorizze_a"])); !strings.Contains(lv, "ellenorizd") {
|
||||
t.Fatal("the ASCII fold does not work — the negative control proves nothing")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user