From 7c3e81b679fb67b042da5e1bf893d4ca22b2f363 Mon Sep 17 00:00:00 2001 From: Simon Huerlimann Date: Mon, 8 Jun 2026 14:51:30 +0200 Subject: [PATCH] Fix non-localized company suffixes in CH and it locales MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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) --- lib/locales/de-CH.yml | 2 -- lib/locales/fr-CH.yml | 4 ++-- lib/locales/it.yml | 2 +- test/test_de_ch_locale.rb | 7 +++++++ test/test_fr_ch_locale.rb | 9 +++++++++ test/test_it_locale.rb | 7 +++++++ 6 files changed, 26 insertions(+), 5 deletions(-) diff --git a/lib/locales/de-CH.yml b/lib/locales/de-CH.yml index 5c51649de1..29c72af8df 100644 --- a/lib/locales/de-CH.yml +++ b/lib/locales/de-CH.yml @@ -3251,8 +3251,6 @@ de-CH: - und Partner - "& Co." - Gruppe - - LLC - - Inc. legal_form: - GmbH - AG diff --git a/lib/locales/fr-CH.yml b/lib/locales/fr-CH.yml index d53811ea16..dad8cc5747 100644 --- a/lib/locales/fr-CH.yml +++ b/lib/locales/fr-CH.yml @@ -141,13 +141,13 @@ fr-CH: - CH company: suffix: + - SA + - Sàrl - AG - GmbH - et associés - "& Co." - Groupe - - LLC - - Inc. name: - "#{Name.last_name} #{suffix}" - "#{Name.last_name}-#{Name.last_name}" diff --git a/lib/locales/it.yml b/lib/locales/it.yml index f5e1970f00..f9fecb241b 100644 --- a/lib/locales/it.yml +++ b/lib/locales/it.yml @@ -520,7 +520,7 @@ it: suffix: - SPA - e figli - - Group + - Gruppo - s.r.l. buzzwords: - diff --git a/test/test_de_ch_locale.rb b/test/test_de_ch_locale.rb index b082c5e8b9..354d8a6567 100644 --- a/test/test_de_ch_locale.rb +++ b/test/test_de_ch_locale.rb @@ -23,6 +23,13 @@ def test_de_ch_company_methods assert_kind_of String, Faker::Company.name end + def test_de_ch_company_suffix_has_no_english_forms + suffixes = I18n.translate('faker.company.suffix', locale: :'de-CH') + + assert_not_includes suffixes, 'LLC' + assert_not_includes suffixes, 'Inc.' + end + def test_de_ch_internet_methods assert_kind_of String, Faker::Internet.domain_suffix end diff --git a/test/test_fr_ch_locale.rb b/test/test_fr_ch_locale.rb index fbb05af09d..777f0401dd 100644 --- a/test/test_fr_ch_locale.rb +++ b/test/test_fr_ch_locale.rb @@ -44,6 +44,15 @@ def test_fr_ch_company_methods assert_kind_of String, Faker::Company.name end + def test_fr_ch_company_suffix_uses_swiss_forms + suffixes = I18n.translate('faker.company.suffix', locale: :'fr-CH') + + assert_includes suffixes, 'SA' + assert_includes suffixes, 'Sàrl' + assert_not_includes suffixes, 'LLC' + assert_not_includes suffixes, 'Inc.' + end + def test_fr_ch_internet_methods assert_kind_of String, Faker::Internet.email assert_kind_of String, Faker::Internet.domain_suffix diff --git a/test/test_it_locale.rb b/test/test_it_locale.rb index 0a33f7fdbd..c751acc558 100644 --- a/test/test_it_locale.rb +++ b/test/test_it_locale.rb @@ -34,6 +34,13 @@ def test_it_company_methods assert_kind_of String, Faker::Company.name end + def test_it_company_suffix_has_no_english_forms + suffixes = I18n.translate('faker.company.suffix', locale: :it) + + assert_includes suffixes, 'Gruppo' + assert_not_includes suffixes, 'Group' + end + def test_it_internet_methods assert_kind_of String, Faker::Internet.email assert_kind_of String, Faker::Internet.domain_suffix