Add Central Kurdish (ckb) locale#6078
Conversation
There was a problem hiding this comment.
Important
A few issues to address before merging.
Reviewed changes — adds a Central Kurdish (ckb) locale with translated error messages for all Zod validation issue types.
- Add
ckblocale file — newpackages/zod/src/v4/locales/ckb.tswith full$ZodErrorMapimplementation, including Sizable units, FormatDictionary, TypeDictionary, and all error-code switch cases - Register in exports —
packages/zod/src/v4/locales/index.tsandpackages/zod/jsr.jsonentries, both in correct alphabetical order
⚠️ Missing documentation entry in error-customization.mdx
The locale list in packages/docs/content/error-customization.mdx (lines 349–396) needs a ckb entry between ca and cs. Every other locale in the repo has a corresponding docs entry.
Technical details
# Missing docs entry for ckb
## Affected sites
- `packages/docs/content/error-customization.mdx:353` — `ca` entry; `ckb` should follow on line 354 before `cs`
## Required outcome
- Add `- \`ckb\` — Central Kurdish` between the `ca` and `cs` entries in the locale list
## Suggested approach
Insert after line 353:
```
- `ckb` — Central Kurdish
```Note: 1 inline comment(s) dropped because they did not anchor to lines inside the PR diff:
packages/docs/content/error-customization.mdx:353(RIGHT) — file not in PR diff
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — one commit fixes the too_small copy-paste flagged in the prior review, replacing the "too big" phrase with the correct "too small" translation.
- Fix
too_smallwording — changedزۆرەوە("too big") toکەمەوە("too small") in thetoo_smallerror messages atpackages/zod/src/v4/locales/ckb.ts:100-101
Two issues from the prior review remain outstanding and were not touched by the new commit: the leading space in the invalid_type message on line 86, and the missing ckb entry in packages/docs/content/error-customization.mdx between ca and cs.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — one commit removes the stray leading space in the invalid_type message, addressing the second issue flagged in the prior review.
- Remove leading space from
invalid_typemessage —packages/zod/src/v4/locales/ckb.ts:86now starts the template string at the first character, matching the formatting in all other locale files.
One prior-review issue remains: the missing ckb entry in packages/docs/content/error-customization.mdx between ca and cs. Not touched by this commit.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Summary
This PR adds the
ckblocale for Zod, providing Central Kurdish / Sorani translations for validation error messages.Changes
ckblocale file.Motivation
This makes Zod more accessible for Kurdish-speaking Sorani dialect users and applications that need validation messages in Central Kurdish / Sorani.
Testing
pnpm test.