diff options
author | Bob Van Landuyt <bob@gitlab.com> | 2019-05-31 12:06:24 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@gitlab.com> | 2019-05-31 12:06:24 +0300 |
commit | faf506ea770bab6b746183790316e069e51e901c (patch) | |
tree | c12870bc6ac5484f63a0db2c5ea5bea6a3dec670 /app/controllers | |
parent | b095a0818d148cf930b979008dba333660bb813b (diff) | |
parent | ffb3fa52cafe437be87abbc9c8b3366df2fa1f80 (diff) |
Merge branch 'i18n-password-of-user-profile' into 'master'
Externalize strings of password page in user profile
See merge request gitlab-org/gitlab-ce!28744
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/profiles/passwords_controller.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/profiles/passwords_controller.rb b/app/controllers/profiles/passwords_controller.rb index 7038447581c..d2787c2e450 100644 --- a/app/controllers/profiles/passwords_controller.rb +++ b/app/controllers/profiles/passwords_controller.rb @@ -14,7 +14,7 @@ class Profiles::PasswordsController < Profiles::ApplicationController def create unless @user.password_automatically_set || @user.valid_password?(user_params[:current_password]) - redirect_to new_profile_password_path, alert: 'You must provide a valid current password' + redirect_to new_profile_password_path, alert: _('You must provide a valid current password') return end @@ -29,7 +29,7 @@ class Profiles::PasswordsController < Profiles::ApplicationController if result[:status] == :success Users::UpdateService.new(current_user, user: @user, password_expires_at: nil).execute - redirect_to root_path, notice: 'Password successfully changed' + redirect_to root_path, notice: _('Password successfully changed') else render :new end @@ -45,14 +45,14 @@ class Profiles::PasswordsController < Profiles::ApplicationController password_attributes[:password_automatically_set] = false unless @user.password_automatically_set || @user.valid_password?(user_params[:current_password]) - redirect_to edit_profile_password_path, alert: 'You must provide a valid current password' + redirect_to edit_profile_password_path, alert: _('You must provide a valid current password') return end result = Users::UpdateService.new(current_user, password_attributes.merge(user: @user)).execute if result[:status] == :success - flash[:notice] = "Password was successfully updated. Please login with it" + flash[:notice] = _('Password was successfully updated. Please login with it') redirect_to new_user_session_path else @user.reset @@ -62,7 +62,7 @@ class Profiles::PasswordsController < Profiles::ApplicationController def reset current_user.send_reset_password_instructions - redirect_to edit_profile_password_path, notice: 'We sent you an email with reset password instructions' + redirect_to edit_profile_password_path, notice: _('We sent you an email with reset password instructions') end private |