v0.249.0: i18n slice 1 release B — backup pages in English, Hungarian byte-identical (R-556)
gates / gates (push) Successful in 20s
gates / gates (push) Successful in 20s
Seven backup pages + the restore-progress JS converted against fixtures captured unconverted
(f8ebc47); recovery renders through executeTemplateLang; English retrieval claims registered;
the Fut comparison left unconverted (R-563).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"io"
|
||||
"io/fs"
|
||||
"log"
|
||||
"net/http"
|
||||
@@ -869,6 +870,19 @@ func (s *Server) executeTemplate(w http.ResponseWriter, r *http.Request, name st
|
||||
buf.WriteTo(w)
|
||||
}
|
||||
|
||||
// executeTemplateLang renders a page that stands OUTSIDE the dashboard chrome — sign-in, claim,
|
||||
// recovery, the guest share pages, the catch-all — in the request's language (slice 1, R-556).
|
||||
// Deliberately NOT executeTemplate: that one injects the session CSRF fields and the escrow reminder bar
|
||||
// (R-543), which a guest or a signed-out visitor must never receive. It only picks the language set and
|
||||
// tells the page which language it is in. The caller keeps its own headers and error handling.
|
||||
func (s *Server) executeTemplateLang(w io.Writer, r *http.Request, name string, data map[string]interface{}) error {
|
||||
lang := s.langFor(r)
|
||||
if data != nil {
|
||||
data["Lang"] = lang
|
||||
}
|
||||
return s.templatesFor(lang).ExecuteTemplate(w, name, data)
|
||||
}
|
||||
|
||||
// --- Static file / asset serving ---
|
||||
|
||||
func (s *Server) serveCSSHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user