diff options
author | Frédéric Guillot <fred@miniflux.net> | 2018-04-27 22:07:46 -0700 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2018-04-27 22:07:46 -0700 |
commit | ddd3af4b85f5a2fe85c17a9cc30cf54743b9eb59 (patch) | |
tree | 539b491fc9f67980b09a6ccd282454614a77f8b4 /http/handler/html_response.go | |
parent | 6b360d08c1f6c8a6cd1b7608f7af734a3ceef8d7 (diff) |
Do not use shared variable to translate templates
Diffstat (limited to 'http/handler/html_response.go')
-rw-r--r-- | http/handler/html_response.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/http/handler/html_response.go b/http/handler/html_response.go index 26e5270..4d0dbe5 100644 --- a/http/handler/html_response.go +++ b/http/handler/html_response.go @@ -19,9 +19,9 @@ type HTMLResponse struct { } // Render execute a template and send to the client the generated HTML. -func (h *HTMLResponse) Render(template string, args map[string]interface{}) { +func (h *HTMLResponse) Render(template, language string, args map[string]interface{}) { h.writer.Header().Set("Content-Type", "text/html; charset=utf-8") - h.template.Execute(h.writer, template, args) + h.template.Render(h.writer, template, language, args) } // ServerError sends a 500 error to the browser. |