diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-19 09:09:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-19 09:09:30 +0300 |
commit | 0f26d7c7fb43f3fbc1ba0ee5b1c5537e7646dffd (patch) | |
tree | b4f697157ef09be3e360d59f6ba17c08976b3632 /app/helpers | |
parent | 88be36271c46b8a9f454d0c8093ef30779a1cac5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/issuables_helper.rb | 6 | ||||
-rw-r--r-- | app/helpers/merge_requests_helper.rb | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index 639a54fa9ec..6153cad693c 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -20,13 +20,13 @@ module IssuablesHelper end def assignees_label(issuable, include_value: true) - label = 'Assignee'.pluralize(issuable.assignees.count) + assignees = issuable.assignees if include_value sanitized_list = sanitize_name(issuable.assignee_list) - "#{label}: #{sanitized_list}" + ns_('NotificationEmail|Assignee: %{users}', 'NotificationEmail|Assignees: %{users}', assignees.count) % { users: sanitized_list } else - label + ns_('NotificationEmail|Assignee', 'NotificationEmail|Assignees', assignees.count) end end diff --git a/app/helpers/merge_requests_helper.rb b/app/helpers/merge_requests_helper.rb index 7a798c83b7e..376dde9d612 100644 --- a/app/helpers/merge_requests_helper.rb +++ b/app/helpers/merge_requests_helper.rb @@ -176,13 +176,12 @@ module MergeRequestsHelper def reviewers_label(merge_request, include_value: true) reviewers = merge_request.reviewers - reviewer_label = 'Reviewer'.pluralize(reviewers.count) if include_value sanitized_list = sanitize_name(reviewers.map(&:name).to_sentence) - "#{reviewer_label}: #{sanitized_list}" + ns_('NotificationEmail|Reviewer: %{users}', 'NotificationEmail|Reviewers: %{users}', reviewers.count) % { users: sanitized_list } else - reviewer_label + ns_('NotificationEmail|Reviewer', 'NotificationEmail|Reviewers', reviewers.count) end end |