summaryrefslogtreecommitdiff
path: root/app/services/test_hooks
diff options
context:
space:
mode:
authorMartin Wortschack <mwortschack@gitlab.com>2019-04-15 12:25:48 +0000
committerLin Jen-Shin <godfat@godfat.org>2019-04-15 12:25:48 +0000
commit5770b6544d3476e27d77a0ab11f162c941aa0cae (patch)
treec6e60cc32fc4a8fa5fe089a530a6446d3a03756e /app/services/test_hooks
parent0c0be8d68e8f899da4e80dd4bdf44a01dfa54cee (diff)
downloadgitlab-ce-5770b6544d3476e27d77a0ab11f162c941aa0cae.tar.gz
Externalize strings detected by rubocop-i18n
- Externalize strings in milestones_helper - Externalize strings in app/services - Update PO file
Diffstat (limited to 'app/services/test_hooks')
-rw-r--r--app/services/test_hooks/project_service.rb14
-rw-r--r--app/services/test_hooks/system_service.rb2
2 files changed, 8 insertions, 8 deletions
diff --git a/app/services/test_hooks/project_service.rb b/app/services/test_hooks/project_service.rb
index 7e14ddcd017..6607f5b2418 100644
--- a/app/services/test_hooks/project_service.rb
+++ b/app/services/test_hooks/project_service.rb
@@ -11,7 +11,7 @@ module TestHooks
private
def push_events_data
- throw(:validation_error, 'Ensure the project has at least one commit.') if project.empty_repo?
+ throw(:validation_error, s_('TestHooks|Ensure the project has at least one commit.')) if project.empty_repo?
Gitlab::DataBuilder::Push.build_sample(project, current_user)
end
@@ -20,14 +20,14 @@ module TestHooks
def note_events_data
note = project.notes.first
- throw(:validation_error, 'Ensure the project has notes.') unless note.present?
+ throw(:validation_error, s_('TestHooks|Ensure the project has notes.')) unless note.present?
Gitlab::DataBuilder::Note.build(note, current_user)
end
def issues_events_data
issue = project.issues.first
- throw(:validation_error, 'Ensure the project has issues.') unless issue.present?
+ throw(:validation_error, s_('TestHooks|Ensure the project has issues.')) unless issue.present?
issue.to_hook_data(current_user)
end
@@ -36,21 +36,21 @@ module TestHooks
def merge_requests_events_data
merge_request = project.merge_requests.first
- throw(:validation_error, 'Ensure the project has merge requests.') unless merge_request.present?
+ throw(:validation_error, s_('TestHooks|Ensure the project has merge requests.')) unless merge_request.present?
merge_request.to_hook_data(current_user)
end
def job_events_data
build = project.builds.first
- throw(:validation_error, 'Ensure the project has CI jobs.') unless build.present?
+ throw(:validation_error, s_('TestHooks|Ensure the project has CI jobs.')) unless build.present?
Gitlab::DataBuilder::Build.build(build)
end
def pipeline_events_data
pipeline = project.ci_pipelines.first
- throw(:validation_error, 'Ensure the project has CI pipelines.') unless pipeline.present?
+ throw(:validation_error, s_('TestHooks|Ensure the project has CI pipelines.')) unless pipeline.present?
Gitlab::DataBuilder::Pipeline.build(pipeline)
end
@@ -58,7 +58,7 @@ module TestHooks
def wiki_page_events_data
page = project.wiki.pages.first
if !project.wiki_enabled? || page.blank?
- throw(:validation_error, 'Ensure the wiki is enabled and has pages.')
+ throw(:validation_error, s_('TestHooks|Ensure the wiki is enabled and has pages.'))
end
Gitlab::DataBuilder::WikiPage.build(page, current_user, 'create')
diff --git a/app/services/test_hooks/system_service.rb b/app/services/test_hooks/system_service.rb
index 082830c5538..fedf9c6799b 100644
--- a/app/services/test_hooks/system_service.rb
+++ b/app/services/test_hooks/system_service.rb
@@ -18,7 +18,7 @@ module TestHooks
def merge_requests_events_data
merge_request = MergeRequest.of_projects(current_user.projects.select(:id)).first
- throw(:validation_error, 'Ensure one of your projects has merge requests.') unless merge_request.present?
+ throw(:validation_error, s_('TestHooks|Ensure one of your projects has merge requests.')) unless merge_request.present?
merge_request.to_hook_data(current_user)
end