From e1497b6796dc4191a10a276bbda35ed6fb5795e5 Mon Sep 17 00:00:00 2001 From: Bryan Larsen Date: Thu, 1 Apr 2010 10:24:15 -0400 Subject: [PATCH] [#682 state:resolved] undefined method '+' in translations.rb --- hobo/lib/hobo/translations.rb | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/hobo/lib/hobo/translations.rb b/hobo/lib/hobo/translations.rb index 66d700b..a8f92e3 100644 --- a/hobo/lib/hobo/translations.rb +++ b/hobo/lib/hobo/translations.rb @@ -72,7 +72,12 @@ module Hobo 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 -- 1.7.0.3