v0.253.0 — errors carry the key of the sentence they are (R-557 slice 2 release B)
gates / gates (push) Successful in 24s

179 Hungarian sentences were built deep inside a package with fmt.Errorf and printed by
whoever caught them: too late to translate where they are shown, too early where they are
made. Every one now carries its key across that gap. ZERO Hungarian error literals remain.

util.MsgError does three things at once, each earned:
  - Error() is the Hungarian, byte for byte, so every un-converted printer is unchanged;
  - errors.Is answers for the kind AND for a wrapped cause (KindErrorf dropped the cause);
  - an error ARGUMENT renders recursively, so "formázás sikertelen: %w" translates whole.
A foreign error — restic, docker, ssh, the stdlib — prints verbatim. It is not ours.

76 display sites go through errText, and TestNoErrErrorInPageOutput convicts any that do
not. memoryVerdict returns an error rather than a sentence, so the deploy's 409 and the
household's language come from one value; UpdateRefusal gained a Cause to carry it.

Plurals, one rule, stated once: a key with .one/.other takes its COUNT first. Not a
per-call-site flag — the producer somebody forgot would read "3 app is not running". The
guard caught a real key collision (alert.deadapp.one) the day the rule landed.

TWO DEFECTS FOUND IN MY OWN TOOLING, recorded rather than quietly fixed. The bulk converter
silently dropped multi-line concatenations, damaging 7 producers — and the parity gate could
not see it, because every surviving fragment WAS a real base literal while the CALL had lost
text; two behaviour tests caught it. And the counting script was case-sensitive, so it said
"0 left" while five remained.

MinAgent: 0.131.0 (unchanged). No hub release needed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
2026-09-18 11:44:30 +02:00
parent 5270bad76e
commit 7c05b59708
70 changed files with 1853 additions and 377 deletions
+12 -2
View File
@@ -3614,7 +3614,7 @@ without reaching `Images()`.
---
### 18. Dashboard language (i18n) (v0.247.0–v0.252.0)
### 18. Dashboard language (i18n) (v0.247.0–v0.253.0)
Design: `felhom.eu/documentation/architecture/10-localisation.md`. Inventory:
`felhom.eu/documentation/audits/I18N-INVENTORY-2026-09-17.md`.
@@ -3624,7 +3624,8 @@ sidebar footer of every dashboard page. Every template is converted (v0.247.0 th
apps and settings, v0.249.0 backups, v0.250.0 storage, sharing, sign-in, claim, guest share, catch-all,
debug). Since **v0.252.0** the sentences the program BUILDS follow the language too — flash lines, page
data, the JSON the page's script reads, the alert banners, the country names, and the four page titles
built around an app name. Still Hungarian: `fmt.Errorf` messages (release B), text persisted by a
built around an app name. Since **v0.253.0** every error message carries its key too, so a refusal made deep in a package is
rendered in the household's language by whoever prints it. Still Hungarian: text persisted by a
background run (release C), catalog copy (slice 5), and **everything the hub reads** (see below).
- **Bundles:** `internal/i18n/locales/hu.json` (authoritative, every key) and `en.json`, embedded.
@@ -3670,6 +3671,15 @@ background run (release C), catalog copy (slice 5), and **everything the hub rea
controller's own sentence when it has no entry (`FormatCustomerEmail`), so translating them here would
change an e-mail nobody asked to change. They follow the language in slice 3 (R-558). Pinned by wire
goldens in `internal/monitor` and `internal/notify`.
- **Errors (v0.253.0):** `util.MsgError(key, args…)` / `util.MsgErrorf(kind, key, args…)` carry the
bundle key from the package that MAKES the error to the handler that PRINTS it. `Error()` returns the
Hungarian byte for byte (so an un-converted printer is unchanged); `Unwrap() []error` returns the kind
and any wrapped cause, so `errors.Is` answers for both; an error ARGUMENT renders recursively, and a
foreign error (restic, docker, ssh, stdlib) prints verbatim. Display ends call `s.errText(r, err)` /
`r.errText(req, err)` — `TestNoErrErrorInPageOutput` convicts any sink that does not.
- **Plurals (v0.253.0):** a key that carries `.one`/`.other` in a language is a plural key and its FIRST
parameter is the count (`i18n.Bundle.form`). Hungarian has one form at every count. `.one`/`.other`
are RESERVED suffixes — `TestNoOrdinaryKeyEndsInAPluralSuffix`.
- **Report:** the hub report carries `"language"` (always present). No hub release reads it yet.
- **Tools and gates:** `scripts/i18n_extract.py` converts a template (moves each Hungarian run into
hu.json, leaves a marker); `scripts/i18n_missing_gate.py` (in `controller_gates.py`) checks keys