Coder Social home page Coder Social logo

Comments (5)

belgoros avatar belgoros commented on July 28, 2024

I've just seen that the version I used was 1.0.1. A rapid test with the latest one (1.1.2) seems to work as expected:

require 'faker'

Faker::Config.locale = :fr
puts "set to locale: #{Faker::Config.locale}"
phone = Faker::PhoneNumber.phone_number
puts "phone number: #{phone}"

zip = Faker::Address.zip_code
puts "zip code: #{zip}"

from faker.

belgoros avatar belgoros commented on July 28, 2024

There is an error in the translation file fr.yml: all the firstnames and lastnames should be separated by comma! I could post the updated file if needed.

from faker.

belgoros avatar belgoros commented on July 28, 2024

Another error is for city values: city names should not be between quotes:

#previous 
["Paris", "Marseille", "Lyon", ...]

In this case calling city:

Faker::Address.city

sends nothing, just an empty string
I changed the values array as follows by removing quotes and it works:

city_name: [Paris, Marse...]
city:
        - "#{city_name}"

from faker.

belgoros avatar belgoros commented on July 28, 2024

Strange, at Github, the fr.yml file has already an updated version for first_name and last name. Nevertheless, in the newly installed/downloaded version of the gem (1.1.2) it is not the case. A little 'forgot' ?

from faker.

Ecco avatar Ecco commented on July 28, 2024

I already submitted a patch for the first/last name issue. It's been merged into the master branch, but not pushed to rubygems yet. See issue #92.

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.