bchavez / bchavez/Bogus

CompanyName format not localized

Open
#567 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
9.7k
Forks
538
PR merge metrics
No merged PRs in 30d

Description

### Bogus NuGet Package

35.6.0

### .NET Version

.NET 8.0

### Visual Studio Version

_No response_

### What operating system are you using?

Windows

### What locale are you using with Bogus?

de

### Problem Description

When generating company names, I only get names in the hardcoded English formats from [Company.cs](https://github.com/bchavez/Bogus/blob/905a7e753ed2d7bfd42fc5099a50278adf45b467/Source/Bogus/DataSets/Company.cs#L41C1-L46C12).

### LINQPad Example or Reproduction Steps

```cs
new Faker("de").RuleForType(typeof(string), f => f.Company.CompanyName()).Generate(10).Dump();

public class Company {
public string Name { get; set; }
}
```

### Expected Behavior

I'd expect the formats in the [localization files](https://github.com/bchavez/Bogus/blob/905a7e753ed2d7bfd42fc5099a50278adf45b467/Source/Bogus/data/de.locale.json#L1380C1-L1384C6) to be used.

### Actual Behavior

Only the hardcoded formats are used.

The example above creates something like the following, which uses German names but only three English formats:
```
Loska - Streller
Ochs, Neuendorf and Köpernick
Ibe AG
Sonnabend OHG
Gehrig, Sahner and Schult
```

### Known Workarounds

_No response_

### Could you help with a pull-request?

No

Contributor guide

Open the contributing guide

Research direction

Start in Source/Bogus/DataSets/Company.cs and compare its company-name formats with Source/Bogus/data/de.locale.json. Run the provided C# reproduction with the de locale, then verify that generated company names use the localized formats rather than only the hardcoded English formats.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
localization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.