Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login page does not accept locales (Version 1.1.1) #10

Open
modreoci opened this issue Jan 20, 2016 · 14 comments · May be fixed by #92
Open

Login page does not accept locales (Version 1.1.1) #10

modreoci opened this issue Jan 20, 2016 · 14 comments · May be fixed by #92
Assignees

Comments

@modreoci
Copy link
Contributor

It displays still in the default language.
bw_login_page

@tvdeyen
Copy link
Member

tvdeyen commented Jan 20, 2016

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

@modreoci
Copy link
Contributor Author

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

@tvdeyen
Copy link
Member

tvdeyen commented Jan 20, 2016

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

@modreoci
Copy link
Contributor Author

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

@tvdeyen
Copy link
Member

tvdeyen commented Jan 20, 2016

Yes, please.

@modreoci
Copy link
Contributor Author

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

@tvdeyen
Copy link
Member

tvdeyen commented Jan 20, 2016

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.

@modreoci
Copy link
Contributor Author

Me, you or someone else? :-)

@tvdeyen
Copy link
Member

tvdeyen commented Jan 20, 2016

I will do.

@modreoci
Copy link
Contributor Author

Can you inform me then?

@tvdeyen
Copy link
Member

tvdeyen commented Jan 22, 2016

@modreoci
Copy link
Contributor Author

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?

@tvdeyen
Copy link
Member

tvdeyen commented Jan 22, 2016

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

@tvdeyen tvdeyen removed their assignment Feb 7, 2017
@AndreiMotinga
Copy link

AndreiMotinga commented Apr 19, 2017

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

@alepore alepore self-assigned this May 22, 2017
@alepore alepore linked a pull request May 23, 2017 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants