From 93c0ff541d61b70bf093c5fffa58c057913cbe5b Mon Sep 17 00:00:00 2001 From: Samantha Ming Date: Wed, 7 Oct 2020 13:15:16 -0700 Subject: [PATCH] Translate assignees tooltip in MR list Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/263359 --- app/views/shared/issuable/_assignees.html.haml | 5 +++-- locale/gitlab.pot | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/views/shared/issuable/_assignees.html.haml b/app/views/shared/issuable/_assignees.html.haml index 8e46db6dea2ef9..196d0417fb85f0 100644 --- a/app/views/shared/issuable/_assignees.html.haml +++ b/app/views/shared/issuable/_assignees.html.haml @@ -4,7 +4,8 @@ - more_assignees_count = issuable.assignees.size - render_count - issuable.assignees.take(render_count).each do |assignee| # rubocop: disable CodeReuse/ActiveRecord - = link_to_member(@project, assignee, name: false, title: "Assigned to :name") + = link_to_member(@project, assignee, name: false, title: _("Assigned to %{name}") % { name: assignee.name}) - if more_assignees_count > 0 - %span{ class: 'avatar-counter has-tooltip', data: { container: 'body', placement: 'bottom', 'line-type' => 'old', 'original-title' => "+#{more_assignees_count} more assignees", qa_selector: 'avatar_counter_content' } } +#{more_assignees_count} + %span{ class: 'avatar-counter has-tooltip', data: { container: 'body', placement: 'bottom', 'line-type' => 'old', qa_selector: 'avatar_counter_content' }, title: _("+%{more_assignees_count} more assignees") % { more_assignees_count: more_assignees_count} } + = _("+%{more_assignees_count}") % { more_assignees_count: more_assignees_count} diff --git a/locale/gitlab.pot b/locale/gitlab.pot index ed78572427a751..afb159d3f95548 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -1000,6 +1000,12 @@ msgstr[1] "" msgid "+%{approvers} more approvers" msgstr "" +msgid "+%{more_assignees_count}" +msgstr "" + +msgid "+%{more_assignees_count} more assignees" +msgstr "" + msgid "+%{more_reviewers_count}" msgstr "" @@ -3611,6 +3617,9 @@ msgstr "" msgid "Assigned to %{assignee_name}" msgstr "" +msgid "Assigned to %{name}" +msgstr "" + msgid "Assigned to me" msgstr "" -- GitLab