Permalink
Browse files

A more helpful message when number of plurals on po file is inconsist…

…ent with I18n::Gettext.plurals_keys.
  • Loading branch information...
1 parent 89ea337 commit a2f6cbbddcc1df26a1cbc9401307ba3dac8c5efb @nikosd nikosd committed Nov 8, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 }

0 comments on commit a2f6cbb

Please sign in to comment.