From d97b4bdf916e4876916900df882ded9296b95ea7 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Thu, 10 Mar 2022 18:31:37 +0000 Subject: [PATCH] Use translation strings --- app/controllers/auth/passwords_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/auth/passwords_controller.rb b/app/controllers/auth/passwords_controller.rb index acbe63e07..c1222764b 100644 --- a/app/controllers/auth/passwords_controller.rb +++ b/app/controllers/auth/passwords_controller.rb @@ -5,10 +5,10 @@ class Auth::PasswordsController < Devise::PasswordsController self.resource = resource_class.new @email = params["email"] if @email.empty? - resource.errors.add :email, "Enter an email address" + resource.errors.add :email, I18n.t("validations.email.blank") render "devise/passwords/new", status: :unprocessable_entity elsif !email_valid?(@email) - resource.errors.add :email, "Enter an email address in the correct format, like name@example.com" + resource.errors.add :email, I18n.t("validations.email.invalid") render "devise/passwords/new", status: :unprocessable_entity else render "devise/confirmations/reset"