Closed jtomasek closed 11 years ago
Oh nice. Let me try this.
This doesn't just end up masking the error? Shouldn't this particular array not get loaded if :_ is not loaded? As per - https://github.com/ui-alchemy/alchemy/blob/master/app/helpers/alchemy/translation_helper.rb
For some reason I am getting error undefined method `_' for Alchemy::GettextTranslations:Module in production. Even thought the array should not be loaded. This patch fixes it. Anyone has better solution?
Updated with better fix.
When you run rake gettext
, which is designed to look for _("") declarations, will this pull in those strings in that hash?
Wow, that is a great question @ehelms - I'm not sure that it would...
I wonder if we could dig the strings out...
You took away the check for if respondto?(:)
Yes, I removed it because I don't call the _() in the TRANSLATIONS. I just specify the strings there. I am not sure it if works for gettext but it does for rails i18n.
This was fixed with #127. Closing.
This patch fixes the error the host application that uses i18n gets in production mode.
/alchemy/app/helpers/alchemy/gettext_translations.rb:3:in
_' for Alchemy::GettextTranslations:Module (NoMethodError)