diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-03 09:10:57 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-03 09:10:57 +0000 |
commit | cc8ea69201e2e4d020018c43efeb993c44cd8a71 (patch) | |
tree | 6f8ae78a9b68bfcab2fa670a46c659f198fb1c53 /app/helpers | |
parent | b29d7709c1c992d4e5aa481155ef60003cd43d55 (diff) | |
download | gitlab-ce-cc8ea69201e2e4d020018c43efeb993c44cd8a71.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/form_helper.rb | 8 | ||||
-rw-r--r-- | app/helpers/issuables_description_templates_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/issuables_helper.rb | 11 |
3 files changed, 13 insertions, 8 deletions
diff --git a/app/helpers/form_helper.rb b/app/helpers/form_helper.rb index 9b4d0c0b9b3..3a5dcb4e664 100644 --- a/app/helpers/form_helper.rb +++ b/app/helpers/form_helper.rb @@ -35,7 +35,7 @@ module FormHelper def assignees_dropdown_options(issuable_type) dropdown_data = { toggle_class: 'js-user-search js-assignee-search js-multiselect js-save-user-data', - title: 'Select assignee', + title: _('Select assignee'), filter: true, dropdown_class: 'dropdown-menu-user dropdown-menu-selectable dropdown-menu-assignee', placeholder: _('Search users'), @@ -45,9 +45,9 @@ module FormHelper current_user: true, project_id: (@target_project || @project)&.id, field_name: "#{issuable_type}[assignee_ids][]", - default_label: 'Unassigned', + default_label: _('Unassigned'), 'max-select': 1, - 'dropdown-header': 'Assignee', + 'dropdown-header': _('Assignee'), multi_select: true, 'input-meta': 'name', 'always-show-selectbox': true, @@ -123,7 +123,7 @@ module FormHelper def multiple_assignees_dropdown_options(options) new_options = options.dup - new_options[:title] = 'Select assignee(s)' + new_options[:title] = _('Select assignee(s)') new_options[:data][:'dropdown-header'] = 'Assignee(s)' new_options[:data].delete(:'max-select') diff --git a/app/helpers/issuables_description_templates_helper.rb b/app/helpers/issuables_description_templates_helper.rb index 6b546d5c6fc..6c23f888823 100644 --- a/app/helpers/issuables_description_templates_helper.rb +++ b/app/helpers/issuables_description_templates_helper.rb @@ -6,7 +6,7 @@ module IssuablesDescriptionTemplatesHelper def template_dropdown_tag(issuable, &block) selected_template = selected_template(issuable) - title = selected_template || "Choose a template" + title = selected_template || _('Choose a template') options = { toggle_class: 'js-issuable-selector', title: title, diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index 07f5adae272..53a7487741e 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -80,7 +80,7 @@ module IssuablesHelper def users_dropdown_label(selected_users) case selected_users.length when 0 - "Unassigned" + _('Unassigned') when 1 selected_users[0].name else @@ -133,7 +133,7 @@ module IssuablesHelper end # rubocop: enable CodeReuse/ActiveRecord - def milestone_dropdown_label(milestone_title, default_label = "Milestone") + def milestone_dropdown_label(milestone_title, default_label = _('Milestone')) title = case milestone_title when Milestone::Upcoming.name then Milestone::Upcoming.title @@ -188,7 +188,12 @@ module IssuablesHelper end def issuables_state_counter_text(issuable_type, state, display_count) - titles = { opened: "Open" } + titles = { + opened: _("Open"), + closed: _("Closed"), + merged: _("Merged"), + all: _("All") + } state_title = titles[state] || state.to_s.humanize html = content_tag(:span, state_title) |