1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

Simplify locale package usage (refactoring)

This commit is contained in:
Frédéric Guillot 2018-09-22 15:04:55 -07:00
parent aae9b4eb83
commit b1e8f534ef
26 changed files with 443 additions and 299 deletions

View file

@ -69,6 +69,6 @@ func (c *Controller) UpdateSettings(w http.ResponseWriter, r *http.Request) {
sess.SetLanguage(user.Language)
sess.SetTheme(user.Theme)
sess.NewFlashMessage(c.translator.GetLanguage(request.UserLanguage(r)).Get("alert.prefs_saved"))
sess.NewFlashMessage(locale.NewPrinter(request.UserLanguage(r)).Printf("alert.prefs_saved"))
response.Redirect(w, r, route.Path(c.router, "settings"))
}