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
+15 -1
View File
@@ -7,6 +7,9 @@ Exit 1 if any emoji/pictograph remains in web+setup templates.
"""
import io, os, sys, unicodedata
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
import i18n_bundle # noqa: E402
ROOTS = [
os.path.join("internal", "web", "templates"),
os.path.join("internal", "setup", "templates"),
@@ -35,8 +38,19 @@ ALLOW = set("✓✗✔✘•●○■▶") # ✓ ✗ ✔ ✘ • ● ○ ■
def scan(path):
# v0.247.0: the copy of a converted template lives in the i18n bundle -- scan every language's
# expansion, so an emoji in a translation is caught where it would render.
hits = []
for lineno, line in enumerate(io.open(path, encoding="utf-8"), 1):
for lang in i18n_bundle.LANGS:
for h in _scan_text(i18n_bundle.read_template(path, lang)):
if h not in hits:
hits.append(h)
return hits
def _scan_text(text):
hits = []
for lineno, line in enumerate(text.split("\n"), 1):
for ch in line:
if ch in ALLOW:
continue