Coder Social home page Coder Social logo

Comments (4)

ridget avatar ridget commented on July 28, 2024

@javix Faker::Address.country returns a random country from the list found in https://github.com/stympy/faker/blob/master/lib/locales/en.yml , the default country will always return the locale country as set by https://github.com/stympy/faker/blob/master/lib/locales/fr.yml or https://github.com/stympy/faker/blob/master/lib/locales/en-au.yml

Assuming you were expecting Faker::Address.country to return France of course :)

from faker.

belgoros avatar belgoros commented on July 28, 2024

OK, seeing that cities, phones were for France, I believed that setting a locale would also send the appropriate values for all the methods (country, phone, city, first_name, last_name, etc.). I didn't investigate all the generated phones numbers and cities, but I had a strong idea that all of them were French. Can you confirm that ALL the values are generated randomly, no matter which locale is set? If so, why set up a locale in this case ? Thank you.

from faker.

ridget avatar ridget commented on July 28, 2024

@javix as far as im aware it only gets overridden by whats actually in https://github.com/stympy/faker/blob/master/lib/locales/fr.yml for the French locale. Any other questions might be best posed at the gem authors, I just came in here to see if there was a pull request I could submit :)

from faker.

belgoros avatar belgoros commented on July 28, 2024

OK, got it, I'll close the issue as it does not seem to be a bug. Thank you.

from faker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.