Skip to content

Fix non-localized company suffixes in CH and it locales#3271

Open
huerlisi wants to merge 1 commit into
faker-ruby:mainfrom
huerlisi:locale-ch-company-suffixes
Open

Fix non-localized company suffixes in CH and it locales#3271
huerlisi wants to merge 1 commit into
faker-ruby:mainfrom
huerlisi:locale-ch-company-suffixes

Conversation

@huerlisi

@huerlisi huerlisi commented Jun 8, 2026

Copy link
Copy Markdown

Motivation / Background

Faker::Company.name produced anglophone legal forms that do not exist in
these locales:

Faker::Config.locale = 'de-CH'
Faker::Company.name  #=> "Klimczak LLC"

Faker::Config.locale = 'fr-CH'
Faker::Company.name  #=> "Adam LLC"

Faker::Config.locale = 'it'
Faker::Company.name  #=> "Russo-Russo Group"

LLC and Inc. are US forms and are not used in Switzerland; Group is
English. This Pull Request fixes the company suffix lists:

  • de-CH: drop the English LLC and Inc. suffixes.
  • fr-CH: drop LLC/Inc. and add the Swiss-French forms SA and Sàrl.
  • it: replace English Group with the Italian Gruppo.

Additional information

Output after the change:

Faker::Config.locale = 'de-CH'
Faker::Company.name  #=> "Slotta AG"

Faker::Config.locale = 'fr-CH'
Faker::Company.name  #=> "Dumas, Bénoit et Duval"   # also: "Morin SA", "Brun Sàrl"

Faker::Config.locale = 'it'
Faker::Company.name  #=> "Monti, Cattaneo e Costantin Gruppo"

Tests assert the English forms are gone (and the localized forms present)
so the lists don't regress.

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::Company.name` produced anglophone legal forms that do not exist
in these locales, e.g. "Klimczak LLC" (de-CH), "Adam LLC" (fr-CH) and
"Russo Group" (it).

- de-CH: drop the English `LLC` and `Inc.` suffixes.
- fr-CH: drop `LLC`/`Inc.` and add the Swiss-French forms `SA` and `Sàrl`.
- it: replace English `Group` with the Italian `Gruppo`.

Add tests asserting the English forms are gone (and the localized forms
present) so the lists don't regress.

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

huerlisi commented Jun 8, 2026

Copy link
Copy Markdown
Author

I used Claude Code to create this MR and it included very specific unit tests. I don't see too much value in those but they don't hurt.

Should I drop them, or what is best practice in this repo around unit tests?

@huerlisi

huerlisi commented Jun 8, 2026

Copy link
Copy Markdown
Author

Related but not directly part of this MR: I understand that the project has a "freeze" on new locales. For Switzerland there's currently DE and FR locales available, but no for the IT speaking part. As Swiss that feels as kind of a bug:-)

Would you accept a contribution that introduces an it-CH locale?

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