Hello,
I'm migrating from rails 2.2.2 to rails 2.3.8 and I have a strange issue
with I18n.translate.
In rails 2.2.2 development, when I try to get an untranslated key I have
a error like "Translation missing: [...]"
In rails 2.3.8 development, The I18n.t method returns an empty hash ({})
for the same missing translation.
In environment.rb, I have the following code that is related to the I18n
module:
config.after_initialize do
# No fallback locales in development environment; we want to see those
# translation missing errors.
fallbacks = {}
I18n.valid_locales.each do |l|
fallbacks[l] = [l]
end
I18n.fallbacks = fallbacks
# Additionally, we log missing keys
require 'globalize/i18n/missing_translations_log_handler'
I18n.missing_translations_logger = RAILS_DEFAULT_LOGGER
I18n.exception_handler = :missing_translations_log_handler
end
I tried to comment it out but it the same empty hash was returned.
Also, the I18n.t :default option seems to be broken as well. I suspect
this is due to my stange behavior.
Any suggestion?
Thanks in advance,
Christophe
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"rails-i18n" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rails-i18n?hl=en.