Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
d7dd2618
Commit
d7dd2618
authored
Jun 08, 2020
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move description text to helper & translate
- Translate text - Update references
parent
d04c20ea
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
36 deletions
+55
-36
app/helpers/services_helper.rb
app/helpers/services_helper.rb
+15
-11
app/models/project_services/jira_service.rb
app/models/project_services/jira_service.rb
+2
-0
app/models/service.rb
app/models/service.rb
+1
-24
app/serializers/service_event_entity.rb
app/serializers/service_event_entity.rb
+1
-1
locale/gitlab.pot
locale/gitlab.pot
+36
-0
No files found.
app/helpers/services_helper.rb
View file @
d7dd2618
...
...
@@ -4,25 +4,29 @@ module ServicesHelper
def
service_event_description
(
event
)
case
event
when
"push"
,
"push_events"
"Event will be triggered by a push to the repository"
s_
(
"ProjectService|Event will be triggered by a push to the repository"
)
when
"tag_push"
,
"tag_push_events"
"Event will be triggered when a new tag is pushed to the repository"
s_
(
"ProjectService|Event will be triggered when a new tag is pushed to the repository"
)
when
"note"
,
"note_events"
"Event will be triggered when someone adds a comment"
s_
(
"ProjectService|Event will be triggered when someone adds a comment"
)
when
"confidential_note"
,
"confidential_note_events"
"Event will be triggered when someone adds a comment on a confidential issue"
s_
(
"ProjectService|Event will be triggered when someone adds a comment on a confidential issue"
)
when
"issue"
,
"issue_events"
"Event will be triggered when an issue is created/updated/closed"
when
"confidential_issue"
,
"confidential_issue
s
_events"
"Event will be triggered when a confidential issue is created/updated/closed"
s_
(
"ProjectService|Event will be triggered when an issue is created/updated/closed"
)
when
"confidential_issue"
,
"confidential_issue_events"
s_
(
"ProjectService|Event will be triggered when a confidential issue is created/updated/closed"
)
when
"merge_request"
,
"merge_request_events"
"Event will be triggered when a merge request is created/updated/merged"
s_
(
"ProjectService|Event will be triggered when a merge request is created/updated/merged"
)
when
"pipeline"
,
"pipeline_events"
"Event will be triggered when a pipeline status changes"
s_
(
"ProjectService|Event will be triggered when a pipeline status changes"
)
when
"wiki_page"
,
"wiki_page_events"
"Event will be triggered when a wiki page is created/updated"
s_
(
"ProjectService|Event will be triggered when a wiki page is created/updated"
)
when
"commit"
,
"commit_events"
"Event will be triggered when a commit is created/updated"
s_
(
"ProjectService|Event will be triggered when a commit is created/updated"
)
when
"deployment"
s_
(
"ProjectService|Event will be triggered when a deployment finishes"
)
when
"alert"
s_
(
"ProjectService|Event will be triggered when a new, unique alert is recorded"
)
end
end
...
...
app/models/project_services/jira_service.rb
View file @
d7dd2618
...
...
@@ -439,6 +439,8 @@ class JiraService < IssueTrackerService
s_
(
"JiraService|Jira comments will be created when an issue gets referenced in a merge request."
)
when
"commit"
,
"commit_events"
s_
(
"JiraService|Jira comments will be created when an issue gets referenced in a commit."
)
else
super
end
end
end
app/models/service.rb
View file @
d7dd2618
...
...
@@ -385,30 +385,7 @@ class Service < ApplicationRecord
end
def
self
.
event_description
(
event
)
case
event
when
"push"
,
"push_events"
"Event will be triggered by a push to the repository"
when
"tag_push"
,
"tag_push_events"
"Event will be triggered when a new tag is pushed to the repository"
when
"note"
,
"note_events"
"Event will be triggered when someone adds a comment"
when
"issue"
,
"issue_events"
"Event will be triggered when an issue is created/updated/closed"
when
"confidential_issue"
,
"confidential_issue_events"
"Event will be triggered when a confidential issue is created/updated/closed"
when
"merge_request"
,
"merge_request_events"
"Event will be triggered when a merge request is created/updated/merged"
when
"pipeline"
,
"pipeline_events"
"Event will be triggered when a pipeline status changes"
when
"wiki_page"
,
"wiki_page_events"
"Event will be triggered when a wiki page is created/updated"
when
"commit"
,
"commit_events"
"Event will be triggered when a commit is created/updated"
when
"deployment"
"Event will be triggered when a deployment finishes"
when
"alert"
"Event will be triggered when a new, unique alert is recorded"
end
ServicesHelper
.
service_event_description
(
event
)
end
def
valid_recipients?
...
...
app/serializers/service_event_entity.rb
View file @
d7dd2618
...
...
@@ -14,7 +14,7 @@ class ServiceEventEntity < Grape::Entity
end
expose
:description
do
|
event
|
service
.
class
.
event_description
(
event
)
ServicesHelper
.
service_
event_description
(
event
)
end
expose
:field
,
if:
->
(
_
,
_
)
{
event_field
}
do
...
...
locale/gitlab.pot
View file @
d7dd2618
...
...
@@ -17452,6 +17452,42 @@ msgstr ""
msgid "ProjectService|Comment"
msgstr ""
msgid "ProjectService|Event will be triggered by a push to the repository"
msgstr ""
msgid "ProjectService|Event will be triggered when a commit is created/updated"
msgstr ""
msgid "ProjectService|Event will be triggered when a confidential issue is created/updated/closed"
msgstr ""
msgid "ProjectService|Event will be triggered when a deployment finishes"
msgstr ""
msgid "ProjectService|Event will be triggered when a merge request is created/updated/merged"
msgstr ""
msgid "ProjectService|Event will be triggered when a new tag is pushed to the repository"
msgstr ""
msgid "ProjectService|Event will be triggered when a new, unique alert is recorded"
msgstr ""
msgid "ProjectService|Event will be triggered when a pipeline status changes"
msgstr ""
msgid "ProjectService|Event will be triggered when a wiki page is created/updated"
msgstr ""
msgid "ProjectService|Event will be triggered when an issue is created/updated/closed"
msgstr ""
msgid "ProjectService|Event will be triggered when someone adds a comment"
msgstr ""
msgid "ProjectService|Event will be triggered when someone adds a comment on a confidential issue"
msgstr ""
msgid "ProjectService|Perform common operations on GitLab project: %{project_name}"
msgstr ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment