stabilization: server.go split + i18n templates + frontend localization

cmd/verstak-server/server.go (2838→127 строк): разделён на 12 файлов
- config.go, tokens.go, schema.go
- server.go (только struct + NewServer + ListenAndServe)
- routes.go, middleware.go, smtp.go
- handlers_api.go, handlers_user.go, handlers_web_user.go, handlers_admin.go
- templates.go (конвертирован в функции с i18n.T())

frontend: все русские строки заменены на t() вызовы
- App.svelte, FileTreeRow.svelte, ConfirmModal.svelte
- FilePreviewModal.svelte, fileUtils.js

core: gofmt по всему проекту

Все сборки (CLI, server, gui, frontend), go vet, go test проходят.
check-i18n.sh: frontend чист, Go-файлы с кириллицей — только тесты/легаси.
This commit is contained in:
2026-06-02 11:08:29 +08:00
parent 3089d777a8
commit 2fa583d157
33 changed files with 3276 additions and 3067 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ type Record struct {
ID string `json:"id"`
NodeID string `json:"node_id"`
Filename string `json:"filename"`
Path string `json:"path"` // relative to vault root
Path string `json:"path"` // relative to vault root
StorageMode string `json:"storage_mode"` // "vault" | "external"
Size int64 `json:"size"`
SHA256 string `json:"sha256,omitempty"`
+5 -5
View File
@@ -307,11 +307,11 @@ func TestPreviewImportDir(t *testing.T) {
func TestGuessMIME(t *testing.T) {
cases := map[string]string{
"a.md": "text/plain",
"a.png": "image/png",
"a.pdf": "application/pdf",
"a.docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"a.go": "text/plain",
"a.md": "text/plain",
"a.png": "image/png",
"a.pdf": "application/pdf",
"a.docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"a.go": "text/plain",
"a.unknown": "application/octet-stream",
}
for name, want := range cases {