app/helpers/account/locale_helper.rb in bullet_train-1.0.45 vs app/helpers/account/locale_helper.rb in bullet_train-1.0.46
- old
+ new
@@ -44,11 +44,11 @@
# Often times we're only receiving partial keys like `.section`, so this is a crazy hack to trick I18n.t into
# telling us what the full key ended up being.
begin
super(key + "💣", options.except(:default))
rescue I18n::MissingTranslationData => exception
- full_key = exception.message.rpartition(" ").last.gsub("💣", "")
+ full_key = exception.message.rpartition(" ").last.delete("💣")
end
end
end
end
@@ -73,10 +73,10 @@
return full_key
end
end
end
- return result
+ result
end
# like 't', but if the key isn't found, it returns nil.
def ot(key, options = {})
t(key, options)