Closed RexTremendae closed 9 months ago
Seems the sv
locale is using name.first_name_women
vs the standard name.female_first_name
(which is what Bogus is looking for):
So that's why female names aren't being picked up. I'll have to check if this is fixed in the upstream version of faker.js.
@RexTremendae and @EBD232 ,
New release Bogus v35.0.1
- https://www.nuget.org/packages/Bogus/35.0.1
sv
Swedish first/last name issue.Thanks again for the PR @EBD232
Version Information
What locale are you using with Bogus?
sv
What is the expected behavior?
When using Swedish locale, Swedish names are expected to be generated.
What is the actual behavior?
Names listed in the swedish locale json file are these: "first_name_women": ["Astrid","Anna","Alice","Amanda","Ann","Agneta","Anette","Anneli","Alexandra","Agnes","Anne","Alva","Alma","Angelica","Ann-Marie","Maria","Margareta","Elisabeth","Eva","Birgitta","Kristina","Karin","Elisabet","Marie","Lotta","Ronja","Veronica"], "first_name_men": ["Erik","Lars","Karl","Anders","Per","Johan","Nils","Lennart","Emil","Hans"], "last_name": ["Johansson","Andersson","Karlsson","Nilsson","Eriksson","Larsson","Olsson","Persson","Svensson","Gustafsson"]
Example of generated names: Sincere Karlsson Scarlett Svensson Quinten Gustafsson
Please provide a stack trace.
Any possible solutions?
How do you reproduce the issue?
var fkr = new Faker("sv"); Console.WriteLine(fkr.Name.FullName()); Console.WriteLine($"{fkr.Name.FirstName()} {fkr.Name.LastName()}");
Do you have a unit test that can demonstrate the bug?
No, but see sample code above.
Can you identify the location in Bogus' source code where the problem exists?
No, I don't really understand how the locale data is selected.
If the bug is confirmed, would you be willing to submit a PR?
Yes