diff --git a/app/controllers/passwords_controller.rb b/app/controllers/passwords_controller.rb index 9a20498dcfd..2c96964efe9 100644 --- a/app/controllers/passwords_controller.rb +++ b/app/controllers/passwords_controller.rb @@ -38,6 +38,7 @@ def update @user.reset_api_key! if reset_params[:reset_api_key] == "true" # singular @user.api_keys.expire_all! if reset_params[:reset_api_keys] == "true" # plural delete_password_reset_session + flash[:notice] = t(".success") redirect_to signed_in? ? dashboard_path : sign_in_path else flash.now[:alert] = t(".failure") diff --git a/config/locales/de.yml b/config/locales/de.yml index b4f178cef70..4e27d72653d 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -543,6 +543,7 @@ de: Ändern deines Passworts. failure_on_missing_email: Die E-Mail darf nicht leer sein. update: + success: failure: Dein Passwort konnte nicht geändert werden. Bitte versuche es erneut. multifactor_auths: session_expired: Deine Sitzung auf der Anmeldeseite ist abgelaufen. diff --git a/config/locales/en.yml b/config/locales/en.yml index 0a7860a919c..5ec221d9e5c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -474,6 +474,7 @@ en: success: You will receive an email within the next few minutes. It contains instructions for changing your password. failure_on_missing_email: Email can't be blank. update: + success: Your password has been changed. failure: Your password could not be changed. Please try again. multifactor_auths: session_expired: Your login page session has expired. diff --git a/config/locales/es.yml b/config/locales/es.yml index db31e6a96e9..13af010f64d 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -529,6 +529,7 @@ es: success: failure_on_missing_email: update: + success: failure: multifactor_auths: session_expired: Ha expirado tu sesión en la página de acceso. diff --git a/config/locales/fr.yml b/config/locales/fr.yml index b5a87ed326f..335f12a7271 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -493,6 +493,7 @@ fr: success: failure_on_missing_email: update: + success: failure: multifactor_auths: session_expired: diff --git a/config/locales/ja.yml b/config/locales/ja.yml index cc43432f515..da473912e4e 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -473,6 +473,7 @@ ja: success: 数分でEメールが届きます。メールにはパスワードを変更する手順が記載されています。 failure_on_missing_email: Eメールは空にできません。 update: + success: failure: パスワードを変更できませんでした。もう一度お試しください。 multifactor_auths: session_expired: ログインページのセッションが期限切れになりました。 diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 4d12bdc8de0..8b80c356537 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -478,6 +478,7 @@ nl: success: failure_on_missing_email: update: + success: failure: multifactor_auths: session_expired: diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 5aa7ccc65c5..17f9db3650f 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -490,6 +490,7 @@ pt-BR: success: failure_on_missing_email: update: + success: failure: multifactor_auths: session_expired: diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index b8de0c284b4..a4f888e0680 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -480,6 +480,7 @@ zh-CN: success: failure_on_missing_email: update: + success: failure: multifactor_auths: session_expired: 您的登录页面会话已过期。 diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index e5153572d9b..8d051bfeb67 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -474,6 +474,7 @@ zh-TW: success: failure_on_missing_email: update: + success: failure: multifactor_auths: session_expired: 您的登入頁面工作階段已過期。 diff --git a/test/functional/passwords_controller_test.rb b/test/functional/passwords_controller_test.rb index 9e7ae33ac0f..74ff323c249 100644 --- a/test/functional/passwords_controller_test.rb +++ b/test/functional/passwords_controller_test.rb @@ -537,6 +537,7 @@ class PasswordsControllerTest < ActionController::TestCase end should redirect_to("the dashboard") { dashboard_path } + should set_flash[:notice].to "Your password has been changed." should "not change api_key" do assert_equal(@user.reload.api_key, @api_key) @@ -554,6 +555,7 @@ class PasswordsControllerTest < ActionController::TestCase end should redirect_to("the dashboard") { dashboard_path } + should set_flash[:notice].to "Your password has been changed." should "not change api_key" do assert_equal(@user.reload.api_key, @api_key) @@ -571,6 +573,7 @@ class PasswordsControllerTest < ActionController::TestCase end should redirect_to("the dashboard") { dashboard_path } + should set_flash[:notice].to "Your password has been changed." should "change api_key" do refute_equal(@user.reload.api_key, @api_key) @@ -592,6 +595,7 @@ class PasswordsControllerTest < ActionController::TestCase end should redirect_to("the dashboard") { dashboard_path } + should set_flash[:notice].to "Your password has been changed." should "change api_key" do refute_equal(@user.reload.api_key, @api_key)