Permalink
Browse files

flatten defaults for translation

  • Loading branch information...
1 parent 8176e56 commit c2896e9df381fdbda3ba7f44622b73af04af0cbb @vitaly committed Aug 13, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/gettext_i18n_rails/backend.rb
@@ -21,7 +21,8 @@ def translate(locale, key, options)
else
if self.class.translate_defaults
options[:default].to_a.each do |default|
- return FastGettext._(default) if FastGettext.key_exist?(default)
+ flat_key = flatten_key default, options
+ return FastGettext._(flat_key) if FastGettext.key_exist?(flat_key)
end
end
backend.translate locale, key, options

1 comment on commit c2896e9

@grosser

your right, thats much better :)

Please sign in to comment.