v0.253.0 — errors carry the key of the sentence they are (R-557 slice 2 release B)
gates / gates (push) Successful in 24s
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:
@@ -8,6 +8,7 @@ import (
|
||||
"crypto/sha256"
|
||||
"errors"
|
||||
"fmt"
|
||||
"gitea.dooplex.hu/admin/felhom-controller/internal/util"
|
||||
"io"
|
||||
"os"
|
||||
|
||||
@@ -221,7 +222,7 @@ func DecryptFile(inputPath, outputPath, password string) error {
|
||||
}
|
||||
if !hmac.Equal(mac.Sum(nil), storedMAC) {
|
||||
os.Remove(outputPath)
|
||||
return errors.New("jelszó hibás vagy a fájl sérült")
|
||||
return util.MsgError("err.appexport.jelszo_hibas_vagy_a_fajl_serult")
|
||||
}
|
||||
|
||||
return out.Sync()
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"compress/gzip"
|
||||
"context"
|
||||
"fmt"
|
||||
"gitea.dooplex.hu/admin/felhom-controller/internal/util"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
@@ -696,7 +697,7 @@ func (e *Exporter) exportHDDData(req ExportRequest, dataDir string, manifest *Ma
|
||||
// Renaming can't help either (the import couldn't map the new name), so the only honest
|
||||
// outcome is a loud failure.
|
||||
if prev, dup := claimed[subdir]; dup {
|
||||
return fmt.Errorf("két adatkönyvtár azonos névvel végződik (%q: %s és %s) — a csomag nem tudná megkülönböztetni őket", subdir, prev, mount)
|
||||
return util.MsgError("err.appexport.ket_adatkonyvtar_azonos_nevvel_vegzodik_es", subdir, prev, mount)
|
||||
}
|
||||
claimed[subdir] = mount
|
||||
|
||||
@@ -845,7 +846,7 @@ func assertBundleDataComplete(tmpDir string, manifest *Manifest) error {
|
||||
// bundle. A needs_hdd app with NO data of any kind is a hollow bundle by definition; refuse it
|
||||
// loudly so a future discovery gap can never again ship silently.
|
||||
if manifest.NeedsHDD && !manifest.HasHDDData && !manifest.HasVolumeData {
|
||||
return fmt.Errorf("a mentés nem tartalmaz alkalmazásadatot (0 adatkönyvtár, 0 kötet egy adattárolós alkalmazásnál)")
|
||||
return util.MsgError("err.appexport.a_mentes_nem_tartalmaz_alkalmazasadatot_0")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -22,13 +22,13 @@ type fabProv struct {
|
||||
mounts []string
|
||||
}
|
||||
|
||||
func (p *fabProv) GetStackHDDPath(string) string { return p.hddPath }
|
||||
func (p *fabProv) GetImportRoot() string { return "" } // R-75: no import binds in this fixture
|
||||
func (p *fabProv) GetStackHDDPath(string) string { return p.hddPath }
|
||||
func (p *fabProv) GetImportRoot() string { return "" } // R-75: no import binds in this fixture
|
||||
|
||||
// R-203: these fixtures use ENROLLED drive paths, where the namespace root IS the drive path.
|
||||
// Delegating keeps that identity explicit rather than hardcoding it.
|
||||
func (p *fabProv) GetStackNamespaceRoot(name string) string { return p.GetStackHDDPath(name) }
|
||||
func (p *fabProv) GetStackHDDMounts(string) []string { return p.mounts }
|
||||
func (p *fabProv) GetStackHDDMounts(string) []string { return p.mounts }
|
||||
func (p *fabProv) GetStackClassifiedBinds(string) ([]appbackup.ClassifiedBind, bool) {
|
||||
return p.binds, p.has
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"compress/gzip"
|
||||
"context"
|
||||
"fmt"
|
||||
"gitea.dooplex.hu/admin/felhom-controller/internal/util"
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
@@ -168,7 +169,7 @@ func ReadManifestFromEncryptedFAB(fabPath, password string) (*Manifest, error) {
|
||||
defer os.Remove(tmpPath)
|
||||
|
||||
if err := DecryptFile(fabPath, tmpPath, password); err != nil {
|
||||
return nil, fmt.Errorf("visszafejtés sikertelen: %w", err)
|
||||
return nil, util.MsgError("err.appexport.visszafejtes_sikertelen", err)
|
||||
}
|
||||
|
||||
return ReadManifestFromFAB(tmpPath)
|
||||
@@ -689,7 +690,7 @@ func validateBundleData(tmpDir string, manifest *Manifest) error {
|
||||
}
|
||||
fi, err := os.Stat(filepath.Join(tmpDir, "data", "volumes", v+".tar"))
|
||||
if err != nil || fi.Size() == 0 {
|
||||
return fmt.Errorf("a(z) %q kötet adata hiányzik a csomagból", v)
|
||||
return util.MsgError("err.appexport.a_z_kotet_adata_hianyzik_a", v)
|
||||
}
|
||||
}
|
||||
for _, s := range manifest.HDDSubdirs {
|
||||
@@ -698,7 +699,7 @@ func validateBundleData(tmpDir string, manifest *Manifest) error {
|
||||
}
|
||||
fi, err := os.Stat(filepath.Join(tmpDir, "data", "hdd", s+".tar"))
|
||||
if err != nil || fi.Size() == 0 {
|
||||
return fmt.Errorf("a(z) %q adatkönyvtár tartalma hiányzik a csomagból", s)
|
||||
return util.MsgError("err.appexport.a_z_adatkonyvtar_tartalma_hianyzik_a", s)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user