summaryrefslogtreecommitdiff
path: root/app/helpers/form_helper.rb
diff options
context:
space:
mode:
authorMartin Wortschack <mwortschack@gitlab.com>2019-04-04 17:05:25 +0000
committerNick Thomas <nick@gitlab.com>2019-04-04 17:05:25 +0000
commit2e756052720a68302231eba83339235b8983b6de (patch)
treea98b75ff2b47ceecc3cb488bcb786e57d4b7bbeb /app/helpers/form_helper.rb
parentd0b9ab1910024c13ec5df55632ffafa1d18add39 (diff)
downloadgitlab-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.rb5
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,