Skip to content

Commit

Permalink
translate should handle both strings and symbols as keys
Browse files Browse the repository at this point in the history
  • Loading branch information
sunkencity committed Mar 17, 2010
1 parent 8b5c2a0 commit e8b273f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/i18n_backend_database/database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def translate(locale, key, options = {})
@locale = locale_in_context(locale)

options[:scope] = [options[:scope]] unless options[:scope].is_a?(Array) || options[:scope].blank?
key = "#{options[:scope].join('.')}.#{key}".to_sym if options[:scope] && key.is_a?(Symbol)
key = "#{options[:scope].join('.')}.#{key}".to_sym if options[:scope]
count = options[:count]
# pull out values for interpolation
values = options.reject { |name, value| [:scope, :default].include?(name) }
Expand Down

0 comments on commit e8b273f

Please sign in to comment.