diff options
author | Martin Wortschack <mwortschack@gitlab.com> | 2019-04-04 17:05:25 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-04-04 17:05:25 +0000 |
commit | 2e756052720a68302231eba83339235b8983b6de (patch) | |
tree | a98b75ff2b47ceecc3cb488bcb786e57d4b7bbeb /app/helpers/form_helper.rb | |
parent | d0b9ab1910024c13ec5df55632ffafa1d18add39 (diff) | |
download | gitlab-ce-2e756052720a68302231eba83339235b8983b6de.tar.gz |
Externalize strings in helpers
- Update qa selector
- Update PO file
Diffstat (limited to 'app/helpers/form_helper.rb')
-rw-r--r-- | app/helpers/form_helper.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/helpers/form_helper.rb b/app/helpers/form_helper.rb index 5705ee54cee..8b3d270e873 100644 --- a/app/helpers/form_helper.rb +++ b/app/helpers/form_helper.rb @@ -4,8 +4,7 @@ module FormHelper def form_errors(model, type: 'form') return unless model.errors.any? - pluralized = 'error'.pluralize(model.errors.count) - headline = "The #{type} contains the following #{pluralized}:" + headline = n_('The %{type} contains the following error:', 'The %{type} contains the following errors:', model.errors.count) % { type: type } content_tag(:div, class: 'alert alert-danger', id: 'error_explanation') do content_tag(:h4, headline) << @@ -24,7 +23,7 @@ module FormHelper title: 'Select assignee', filter: true, dropdown_class: 'dropdown-menu-user dropdown-menu-selectable dropdown-menu-assignee', - placeholder: 'Search users', + placeholder: _('Search users'), data: { first_user: current_user&.username, null_user: true, |