1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Make use of printer.Print when possible

This commit is contained in:
jvoisin 2024-02-27 17:19:38 +01:00 committed by Frédéric Guillot
parent b4ed17fbac
commit 5a7d6f8997
8 changed files with 22 additions and 22 deletions

View file

@ -36,7 +36,7 @@ func (h *handler) updateIntegration(w http.ResponseWriter, r *http.Request) {
integrationForm.Merge(integration)
if integration.FeverUsername != "" && h.store.HasDuplicateFeverUsername(user.ID, integration.FeverUsername) {
sess.NewFlashErrorMessage(printer.Printf("error.duplicate_fever_username"))
sess.NewFlashErrorMessage(printer.Print("error.duplicate_fever_username"))
html.Redirect(w, r, route.Path(h.router, "integrations"))
return
}
@ -50,7 +50,7 @@ func (h *handler) updateIntegration(w http.ResponseWriter, r *http.Request) {
}
if integration.GoogleReaderUsername != "" && h.store.HasDuplicateGoogleReaderUsername(user.ID, integration.GoogleReaderUsername) {
sess.NewFlashErrorMessage(printer.Printf("error.duplicate_googlereader_username"))
sess.NewFlashErrorMessage(printer.Print("error.duplicate_googlereader_username"))
html.Redirect(w, r, route.Path(h.router, "integrations"))
return
}
@ -85,6 +85,6 @@ func (h *handler) updateIntegration(w http.ResponseWriter, r *http.Request) {
return
}
sess.NewFlashMessage(printer.Printf("alert.prefs_saved"))
sess.NewFlashMessage(printer.Print("alert.prefs_saved"))
html.Redirect(w, r, route.Path(h.router, "integrations"))
}