-
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
Address.country_code does not consider locale (I18n) #2684
Comments
HI @PhiliGor thanks for reporting the bug. The cities and other address values make sense to change depending of the locale, but not the country_code and country_code_long. I believe All locales should use the If the behavior that we want is that, when setting a locale, Faker generates the country code of the given locale, the key for fetching that value would be Two locales files already have that: Line 18 in 9246681
and Line 32 in 9246681
The locales are files that haven't had too much help, unfortunately, including the docs. So it's understandable it causes confusion. Opening bug reports like this is helpful to improve them. To fix this issue, we would need to set the Also, the locale docs would need to be updated so this is better documented for other users. Are you interested in opening a PR to add the |
I have raised a PR #2732 where default_country_code is added to other locales. Can you kindly take a look at it? |
thank you @ashwin-elangovan ! Closed by #2732 |
Describe the bug
if locale is set, then Address.country_code does not consider it, but e.g. street/city/... do.
To Reproduce
Expected behavior
that the country_code act the same way?!
Additional context
I used the country code to define a fake address and recognized with that change (3.1.0), that country_code does not consider the locale but don't know, if it makes sense here or not?!
The text was updated successfully, but these errors were encountered: