lib/olelo/locale.rb in olelo-0.9.9 vs lib/olelo/locale.rb in olelo-0.9.10
- old
+ new
@@ -31,12 +31,10 @@
# @param [Symbol, String] key which identifies string in locale
# @param [Hash] args Arguments hash for string interpolation
# @return [String] translated string
#
def translate(key, args = {})
- if !key.to_s.ends_with?('_plural') && args[:count] && args[:count] != 1
- translate("#{key}_plural", args)
- elsif @translations[key]
+ if @translations[key]
@translations[key] % args
else
args[:fallback] || "##{key}"
end
end