I just recently deployed my app with some hobo preloading enabled
and coincidentally a weird behavior showed up.
Even though I have explicitly configured
config.hobo.show_translation_keys = false
I am getting the key included in every translation rendered by <ht>
Looking at the code in hobo/lib/hobo/extensions/i18n.rb, it certainly looks
like it would always include the key:
def translate_with_show_keys(key, options = {})
translation = translate_without_show_keys(key, options)
return translation unless translation.is_a?(String)
keys = normalize_keys(locale, key, options[:scope]).join('.')
"[#{keys}]" + translation
end
alias_method_chain :translate, :show_keys.
One thing I don't understand is how it *ever* rendered without the key.
The next thing that's confusing me is why this behavior suddenly showed up after
I added the following to config/application.rb:
+ %w{
+ dryml
+ hobo_fields
+ hobo
+ hobo_clean
+ hobo_clean_admin
+ hobo_bootstrap
+ hobo_fields
+ hobo_jquery
+ hobo_jquery_ui
+ hobo_rapid
+ hobo_support
+ }.each do |gem_name|
+ spec = Gem::Specification.find_by_name(gem_name)
+ gem_root = spec.gem_dir
+ spec.require_paths.each do |p|
+ space = gem_root + '/' + p
+ config.eager_load_paths << space
+ end
+ end