mirror of
https://github.com/miniflux/v2.git
synced 2025-07-02 16:38:37 +00:00
Do not use shared variable to translate templates
This commit is contained in:
parent
6b360d08c1
commit
ddd3af4b85
21 changed files with 104 additions and 101 deletions
|
@ -41,13 +41,6 @@ func (h *Handler) Use(f ControllerFunc) http.Handler {
|
|||
ctx := NewContext(r, h.store, h.router, h.translator)
|
||||
request := NewRequest(r)
|
||||
response := NewResponse(h.cfg, w, r, h.template)
|
||||
language := ctx.UserLanguage()
|
||||
|
||||
if language != "" {
|
||||
h.template.SetLanguage(language)
|
||||
} else {
|
||||
h.template.SetLanguage("en_US")
|
||||
}
|
||||
|
||||
f(ctx, request, response)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue