summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugenia Grieff <egrieff@gitlab.com>2019-09-13 12:35:28 +0100
committerEugenia Grieff <egrieff@gitlab.com>2019-09-13 12:35:28 +0100
commitdd176192aa2050fb57aecd0c6852d3a4e7cae42b (patch)
treef8541ed9d8e88ea97b5989694be3c309df6b307e
parentc0feda92c356ec89d78e0a609830f711a410b045 (diff)
downloadgitlab-ce-57783-better-indication-that-an-issue-has-been-duplicated.tar.gz
- Update pot file to include missing internationalization
-rw-r--r--app/helpers/issues_helper.rb14
-rw-r--r--app/views/projects/issues/show.html.haml3
-rw-r--r--locale/gitlab.pot9
3 files changed, 22 insertions, 4 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index b4bcfbeb59a..8b6fecb9676 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -152,9 +152,19 @@ module IssuesHelper
def issue_closed_link(issue, current_user, css_class: '')
if issue.moved? && can?(current_user, :read_issue, issue.moved_to)
- link_to('(moved)', issue.moved_to, class: css_class)
+ link_to(s_('IssuableStatus|moved'), issue.moved_to, class: css_class)
elsif issue.duplicated? && can?(current_user, :read_issue, issue.duplicated_to)
- link_to('(duplicated)', issue.duplicated_to, class: css_class)
+ link_to(s_('IssuableStatus|duplicated'), issue.duplicated_to, class: css_class)
+ end
+ end
+
+ def issue_closed_text(issue, current_user)
+ link = issue_closed_link(issue, current_user, css_class: 'text-white text-underline')
+
+ if link
+ s_('IssuableStatus|Closed (%{link})').html_safe % { link: link }
+ else
+ s_('IssuableStatus|Closed')
end
end
diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml
index feed703050a..1843ad7bb75 100644
--- a/app/views/projects/issues/show.html.haml
+++ b/app/views/projects/issues/show.html.haml
@@ -15,8 +15,7 @@
.issuable-status-box.status-box.status-box-issue-closed{ class: issue_button_visibility(@issue, false) }
= sprite_icon('mobile-issue-close', size: 16, css_class: 'd-block d-sm-none')
.d-none.d-sm-block
- = _("Closed")
- = issue_closed_link(@issue, current_user, css_class: 'text-white text-underline')
+ = issue_closed_text(@issue, current_user)
.issuable-status-box.status-box.status-box-open{ class: issue_button_visibility(@issue, true) }
= sprite_icon('issue-open-m', size: 16, css_class: 'd-block d-sm-none')
%span.d-none.d-sm-block Open
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 9199f79a20e..2367e129d34 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -6228,6 +6228,15 @@ msgstr ""
msgid "Invocations"
msgstr ""
+msgid "IssuableStatus|Closed"
+msgstr ""
+
+msgid "IssuableStatus|Closed (%{link})"
+msgstr ""
+
+msgid "IssuableStatus|duplicated"
+msgstr ""
+
msgid "IssuableStatus|moved"
msgstr ""