summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Chao <mchao@gitlab.com>2018-05-26 12:39:20 +0800
committerMark Chao <mchao@gitlab.com>2018-05-26 12:39:20 +0800
commit5e399dc34a08c57a71b0d76c986cd0ec5b9ab3b8 (patch)
tree9653fb34161bc0c43edb707a4624fb267447b9f0
parentde12348ee8534b2a4310c81898e7151dd7616095 (diff)
downloadgitlab-ce-fix-merge-request-unmergeable-email-plural.tar.gz
Fix merge request unmergeable notification email plural interpolationfix-merge-request-unmergeable-email-plural
-rw-r--r--app/views/notify/merge_request_unmergeable_email.html.haml2
-rw-r--r--app/views/notify/merge_request_unmergeable_email.text.haml2
-rw-r--r--spec/mailers/notify_spec.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/views/notify/merge_request_unmergeable_email.html.haml b/app/views/notify/merge_request_unmergeable_email.html.haml
index e84905a5fad..bc200453f42 100644
--- a/app/views/notify/merge_request_unmergeable_email.html.haml
+++ b/app/views/notify/merge_request_unmergeable_email.html.haml
@@ -1,5 +1,5 @@
%p
- Merge Request #{link_to @merge_request.to_reference, project_merge_request_url(@merge_request.target_project, @merge_request)} can no longer be merged due to the following #{pluralize(@reasons, 'reason')}:
+ Merge Request #{link_to @merge_request.to_reference, project_merge_request_url(@merge_request.target_project, @merge_request)} can no longer be merged due to the following #{'reason'.pluralize(@reasons.count, I18n.locale)}:
%ul
- @reasons.each do |reason|
diff --git a/app/views/notify/merge_request_unmergeable_email.text.haml b/app/views/notify/merge_request_unmergeable_email.text.haml
index 4f0901c761a..442d262c60d 100644
--- a/app/views/notify/merge_request_unmergeable_email.text.haml
+++ b/app/views/notify/merge_request_unmergeable_email.text.haml
@@ -1,4 +1,4 @@
-Merge Request #{@merge_request.to_reference} can no longer be merged due to the following #{pluralize(@reasons, 'reason')}:
+Merge Request #{@merge_request.to_reference} can no longer be merged due to the following #{'reason'.pluralize(@reasons.count, I18n.locale)}:
- @reasons.each do |reason|
* #{reason}
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index f310a6854d5..69eafbe4bbe 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -422,7 +422,7 @@ describe Notify do
aggregate_failures do
is_expected.to have_referable_subject(merge_request, reply: true)
is_expected.to have_body_text(project_merge_request_path(project, merge_request))
- is_expected.to have_body_text('reasons:')
+ is_expected.to have_body_text('following reasons:')
reasons.each do |reason|
is_expected.to have_body_text(reason)
end