controller: Tier-3 rename — customer-facing 'NAS-mentés' branding becomes 'Távoli mentés' (backups page, offbox flashes, quota copy); manual-target form generalized to any SFTP target; offbox_rename_gate.py enforces zero regressions

Claude-Session: https://claude.ai/code/session_01GzammAMzsJTgpQHqxwM2bC
This commit is contained in:
2026-07-13 08:23:43 +02:00
parent 8987ce0f67
commit a00afcc79d
4 changed files with 83 additions and 26 deletions
+57
View File
@@ -0,0 +1,57 @@
# -*- coding: utf-8 -*-
"""Offbox-rename gate (v0.123.0) — the Tier-3 feature is branded "Távoli mentés" everywhere
customer-facing: the productized target is the Storage Box and the tier concept is "offsite",
so "NAS-mentés"-style branding must not reappear in the offbox feature's customer strings.
Python, not grep: Hungarian multibyte (the Windows-grep false-negative rule).
Scope: ONLY the offbox feature's files. The "Hálózati tárhely" NAS network-storage feature is a
DIFFERENT feature and keeps its device-truthful NAS wording (its files are not scanned). Allowed
by construction (no banned token): the intro's "saját NAS vagy Felhom offsite tárhely" and the
manual-target form's "NAS vagy SFTP-kiszolgáló" mentions, comments, code identifiers/routes.
Run from controller/: python scripts/offbox_rename_gate.py
"""
import io, os, sys
FILES = [
os.path.join("internal", "web", "templates", "backups.html"),
os.path.join("internal", "web", "offbox_handlers.go"),
os.path.join("internal", "backup", "offbox.go"),
]
BANNED = [
"NAS-mentés",
"NAS mentési",
"NAS-visszaállítás",
"a NAS-ra",
"a NAS-ról",
"NAS címe",
"a NAS-on",
"NAS ismert-host",
]
def is_comment(line):
s = line.strip()
return s.startswith("//") or s.startswith("<!--") or s.startswith("/*") or s.startswith("*")
def main():
total = 0
for path in FILES:
for lineno, line in enumerate(io.open(path, encoding="utf-8"), 1):
if is_comment(line):
continue
for tok in BANNED:
if tok in line:
total += 1
print("%s:%d [%s] %s" % (path, lineno, tok,
line.strip()[:100].encode("ascii", "backslashreplace").decode()))
if total:
print("OFFBOX RENAME GATE FAILED: %d customer-facing NAS-branding string(s) remain" % total)
sys.exit(1)
print("offbox rename gate OK — Tier-3 is 'Tavoli mentes' everywhere customer-facing")
if __name__ == "__main__":
main()