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:
@@ -6,9 +6,9 @@ import (
|
||||
"fmt"
|
||||
"html/template"
|
||||
"io/fs"
|
||||
"path"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"regexp"
|
||||
@@ -51,14 +51,19 @@ func i18nFixtureTime() time.Time { return time.Date(2026, 9, 14, 3, 12, 0, 0, ti
|
||||
// i18nTitleKeys mirrors the handlers' data["TitleKey"]: a page whose Go-side title has a key renders it
|
||||
// translated in English, exactly as addLanguageData does in production.
|
||||
var i18nTitleKeys = map[string]string{
|
||||
"Indítópult": "page.title.launcher",
|
||||
"Biztonsági mentés": "page.title.backups",
|
||||
"Vezérlőpult": "page.title.dashboard",
|
||||
"Alkalmazások": "page.title.stacks",
|
||||
"Rendszermonitor": "page.title.monitoring",
|
||||
"Beállítások": "page.title.settings",
|
||||
"Értesítések": "page.title.settings_notifications",
|
||||
"Biztonság és hozzáférés": "page.title.settings_security",
|
||||
"Indítópult": "page.title.launcher",
|
||||
"Biztonsági mentés": "page.title.backups",
|
||||
"Vezérlőpult": "page.title.dashboard",
|
||||
"Alkalmazások": "page.title.stacks",
|
||||
"Rendszermonitor": "page.title.monitoring",
|
||||
"Beállítások": "page.title.settings",
|
||||
"Értesítések": "page.title.settings_notifications",
|
||||
"Biztonság és hozzáférés": "page.title.settings_security",
|
||||
"Tárhely": "page.title.storage",
|
||||
"Hálózati tárhely": "page.title.storage_network",
|
||||
"Új meghajtó inicializálása": "page.title.storage_init",
|
||||
"Meglévő meghajtó csatolása": "page.title.storage_attach",
|
||||
"Hálózati megosztás": "page.title.sharing",
|
||||
}
|
||||
|
||||
func i18nLayoutData(page, title string) map[string]interface{} {
|
||||
|
||||
Reference in New Issue
Block a user