Skip to content

Add gendered first names to it and fr-CH locales#3270

Open
huerlisi wants to merge 1 commit into
faker-ruby:mainfrom
huerlisi:locale-it-frch-gendered-first-names
Open

Add gendered first names to it and fr-CH locales#3270
huerlisi wants to merge 1 commit into
faker-ruby:mainfrom
huerlisi:locale-it-frch-gendered-first-names

Conversation

@huerlisi
Copy link
Copy Markdown

@huerlisi huerlisi commented Jun 8, 2026

Motivation / Background

Faker::Name.male_first_name and Faker::Name.female_first_name had no
data in the it and fr-CH locales. Because of that they silently fell
back to the English name list, so a German/Italian/French app asking for a
gendered first name got English names:

Faker::Config.locale = 'it'
Faker::Name.male_first_name    #=> "Barton"
Faker::Name.female_first_name  #=> "Tanesha"

Faker::Config.locale = 'fr-CH'
Faker::Name.male_first_name    #=> "Antonia"
Faker::Name.female_first_name  #=> "Hermina"

This Pull Request adds curated, sex-correct male_first_name /
female_first_name pools to both locales. The change is purely additive:
the existing gender-neutral first_name lists are left untouched, so no
existing behaviour changes.

Additional information

Output after the change:

Faker::Config.locale = 'it'
Faker::Name.male_first_name    #=> "Ivan"
Faker::Name.female_first_name  #=> "Alessandra"

Faker::Config.locale = 'fr-CH'
Faker::Name.male_first_name    #=> "Yann"
Faker::Name.female_first_name  #=> "Zoé"

The added tests assert the generated names are members of the locale's own
lists, guarding against a regression back to the English fallback.

Checklist

  • This Pull Request is related to one change.
  • Commit message has a detailed description of what changed and why.
  • Tests are added or updated.
  • Tests and Rubocop are passing before submitting your proposed changes.

`Faker::Name.male_first_name` and `female_first_name` had no data in the
`it` and `fr-CH` locales, so they silently fell back to the English name
list (e.g. `it` returned "Barton"/"Tanesha", `fr-CH` returned
"Antonia"/"Hermina").

Add curated, sex-correct `male_first_name`/`female_first_name` pools to
both locales. The change is purely additive: the existing gender-neutral
`first_name` lists are left untouched.

Tests assert the generated names are members of the locale's own lists,
guarding against a regression back to the English fallback.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@huerlisi
Copy link
Copy Markdown
Author

huerlisi commented Jun 8, 2026

I've created three MRs to add some specific locale data we need in our application.

The MRs touch the same files, so this could lead to conflicts. I can also rework them into a single MR if that's simpler.

I've created these MRs using Claude Code but manually verified. I kept the markers in the commit message. Just tell what your policy regarding AI supported contributions are if this does not work for you.

Thanks for maintaining this gem <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant