mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17: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
|
@ -20,7 +20,7 @@ func (c *Controller) ShowLoginPage(ctx *handler.Context, request *handler.Reques
|
|||
return
|
||||
}
|
||||
|
||||
response.HTML().Render("login", tplParams{
|
||||
response.HTML().Render("login", ctx.UserLanguage(), tplParams{
|
||||
"csrf": ctx.CSRF(),
|
||||
})
|
||||
}
|
||||
|
@ -36,13 +36,13 @@ func (c *Controller) CheckLogin(ctx *handler.Context, request *handler.Request,
|
|||
|
||||
if err := authForm.Validate(); err != nil {
|
||||
logger.Error("[Controller:CheckLogin] %v", err)
|
||||
response.HTML().Render("login", tplParams)
|
||||
response.HTML().Render("login", ctx.UserLanguage(), tplParams)
|
||||
return
|
||||
}
|
||||
|
||||
if err := c.store.CheckPassword(authForm.Username, authForm.Password); err != nil {
|
||||
logger.Error("[Controller:CheckLogin] %v", err)
|
||||
response.HTML().Render("login", tplParams)
|
||||
response.HTML().Render("login", ctx.UserLanguage(), tplParams)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue