Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

A more helpful message when number of plurals on po file is inconsistent #118

Merged
merged 1 commit into from

3 participants

@nikosd

A more helpful message when number of plurals on po file is inconsistent with I18n::Gettext.plurals_keys.

This is useful for debugging purposes.

@graffic

Good idea to keep po files in good shape.

@tigrish tigrish merged commit c264f47 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 8, 2011
  1. @nikosd

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

    nikosd authored
    …ent with I18n::Gettext.plurals_keys.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/i18n/backend/gettext.rb
View
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 }
Something went wrong with that request. Please try again.