-
-
Notifications
You must be signed in to change notification settings - Fork 1k
feat(locale): Add ku_ckb locale #3441
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
Conversation
✅ Deploy Preview for fakerjs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #3441 +/- ##
=======================================
Coverage 99.97% 99.97%
=======================================
Files 2894 2899 +5
Lines 222390 222476 +86
Branches 932 932
=======================================
+ Hits 222337 222423 +86
Misses 53 53
🚀 New features to boost your workflow:
|
|
According to Wikipedia https://en.wikipedia.org/wiki/Kurdish_language
So I wonder if we should give this a script suffix similar to we did for Uzbek and Serbian https://fakerjs.dev/guide/localization.html#available-locales to distinguish Kurdish written in Latin characters and Arabic characters? |
|
Kurdish has multiple dialects, but the main ones are Kurmanji and Sorani. Kurmanji can be written in both Latin and Arabic scripts. I plan to add these three variations ku_KMR_latin → Kurmanji (Latin) Would this be the correct approach for Faker.js? I want to confirm before proceeding. @matthewmayer |
|
Hmm I don't think we yet have any other locales where it's necessary to disambiguate by ISO 639-3 code for different dialects. I think it might be confusing to put the language code where we would otherwise put the country code so it probably makes sense to put it as part of the variant suffix. Let's also check how other localisation of open source software handles this. |
|
I searched for a solution but couldn’t find anything that exactly fits our needs. However, I believe we can handle this using the following approach: ku_IQ_Arab: Sorani (Arabic) IQ represents Iraq, where most Sorani speakers live. This approach seems like our best fit. However, I don’t like using IQ, TR, and SY because Kurdish people are divided among four countries, including Iran. I wish I could use KU instead, but unfortunately, it is not a standard code. |
|
I agree the country codes aren't ideal. It partly depends if you expect to add data for eg phone module which has country codes , location module which has cities etc. if those are all from one country then a country code would be appropriate. If not then we should try to find a generic solution. |
|
Wikipedia uses ku for Kurmanji (with a toggle between ku-latn and ku-arab) and ckb for Sorani |
|
I think the cleanest would probably be:
|
|
i though we should use only contry code like IQ after the ku_ , but if it is fine to use kmr and ckb like you said that would be the best way , thank you , i will start with ku_ckb |
|
@matthewmayer I’ve updated the changes and pushed them. Do I need to do anything else besides adding more modules? |
|
For ease for review please don't add any more modules for now. We prefer to get a small PR reviewed first, once it is approved you can follow up with additional PRs for other dialects and modules. Nothing to do for now, I will let the other maintainers take a look. Please bear with us it can take a few days or weeks to get initial PR approved. |
Hello 🙂 Thanks to @matthewmayer to drive this PR in review process for us 🚀 Otherwise I would give already an approve ✅ |
i think en_BORK is the only other example of a locale with a language and variant but no country at the moment. (Admittedly a silly example, and "BORK" should probably be lowercase but i dont want to introduce a breaking change for a silly Easter egg locale). But in this case when people speaking Kurdish are spread over several countries, it seems more appropriate. |
These are exactly also my background thoughts 👍 |
|
I think we don't have a really good definition for what goes in "variant" at the moment, but i think its basically "the minimum needed to disambiguate versions of a macro-language", which might include a part 3 code from https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes (e.g. ckb) and/or a script (e.g. latin, arab) and/or another descriptor if there's no standard code (en_GB_cockney_rhyming_slang)? |
|
@arentalb I'll be honest with you here. We discussed this PR during the last two weekly meetings and still haven't come to a conclusion. The case you present is quite the hard one. For starters, lets have a look into our current definition for locale names from our website: https://fakerjs.dev/guide/localization.html#locale-codes.
One could argue that the "Optionally" indicates that the country code is optionally entirely, while another one could say that it is only optionally when considering the base locale code (from the first paragraph). By making the country code required, we could at least somewhat restrict the maximum amount of possible faker locales. Furthermore, a lot of modules (example internet, location) are only usful if they are paired with a specific country. Having to maintain an indefinite amount of locales is sadly a fact we need to consider as maintainers. We totally see the reasoning of your disliking regarding the implementation by definition. But by the current definition, this might be the best option. |
|
Thanks for reviewing the PR — much appreciated! Regarding your suggestion, yes — I can definitely work on a generic ku locale. I believe the best candidate for a base locale would be Kurdish Sorani (Central Kurdish) in Arabic script. It's my native dialect and also the most widely understood among Kurdish speakers. do you agree with using Sorani Arabic script for the generic ku, or would you recommend a different approach? |
|
Sorry for the late reply I’ve translated a set of base words to compare Sorani and Kurmanji - as shown in the file, there are noticeable differences between the two dialects. While a few words are shared, the overlap doesn’t seem strong enough to build a reliable base fallback, in my opinion. So I don’t think a generic Kurdish locale is the right approach. That leaves us with two possible options: 1- Fallback to one dialect - I’d suggest Sorani. In my experience, Kurmanji speakers usually understand Sorani, but the reverse isn’t true - Sorani speakers typically understand only about 20–30% of Kurmanji. 2- Treat them as separate locales - This might be the better option overall, especially since Kurmanji has two scripts (Latin and Arabic). |
xDivisionByZerox
left a comment
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.
I'll approve this with the decision of allowing the "Kurdish"-locale in the following variants:
| title | variant | script | locale name | faker instance name |
|---|---|---|---|---|
'Kurdish (Sorani)' |
'ckb' |
'Arab' |
ku_ckb | fakerKU_ckb |
'Kurdish (Kurmanji, Latin)' |
'kmr_latin' |
'Latn' |
ku_kmr_latin | fakerKU_kmr_latin |
'Kurdish (Kurmanji, Arabic)' |
'kmr_arab' |
'Arab' |
ku_kmr_arab | fakerKU_kmr_arab |
Thank you for your patience and endurance @arentalb. May you be able to resolve the current conflicts by updating the snapshots for a final time?
|
Thank you for the approval and the detailed instructions. I will resolve the conflicts and update the snapshots as requested |
a06cca8
|
I checked the workflows and noticed that the test failure comes from the snapshot file in the "ko" section. I didn’t modify that part when creating the pull request , it was part of the conflict resolution, and I accepted the existing changes. Now the workflow fails because of that section. |
it looks like Git accidentally pulled in some changes to ko because its adjacent to ku in the snapshot test. i have reverted that. |
|
@matthewmayer thank you , but it still have a failed test |
|
Yes noted. That is unrelated to your changes. |
|
Thank you for your contribution. As concluded - through out the discussion in this PR - we will accept additional PRs for the locales |
|
Thank you, @xDivisionByZerox , and thank you, @matthewmayer , for your work. I will add the other module for ku_ckb and also work on ku_kmr_latin and ku_kmr_arab. |
|
Note to avoid duplicating effort, we do have a pending PR for adding Kurmanji at #3615 |
|
Thank you. We realized we are friends and decided that I will work on "ckb"
and he will work on both "kmr" , since he knows both "kmr" better .
…On Sat, 4 Oct 2025 at 10:41 PM DivisionByZero ***@***.***> wrote:
*xDivisionByZerox* left a comment (faker-js/faker#3441)
<#3441 (comment)>
@arentalb <https://github.com/arentalb> just FYI:
There has already been 2 PRs that add the base of one of the missing
locales: ku_kmr_latin See #3629
<#3629>.
- #3629 <#3629>
—
Reply to this email directly, view it on GitHub
<#3441 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQ3FH5R2NXNXM43WXFS42UT3WAPFXAVCNFSM6AAAAABZGPWI6SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNRYGQ4TQMZYGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This PR adds Kurdish support for the lorem module in Faker.js. This is the first step towards adding full Kurdish locale support, with more modules to come in future updates.
Ran pnpm run preflight with no issues
Generated locales with pnpm run generate:locales
Formatted code (pnpm run format) and passed linting (pnpm run lint)
Verified tests pass
Let me know if any changes are needed!