diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/i18n/po_linter.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/i18n/po_linter.rb b/lib/gitlab/i18n/po_linter.rb index 3e9a035010f..c0687cd9b79 100644 --- a/lib/gitlab/i18n/po_linter.rb +++ b/lib/gitlab/i18n/po_linter.rb @@ -170,13 +170,13 @@ module Gitlab end def translate_plural(entry) - used_variables = entry.plural_id.scan(VARIABLE_REGEX) - variables = fill_in_variables(used_variables) - numbers_covering_all_plurals.map do |number| translation = FastGettext::Translation.n_(entry.msgid, entry.plural_id, number) + index = index_for_pluralization(number) + used_variables = index == 0 ? entry.msgid.scan(VARIABLE_REGEX) : entry.plural_id.scan(VARIABLE_REGEX) + variables = fill_in_variables(used_variables) - translation % variables if used_variables.any? + translation % variables if variables.any? end end |