-
-
Notifications
You must be signed in to change notification settings - Fork 929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(locale): limited ja first names without passing sex #2190
fix(locale): limited ja first names without passing sex #2190
Conversation
Signed-off-by: KeisukeYamashita <19yamashita15@gmail.com>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## next #2190 +/- ##
==========================================
- Coverage 99.60% 99.59% -0.01%
==========================================
Files 2607 2607
Lines 245021 245014 -7
Branches 1154 1151 -3
==========================================
- Hits 244043 244021 -22
- Misses 951 966 +15
Partials 27 27
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Having most locales using the mergeArray function will simplify things when we restructure the gendered definitions.
@KeisukeYamashita Just to be sure and for future reference: Does the concept of gender-neutral first names not exist in Japanese or where the names in the |
@xDivisionByZerox Thank you for your comment! In Japan, AFAK、there are some gender neutral names like アオイ、レイ、etc. It's can be used for male and female names. Perhaps I was mistaken, but I thought the firstName function returned either male or female names (including some gender-neutral names), not only gender-neutral names. I thought the situation was similar in other countries, so I used mergeArray as a reference. |
Hello, I have noticed that
ja
person first name only has21
entries whilefemale_first_name
has more than100
andmale_first_name
as well.Even though hard work has done in each sex is defined, if nothing is specified, only a limited number of options will be returned. So I have merged the two arrays as
first_name
and now thefirst_name()
function can return from almost279
candidates (258
increase 🚀 ).Moreover, this avoids duplicate management of each list separately, making them easier to manage.
Reference
This is exactly the same way as some other languages, for example:
・
fr
faker/src/locales/fa/person/prefix.ts
Lines 1 to 5 in 27a8ff7
・
ne
faker/src/locales/ne/person/first_name.ts
Lines 4 to 8 in 27a8ff7