Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #118 from e-travel/better_invalid_plurals_message

A more helpful message when number of plurals on po file is inconsistent
  • Loading branch information...
commit c264f474a5be8777f2178e2506e08668e6c21ce1 2 parents cd5ad8a + a2f6cbb
@tigrish tigrish authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/i18n/backend/gettext.rb
2  lib/i18n/backend/gettext.rb
@@ -60,7 +60,7 @@ def normalize_pluralization(locale, key, value)
keys = I18n::Gettext.plural_keys(locale)
values = value.split("\000")
- raise "invalid number of plurals: #{values.size}, keys: #{keys.inspect}" if values.size != keys.size
+ raise "invalid number of plurals: #{values.size}, keys: #{keys.inspect} on #{locale} locale for msgid #{key.inspect} with values #{values.inspect}" if values.size != keys.size
result = {}
values.each_with_index { |_value, ix| result[keys[ix]] = _value }
Please sign in to comment.
Something went wrong with that request. Please try again.