diff options
Diffstat (limited to 'internal/ui')
-rw-r--r-- | internal/ui/category_refresh.go | 4 | ||||
-rw-r--r-- | internal/ui/feed_refresh.go | 2 | ||||
-rw-r--r-- | internal/ui/integration_pocket.go | 6 | ||||
-rw-r--r-- | internal/ui/integration_update.go | 6 | ||||
-rw-r--r-- | internal/ui/oauth2_callback.go | 6 | ||||
-rw-r--r-- | internal/ui/oauth2_unlink.go | 4 |
6 files changed, 14 insertions, 14 deletions
diff --git a/internal/ui/category_refresh.go b/internal/ui/category_refresh.go index adbf015a..e3eed10e 100644 --- a/internal/ui/category_refresh.go +++ b/internal/ui/category_refresh.go @@ -33,7 +33,7 @@ func (h *handler) refreshCategory(w http.ResponseWriter, r *http.Request) int64 // Avoid accidental and excessive refreshes. if time.Now().UTC().Unix()-request.LastForceRefresh(r) < 1800 { - sess.NewFlashErrorMessage(printer.Printf("alert.too_many_feeds_refresh")) + sess.NewFlashErrorMessage(printer.Print("alert.too_many_feeds_refresh")) } else { // We allow the end-user to force refresh all its feeds in this category // without taking into consideration the number of errors. @@ -58,7 +58,7 @@ func (h *handler) refreshCategory(w http.ResponseWriter, r *http.Request) int64 go h.pool.Push(jobs) sess.SetLastForceRefresh() - sess.NewFlashMessage(printer.Printf("alert.background_feed_refresh")) + sess.NewFlashMessage(printer.Print("alert.background_feed_refresh")) } return categoryID diff --git a/internal/ui/feed_refresh.go b/internal/ui/feed_refresh.go index b1147073..ec609156 100644 --- a/internal/ui/feed_refresh.go +++ b/internal/ui/feed_refresh.go @@ -63,7 +63,7 @@ func (h *handler) refreshAllFeeds(w http.ResponseWriter, r *http.Request) { go h.pool.Push(jobs) sess.SetLastForceRefresh() - sess.NewFlashMessage(printer.Printf("alert.background_feed_refresh")) + sess.NewFlashMessage(printer.Print("alert.background_feed_refresh")) } html.Redirect(w, r, route.Path(h.router, "feeds")) diff --git a/internal/ui/integration_pocket.go b/internal/ui/integration_pocket.go index 7da6b072..13e17295 100644 --- a/internal/ui/integration_pocket.go +++ b/internal/ui/integration_pocket.go @@ -39,7 +39,7 @@ func (h *handler) pocketAuthorize(w http.ResponseWriter, r *http.Request) { slog.Any("user_id", user.ID), slog.Any("error", err), ) - sess.NewFlashErrorMessage(printer.Printf("error.pocket_request_token")) + sess.NewFlashErrorMessage(printer.Print("error.pocket_request_token")) html.Redirect(w, r, route.Path(h.router, "integrations")) return } @@ -71,7 +71,7 @@ func (h *handler) pocketCallback(w http.ResponseWriter, r *http.Request) { slog.Any("user_id", user.ID), slog.Any("error", err), ) - sess.NewFlashErrorMessage(printer.Printf("error.pocket_access_token")) + sess.NewFlashErrorMessage(printer.Print("error.pocket_access_token")) html.Redirect(w, r, route.Path(h.router, "integrations")) return } @@ -85,6 +85,6 @@ func (h *handler) pocketCallback(w http.ResponseWriter, r *http.Request) { return } - sess.NewFlashMessage(printer.Printf("alert.pocket_linked")) + sess.NewFlashMessage(printer.Print("alert.pocket_linked")) html.Redirect(w, r, route.Path(h.router, "integrations")) } diff --git a/internal/ui/integration_update.go b/internal/ui/integration_update.go index b8bfed44..c54ec625 100644 --- a/internal/ui/integration_update.go +++ b/internal/ui/integration_update.go @@ -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")) } diff --git a/internal/ui/oauth2_callback.go b/internal/ui/oauth2_callback.go index cf223da8..09c03b80 100644 --- a/internal/ui/oauth2_callback.go +++ b/internal/ui/oauth2_callback.go @@ -81,7 +81,7 @@ func (h *handler) oauth2Callback(w http.ResponseWriter, r *http.Request) { slog.String("oauth2_provider", provider), slog.String("oauth2_profile_id", profile.ID), ) - sess.NewFlashErrorMessage(printer.Printf("error.duplicate_linked_account")) + sess.NewFlashErrorMessage(printer.Print("error.duplicate_linked_account")) html.Redirect(w, r, route.Path(h.router, "settings")) return } @@ -92,7 +92,7 @@ func (h *handler) oauth2Callback(w http.ResponseWriter, r *http.Request) { return } - sess.NewFlashMessage(printer.Printf("alert.account_linked")) + sess.NewFlashMessage(printer.Print("alert.account_linked")) html.Redirect(w, r, route.Path(h.router, "settings")) return } @@ -110,7 +110,7 @@ func (h *handler) oauth2Callback(w http.ResponseWriter, r *http.Request) { } if h.store.UserExists(profile.Username) { - html.BadRequest(w, r, errors.New(printer.Printf("error.user_already_exists"))) + html.BadRequest(w, r, errors.New(printer.Print("error.user_already_exists"))) return } diff --git a/internal/ui/oauth2_unlink.go b/internal/ui/oauth2_unlink.go index 8a698a3e..83b1fcfa 100644 --- a/internal/ui/oauth2_unlink.go +++ b/internal/ui/oauth2_unlink.go @@ -47,7 +47,7 @@ func (h *handler) oauth2Unlink(w http.ResponseWriter, r *http.Request) { } if !hasPassword { - sess.NewFlashErrorMessage(printer.Printf("error.unlink_account_without_password")) + sess.NewFlashErrorMessage(printer.Print("error.unlink_account_without_password")) html.Redirect(w, r, route.Path(h.router, "settings")) return } @@ -58,6 +58,6 @@ func (h *handler) oauth2Unlink(w http.ResponseWriter, r *http.Request) { return } - sess.NewFlashMessage(printer.Printf("alert.account_unlinked")) + sess.NewFlashMessage(printer.Print("alert.account_unlinked")) html.Redirect(w, r, route.Path(h.router, "settings")) } |