v0.247.0: i18n spike — the dashboard can speak English, Hungarian byte-identical
gates / gates (push) Successful in 19s

Message bundles (internal/i18n) expanded into templates before parsing, one
template set per language. Launcher, /backups, /apps/<slug> and the layout
converted; household language setting, POST /settings/language, ?lang= override,
report field. Parity test against fixtures captured from unconverted templates;
copy gates read templates expanded; new i18n_missing_gate.

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 14:50:57 +02:00
parent 89dd3e94b1
commit 612c417024
49 changed files with 11734 additions and 248 deletions
+8 -1
View File
@@ -27,6 +27,9 @@ import os
import re
import sys
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
import i18n_bundle # noqa: E402
_HERE = os.path.dirname(os.path.abspath(__file__))
TEMPLATES = os.path.join(_HERE, "..", "internal", "web", "templates")
@@ -119,7 +122,11 @@ def scan():
sources.append((os.path.basename(gp), gp, GO_COMMENT))
files = files + [os.path.basename(gp)]
for name, path, stripper in sources:
text = stripper.sub("", open(path, encoding="utf-8").read())
# v0.247.0: a template's copy lives in the i18n bundle; judge the page as it renders in
# Hungarian (the stems are Hungarian). English retrieval claims are not scanned yet -- R-row
# in 10-localisation.md; the English bundle covers three pages today.
raw = open(path, encoding="utf-8").read()
text = stripper.sub("", i18n_bundle.expand(raw, "hu") if path.endswith(".html") else raw)
for stem in STEMS:
for m in re.finditer(re.escape(stem) + r"[a-záéíóöőúüű]*", text):
line = text[: m.start()].count("\n") + 1