Skip to content

Commit

Permalink
[#682 state:resolved] undefined method '+' in translations.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanlarsen committed Apr 1, 2010
1 parent 56a5370 commit 39baf0d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion hobo/lib/hobo/translations.rb
Expand Up @@ -72,7 +72,12 @@ def self.ht(key, options={})

Rails.logger.info "..translate(#{key}, #{options.inspect}) to #{I18n.locale}" if defined?(HOBO_VERBOSE_TRANSLATIONS)

I18n.translate(key.to_sym, options)+(key_prefix ? key_prefix:"")
translation = I18n.translate(key.to_sym, options)
if translation.respond_to? :to_str
key_prefix ? translation.to_str+key_prefix : translation
else
"translation invalid: #{key}"
end
end

# if somebody includes us, give them ht as an instance method
Expand Down

0 comments on commit 39baf0d

Please sign in to comment.