solidus_i18n
solidus_i18n copied to clipboard
Login page does not accept locales (Version 1.1.1)
It displays still in the default language.
Do you have SolidusI18n ::Config.available_locales
configured to include sk
?
https://github.com/solidusio-contrib/solidus_i18n/blob/master/lib/solidus_i18n/controller_locale_helper.rb#L19
I've got this:
SolidusI18n::Config.available_locales = [:en, :sk] # displayed on frontend select box
SolidusGlobalize::Config.supported_locales = [:en, :sk] # displayed on translation forms
In my spree.rb file
Rest of the web work fine (meaning locales). There are a few more bugs and malfunctions out there (I'm little bit vexed by it). Try to see it in http://bwshop.herokuapp.com/ I can provide you the admin account if you want. It operates near the top of memory quota so it can freeze suddenly...
Ok, thanks. I guess the problem is that the login controller (Spree::UserSessionsController
) does not inherit from Spree::BaseController
where we include the SolidusI18n::ControllerLocaleHelper
.
We should also include SolidusI18n::ControllerLocaleHelper
in Spree::UserSessionsController
.
I will provide a pull request that fixes that. Meanwhile you can fix this by manually adding this into your app:
# config/initializers/spree_i18n.rb
Spree::UserSessionsController.class_eval do
include SolidusI18n::ControllerLocaleHelper
end
I've got no such file in my app. Can I create the new one?
Yes, please.
Oki... It works! But... the same situation at http://localhost:3000/sk/admin/login :-)
Yes, there are much more controllers that need to be patched. They should inherit from Spree::BaseController
. Will open an issue on that repo as well.
Me, you or someone else? :-)
I will do.
Can you inform me then?
No. 1/2:
- https://github.com/solidusio/solidus/pull/727
I'm not quite sure if I properly understand... Partly due to my english and partly due to my poor coding skills.
Is it necessary to let to run the solidus_auth_devise
command?
@modreoci just a reminder, that this is still in progress. Currently you can't do anything but wait, sorry.
tvdeyen, What's the status on this one? I can't get the locale form to show up on frontend