-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Faker::Address.country does not work if your apps does not use :en as a locale #266
Comments
Same here, adding |
Had the same issue with config.i18n.available_locales += %w(en) The issue is in |
Same with |
This issue is still open and Faker does not work for apps which don't support english. I am stuck at version 1.5.0 |
Hello @vbrazo, yes. the issue is still open and valid. I haven't investigated what is causing it so I cannot help you on which direction to follow to solve it. I think the expected behaviour is that the generator works also if english is not available. |
I still have to add :en on the test env on my apps using Faker. It makes the test env different from production. |
This was fixed by #1377. |
It doesn't seem like. If I use the latest version on master I obtain the following:
|
Oops, sorry for the false notice then! :S |
I recently faced it again with |
I worked around it by dropping this in my test_helper.rb (must run after faker is loaded).
It's not really pretty, but gets the job done and since available_locales are enforced by I18n on both lookup and loading of translations, it should hopefully not change behaviour for other users. |
Rail 3.2
Faker 1.4.3
When I use Faker::Address.country with config.i18n.available_locales = [:fr,:it] I have the following error :
It stop if I remove Faker::Address.country from my factory or if I ad :en to available locales.
The text was updated successfully, but these errors were encountered: