i18n_backend_database icon indicating copy to clipboard operation
i18n_backend_database copied to clipboard

rails 2.3.8 bug

Open guyshmuely opened this issue 15 years ago • 7 comments

I18n defines a Locale module, This messes up the access to the plugin's Locale Class... All the methods the are called from the Database instance like available_locales fails because they are trying to reach Locale module instead of the Locale class

guyshmuely avatar Jun 05 '10 16:06 guyshmuely

Hello! Is this a new addition to the I18n implementation? I haven't run this gem against the 2.3.8 yet, so it would be great to know. Is it something you could simply add name-spacing too, or reference directly (::)?

dylanz avatar Jun 08 '10 06:06 dylanz

yes i am referring to the new I18n implementation, this problem could easily be fixed by changing the Locale class name and than the plugin works like a charm. The thing is that it still doesn't support Chaining which is really nice and probably some other cool stuff the new I18n offers... i think that if your plugin could use the built-in I18n ActiveRecord's backend (I18n::Backend::ActiveRecord) as the gate to the database and extend it with all the cool features your plugin offers it will be great, i assume that if you implement it this way it will work with all I18n features and support rails 3 once it's released.

guyshmuely avatar Jun 08 '10 17:06 guyshmuely

@uyshmuely, I have the same issue, but i don't understand your "path". Can you explain your change ? thks.

fusco avatar Aug 02 '10 11:08 fusco

which issue are you referring to? Chaining or the Locale module problem?

guyshmuely avatar Aug 02 '10 12:08 guyshmuely

I'm seeing this in 2.3.5 as well.

mossadumc avatar Oct 20 '10 19:10 mossadumc

The problem I18n::Backend::Database refer Locale from I18n::Locale While it should refer Locale from ActiveRecord::Base::Locale

karuna avatar Oct 28 '10 06:10 karuna

I've also seen this issue, which I fixed by changing a lot of references in database.rb to the above mentioned ActiveRecord::Base::Locale.

rwygand avatar Aug 01 '11 21:08 rwygand