i18n slice 1 release C: storage, sharing, sign-in, guest, catch-all and debug pages in English
- 11 templates converted (storage, storage_network, storage_init, storage_attach, sharing, login,
claim, launcher_shared, launcher_share_password, catchall, debug); every key translated.
Six ASCII-only Hungarian JS fragments the extractor missed were found by eye and converted by hand
(", majd a(z)", "FIGYELEM:", "jelenlegi:", "mp", "p", " db").
- login, claim, both guest share pages and the catch-all render through executeTemplateLang (the
household language; no session CSRF, no escrow reminder). renderLogin now takes the request.
- Page titles: TitleKey for storage, network storage, the two drive wizards and sharing.
TestHandlerTitleKeysMatchHungarianTitle pins handler literal == hu.json value for every TitleKey.
- Tests: TestDirectRenderHandlersFollowLanguage (real routes, en + hu),
TestI18nDirectRenderPagesHaveNoAdminChrome (escrow reminder due; none on the guest page).
- Fixture correction: the release C cases had invented page titles; the cases now carry the handlers'
real titles (and the wizard pages their real page name), and those 12 fixtures were RE-CAPTURED from
the unconverted templates at 0555091. The diff to the old fixtures is the <title> line (and the nav
highlight on the two wizard pages) only.
- i18n gate: HU_FORMAL_CEILING 12 -> 16 — four more „ön" forms in the converted copy, unchanged by rule (R-516).
Hungarian: byte-identical (TestI18nParity against fixtures from unconverted templates).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -176,12 +176,12 @@ func (s *Server) dashboardHandler(w http.ResponseWriter, r *http.Request) {
|
||||
sysInfo := system.GetInfo(s.primaryHDDPath(), s.cpuCollector)
|
||||
|
||||
data := s.baseData("dashboard", "Vezérlőpult")
|
||||
data["TitleKey"] = "page.title.dashboard" // i18n: the Hungarian title above is what hu renders
|
||||
data["TitleKey"] = "page.title.dashboard" // i18n: the Hungarian title above is what hu renders
|
||||
s.addRecoveryBanner(data, r) // R-241: the reminder bar, per visit
|
||||
data["SettingsWarning"] = s.settings.LoadWarning // non-empty if settings.json was recovered from corruption
|
||||
data["Stacks"] = deployedStacks
|
||||
data["MissingStorage"] = s.missingStorageMap(deployedStacks)
|
||||
data["OOMKilled"] = s.stackMgr.OOMKilledStacks() // R-514
|
||||
data["OOMKilled"] = s.stackMgr.OOMKilledStacks() // R-514
|
||||
nw, ns := s.networkStorageWarnings(deployedStacks) // NAS unreachable (recoverable) / guest-side stub (defect)
|
||||
data["NetworkWarnings"] = nw
|
||||
data["NetworkStubs"] = ns
|
||||
@@ -316,7 +316,7 @@ func (s *Server) launcherApps() []LauncherApp {
|
||||
func (s *Server) launcherHandler(w http.ResponseWriter, r *http.Request) {
|
||||
data := s.baseData("launcher", "Indítópult")
|
||||
data["TitleKey"] = "page.title.launcher" // i18n: the Hungarian title above is what hu renders
|
||||
s.addRecoveryBanner(data, r) // R-241: the reminder bar, per visit
|
||||
s.addRecoveryBanner(data, r) // R-241: the reminder bar, per visit
|
||||
data["Apps"] = s.launcherApps()
|
||||
|
||||
// Share modal state. The share URL is built from the request Host at render time (the canonical
|
||||
@@ -1042,7 +1042,7 @@ func (s *Server) backupsRemoteHandler(w http.ResponseWriter, r *http.Request) {
|
||||
func (s *Server) backupsAppsHandler(w http.ResponseWriter, r *http.Request) {
|
||||
data := s.backupsCommonData("backups-apps", "Biztonsági mentés — Alkalmazások", r)
|
||||
data["TitleKey"] = "page.title.backups_apps" // i18n: the Hungarian title above is what hu renders
|
||||
s.backupsOffboxData(data) // the tier-3 rows render $.Offbox status
|
||||
s.backupsOffboxData(data) // the tier-3 rows render $.Offbox status
|
||||
|
||||
if fullStatus, ok := data["Backup"].(*backup.FullBackupStatus); ok && fullStatus != nil {
|
||||
// Enrich AppDataInfo with storage labels
|
||||
@@ -2102,6 +2102,7 @@ func (s *Server) systemPageData() map[string]interface{} {
|
||||
// data the unified agent-enriched drive view needs.
|
||||
func (s *Server) storagePageData() map[string]interface{} {
|
||||
data := s.settingsBaseData("storage", "Tárhely")
|
||||
data["TitleKey"] = "page.title.storage" // i18n: the Hungarian title above is what hu renders
|
||||
|
||||
// Storage paths with display data
|
||||
storagePaths := s.settings.GetStoragePaths()
|
||||
@@ -2154,6 +2155,7 @@ func (s *Server) storagePageData() map[string]interface{} {
|
||||
// drive page — the two storage classes were confusingly interleaved on one page.
|
||||
func (s *Server) networkStoragePageData() map[string]interface{} {
|
||||
data := s.settingsBaseData("storage-network", "Hálózati tárhely")
|
||||
data["TitleKey"] = "page.title.storage_network" // i18n: the Hungarian title above is what hu renders
|
||||
data["NetworkStoragePaths"] = s.networkStorageItems(context.Background())
|
||||
// Capability banner: "no" swaps the add form for the agent-outdated notice (yes/unknown render
|
||||
// the form — flaky states belong to the add-time gate). Short-budget probe, cache-backed.
|
||||
|
||||
Reference in New Issue
Block a user