R-516: the formal forms the gate did not count are in the te-form; the gate's stems widened

49 Hungarian values on the debug (RESET prompt), storage, network-storage, security, system,
deploy, restore and remote-backup copy moved from the formal („ön") to the product's te-form
(„írd be", „add meg", „hozz létre", „biztosan eltávolítod", „engedélyezd", „próbáld", ...).
i18n_missing_gate.py's stem list widened by 33 stems (+ one listed third-person exception,
„sora adja meg"); it counted 61 on the previous bundle and counts 0 now, ceiling stays 0.
Decoys: a widened-stem form convicts, its te-form twin and the third-person phrase pass.
38 parity fixtures changed by exactly those bytes. Seven Go-side keys listed as REWORDED in the
go-parity map. Pinned by TestR516_WidenedFormalFormsAreGone; two tests that quoted the old
words follow them.

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:
2026-10-06 02:36:55 +02:00
parent 2fc314d491
commit 4c3c2037fd
45 changed files with 253 additions and 175 deletions
+29 -3
View File
@@ -55,6 +55,20 @@ EN_FORBIDDEN = re.compile(r"\b(please|kindly)\b", re.I)
HU_FORMAL = [
"olvassa be", "kerjuk", "vegye fel", "ujratelepiti az", "importalnia", "biztosan kikapcsolja",
"ellenorizze", "csatlakoztassa", "adjon hozza", "nezze meg", "kattintson", "valassza ki",
# Widened 2026-10-06 (R-516, the forms the list above did not see on the debug, storage,
# network-storage, security and system pages). Each was in hu.json and is now te-form.
"irja be", "adja meg", "adja hozza", "adjon neki", "hozzon letre", "biztosan eltavolitja",
"engedelyezze", "probalja", "valasszon", "jelezze", "jegyezze fel", "mentse el", "kapcsolja be",
"hasznalja a", "akkor hasznalja", "szabaditson", "bovitse", "irjon be", "toltse", "folytatja?",
"biztosan ujrainditja", "ujraindithatja", "alkalmazasai ", "tavolitsa el", "jeloljon ki",
"allitsa a", "nem csatolja", "levalasztja a", "visszacsatlakoztatja", "visszaallitja a hianyzo",
"erositenie", "frissitsen", "letrehozza a",
]
# Third-person statements that contain a formal stem but address nobody (ASCII-folded). Removed from
# a value before the stems are matched; a phrase is listed here only with the key that needs it.
HU_FORMAL_NOT = [
"sora adja meg", # storage_network.ip_cim_vagy_dns_nev: "the Sharing page's line gives the address"
]
@@ -63,6 +77,13 @@ def fold(s):
return "".join(c for c in s if not unicodedata.combining(c)).lower()
def formal_text(s):
f = fold(s)
for phrase in HU_FORMAL_NOT:
f = f.replace(phrase, " ")
return f
def load(lang):
p = os.path.join(LOCALES, lang + ".json")
if not os.path.exists(p):
@@ -91,8 +112,13 @@ def main():
if "kerjuk" not in fold("Kérjük, vegye fel"):
print("i18n gate INCONCLUSIVE: positive control failed (folding does not strip accents)")
return 2
if any(stem in fold("Csatlakoztasd újra a meghajtót") for stem in HU_FORMAL):
print("i18n gate INCONCLUSIVE: negative control failed (an informal te-form sentence matched a formal stem)")
for informal in ("Csatlakoztasd újra a meghajtót",
"Írd be, add meg, hozz létre, engedélyezd, próbáld újra. Biztosan eltávolítod?"):
if any(stem in fold(informal) for stem in HU_FORMAL):
print("i18n gate INCONCLUSIVE: negative control failed (an informal te-form sentence matched a formal stem)")
return 2
if not any(stem in formal_text("Írja be a meghajtó nevét") for stem in HU_FORMAL):
print("i18n gate INCONCLUSIVE: positive control failed (a widened stem does not match its formal form)")
return 2
problems = []
@@ -113,7 +139,7 @@ def main():
problems.append("en.json %r says %r -- plain second person, no pleading" % (k, EN_FORBIDDEN.search(en[k]).group(0)))
missing = [k for k in hu if k not in en and (k + ".other") not in en]
formal = [(k, stem) for k in hu for stem in HU_FORMAL if stem in fold(hu[k])]
formal = [(k, stem) for k in hu for stem in HU_FORMAL if stem in formal_text(hu[k])]
print("i18n: %d markers in %d templates; hu %d keys, en %d keys" % (used, len(tpls), len(hu), len(en)))
print("i18n: English missing %d (ceiling %d); Hungarian formal forms %d (ceiling %d, R-516)"