lib/i18n/backend/gettext.rb in i18n-0.5.3 vs lib/i18n/backend/gettext.rb in i18n-0.5.4
- old
+ new
@@ -41,12 +41,12 @@
data.inject({}) do |result, (key, value)|
unless key.nil? || key.empty?
key, value = normalize_pluralization(locale, key, value) if key.index("\000")
parts = key.split('|').reverse
- normalized = parts.inject({}) do |normalized, part|
- normalized = { part => normalized.empty? ? value : normalized }
+ normalized = parts.inject({}) do |_normalized, part|
+ { part => _normalized.empty? ? value : _normalized }
end
result.deep_merge!(normalized)
end
result
@@ -60,10 +60,10 @@
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
result = {}
- values.each_with_index { |value, ix| result[keys[ix]] = value }
+ values.each_with_index { |_value, ix| result[keys[ix]] = _value }
[key, result]
end
end
end