diff options
Diffstat (limited to 'app/controllers/concerns')
-rw-r--r-- | app/controllers/concerns/authenticates_with_two_factor.rb | 4 | ||||
-rw-r--r-- | app/controllers/concerns/creates_commit.rb | 2 | ||||
-rw-r--r-- | app/controllers/concerns/lfs_request.rb | 6 | ||||
-rw-r--r-- | app/controllers/concerns/membership_actions.rb | 8 | ||||
-rw-r--r-- | app/controllers/concerns/spammable_actions.rb | 4 | ||||
-rw-r--r-- | app/controllers/concerns/uploads_actions.rb | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/app/controllers/concerns/authenticates_with_two_factor.rb b/app/controllers/concerns/authenticates_with_two_factor.rb index 5507328f8ae..20698ed5273 100644 --- a/app/controllers/concerns/authenticates_with_two_factor.rb +++ b/app/controllers/concerns/authenticates_with_two_factor.rb @@ -66,7 +66,7 @@ module AuthenticatesWithTwoFactor else user.increment_failed_attempts! Gitlab::AppLogger.info("Failed Login: user=#{user.username} ip=#{request.remote_ip} method=OTP") - flash.now[:alert] = 'Invalid two-factor code.' + flash.now[:alert] = _('Invalid two-factor code.') prompt_for_two_factor(user) end end @@ -83,7 +83,7 @@ module AuthenticatesWithTwoFactor else user.increment_failed_attempts! Gitlab::AppLogger.info("Failed Login: user=#{user.username} ip=#{request.remote_ip} method=U2F") - flash.now[:alert] = 'Authentication via U2F device failed.' + flash.now[:alert] = _('Authentication via U2F device failed.') prompt_for_two_factor(user) end end diff --git a/app/controllers/concerns/creates_commit.rb b/app/controllers/concerns/creates_commit.rb index b3777fd2b0f..e8daa03515b 100644 --- a/app/controllers/concerns/creates_commit.rb +++ b/app/controllers/concerns/creates_commit.rb @@ -60,7 +60,7 @@ module CreatesCommit private def update_flash_notice(success_notice) - flash[:notice] = success_notice || "Your changes have been successfully committed." + flash[:notice] = success_notice || _("Your changes have been successfully committed.") if create_merge_request? if merge_request_exists? diff --git a/app/controllers/concerns/lfs_request.rb b/app/controllers/concerns/lfs_request.rb index 5572c3cee2d..5d7a830f73e 100644 --- a/app/controllers/concerns/lfs_request.rb +++ b/app/controllers/concerns/lfs_request.rb @@ -26,7 +26,7 @@ module LfsRequest render( json: { - message: 'Git LFS is not enabled on this GitLab server, contact your admin.', + message: _('Git LFS is not enabled on this GitLab server, contact your admin.'), documentation_url: help_url }, status: :not_implemented @@ -51,7 +51,7 @@ module LfsRequest def render_lfs_forbidden render( json: { - message: 'Access forbidden. Check your access level.', + message: _('Access forbidden. Check your access level.'), documentation_url: help_url }, content_type: CONTENT_TYPE, @@ -62,7 +62,7 @@ module LfsRequest def render_lfs_not_found render( json: { - message: 'Not found.', + message: _('Not found.'), documentation_url: help_url }, content_type: CONTENT_TYPE, diff --git a/app/controllers/concerns/membership_actions.rb b/app/controllers/concerns/membership_actions.rb index ca713192c9e..4883ad2c490 100644 --- a/app/controllers/concerns/membership_actions.rb +++ b/app/controllers/concerns/membership_actions.rb @@ -9,7 +9,7 @@ module MembershipActions result = Members::CreateService.new(current_user, create_params).execute(membershipable) if result[:status] == :success - redirect_to members_page_url, notice: 'Users were successfully added.' + redirect_to members_page_url, notice: _('Users were successfully added.') else redirect_to members_page_url, alert: result[:message] end @@ -47,7 +47,7 @@ module MembershipActions membershipable.request_access(current_user) redirect_to polymorphic_path(membershipable), - notice: 'Your request for access has been queued for review.' + notice: _('Your request for access has been queued for review.') end def approve_access_request @@ -88,9 +88,9 @@ module MembershipActions if member.invite? member.resend_invite - redirect_to members_page_url, notice: 'The invitation was successfully resent.' + redirect_to members_page_url, notice: _('The invitation was successfully resent.') else - redirect_to members_page_url, alert: 'The invitation has already been accepted.' + redirect_to members_page_url, alert: _('The invitation has already been accepted.') end end diff --git a/app/controllers/concerns/spammable_actions.rb b/app/controllers/concerns/spammable_actions.rb index c3a1b12af84..3ad958494e6 100644 --- a/app/controllers/concerns/spammable_actions.rb +++ b/app/controllers/concerns/spammable_actions.rb @@ -14,7 +14,7 @@ module SpammableActions if SpamService.new(spammable).mark_as_spam! redirect_to spammable_path, notice: "#{spammable.spammable_entity_type.titlecase} was submitted to Akismet successfully." else - redirect_to spammable_path, alert: 'Error with Akismet. Please check the logs for more info.' + redirect_to spammable_path, alert: _('Error with Akismet. Please check the logs for more info.') end end @@ -33,7 +33,7 @@ module SpammableActions ensure_spam_config_loaded! if params[:recaptcha_verification] - flash[:alert] = 'There was an error with the reCAPTCHA. Please solve the reCAPTCHA again.' + flash[:alert] = _('There was an error with the reCAPTCHA. Please solve the reCAPTCHA again.') end respond_to do |format| diff --git a/app/controllers/concerns/uploads_actions.rb b/app/controllers/concerns/uploads_actions.rb index 4ec0e94df9a..6487f4d396a 100644 --- a/app/controllers/concerns/uploads_actions.rb +++ b/app/controllers/concerns/uploads_actions.rb @@ -16,7 +16,7 @@ module UploadsActions end else format.json do - render json: 'Invalid file.', status: :unprocessable_entity + render json: _('Invalid file.'), status: :unprocessable_entity end end end |