solidus_i18n icon indicating copy to clipboard operation
solidus_i18n copied to clipboard

Login page does not accept locales (Version 1.1.1)

Open modreoci opened this issue 8 years ago • 14 comments

It displays still in the default language. bw_login_page

modreoci avatar Jan 20 '16 20:01 modreoci

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

tvdeyen avatar Jan 20 '16 21:01 tvdeyen

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...

modreoci avatar Jan 20 '16 21:01 modreoci

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

tvdeyen avatar Jan 20 '16 21:01 tvdeyen

I've got no such file in my app. Can I create the new one?

modreoci avatar Jan 20 '16 22:01 modreoci

Yes, please.

tvdeyen avatar Jan 20 '16 22:01 tvdeyen

Oki... It works! But... the same situation at http://localhost:3000/sk/admin/login :-)

modreoci avatar Jan 20 '16 22:01 modreoci

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.

tvdeyen avatar Jan 20 '16 22:01 tvdeyen

Me, you or someone else? :-)

modreoci avatar Jan 20 '16 22:01 modreoci

I will do.

tvdeyen avatar Jan 20 '16 22:01 tvdeyen

Can you inform me then?

modreoci avatar Jan 20 '16 23:01 modreoci

No. 1/2:

  • https://github.com/solidusio/solidus/pull/727

tvdeyen avatar Jan 22 '16 08:01 tvdeyen

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 avatar Jan 22 '16 09:01 modreoci

@modreoci just a reminder, that this is still in progress. Currently you can't do anything but wait, sorry.

tvdeyen avatar Jan 22 '16 11:01 tvdeyen

tvdeyen, What's the status on this one? I can't get the locale form to show up on frontend

AndreiMotinga avatar Apr 19 '17 03:04 AndreiMotinga