summaryrefslogtreecommitdiff
path: root/app/services/merge_requests
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/merge_requests')
-rw-r--r--app/services/merge_requests/merge_service.rb6
-rw-r--r--app/services/merge_requests/squash_service.rb4
2 files changed, 5 insertions, 5 deletions
diff --git a/app/services/merge_requests/merge_service.rb b/app/services/merge_requests/merge_service.rb
index 70a67baa01c..fb3b2900cd5 100644
--- a/app/services/merge_requests/merge_service.rb
+++ b/app/services/merge_requests/merge_service.rb
@@ -76,7 +76,7 @@ module MergeRequests
if commit_id
log_info("Git merge finished on JID #{merge_jid} commit #{commit_id}")
else
- raise MergeError, 'Conflicts detected during merge'
+ raise MergeError, _('Conflicts detected during merge')
end
merge_request.update!(merge_commit_sha: commit_id)
@@ -88,10 +88,10 @@ module MergeRequests
repository.merge(current_user, source, merge_request, message)
rescue Gitlab::Git::PreReceiveError => e
handle_merge_error(log_message: e.message)
- raise MergeError, 'Something went wrong during merge pre-receive hook'
+ raise MergeError, _('Something went wrong during merge pre-receive hook')
rescue => e
handle_merge_error(log_message: e.message)
- raise MergeError, 'Something went wrong during merge'
+ raise MergeError, _('Something went wrong during merge')
ensure
merge_request.update!(in_progress_merge_commit_sha: nil)
end
diff --git a/app/services/merge_requests/squash_service.rb b/app/services/merge_requests/squash_service.rb
index a439a380255..d97326fbdfa 100644
--- a/app/services/merge_requests/squash_service.rb
+++ b/app/services/merge_requests/squash_service.rb
@@ -6,7 +6,7 @@ module MergeRequests
@merge_request = merge_request
@repository = target_project.repository
- squash || error('Failed to squash. Should be done manually.')
+ squash || error(_('Failed to squash. Should be done manually.'))
end
def squash
@@ -15,7 +15,7 @@ module MergeRequests
end
if merge_request.squash_in_progress?
- return error('Squash task canceled: another squash is already in progress.')
+ return error(_('Squash task canceled: another squash is already in progress.'))
end
squash_sha = repository.squash(current_user, merge_request)