-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Error: :en is not a valid locale #2155
Comments
Although there is already a fix in RailsAdmin Troubleshooting https://github.com/sferik/rails_admin/wiki/Troubleshoot #746, it seems to be not working. After adding a line |
@x-ji I was tired of looking for some good solution so I fixed it with workaround. So go to source code of the gem file like: /home/user/.rvm/gems/ruby-2.1.5/gems/rails_admin-0.6.7/app/views/rails_admin/main/index.html.haml and change :en into suitable translation. In your case it is 'zh-CN'. And it works. |
Same thing for me, the fix in https://github.com/sferik/rails_admin/wiki/Troubleshoot do not work. My site is only in french. |
Finally I had to overwrite the file views/main/index.html.haml and change line 78 to put :fr instead of :en. |
:en locale is not always available
Thanks for this |
if I do not have in available_locales :en, I get an error:
Showing /home/user/.rvm/gems/ruby-2.2.0@project/gems/rails_admin-0.6.6/app/views/rails_admin/main/index.html.haml where line #78 raised:
:en is not a valid locale
This error occurs because the project multiple times specifying an explicit locale: :en.
The text was updated successfully, but these errors were encountered: