Skip to content

Commit

Permalink
flatten defaults for translation
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaly committed Aug 13, 2009
1 parent 8176e56 commit c2896e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/gettext_i18n_rails/backend.rb
Expand Up @@ -21,7 +21,8 @@ def translate(locale, key, options)
else else
if self.class.translate_defaults if self.class.translate_defaults
options[:default].to_a.each do |default| 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
end end
backend.translate locale, key, options backend.translate locale, key, options
Expand Down

1 comment on commit c2896e9

@grosser
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your right, thats much better :)

Please sign in to comment.