Skip to content

Add Central Kurdish (ckb) locale#6078

Open
KUMachine wants to merge 4 commits into
colinhacks:mainfrom
KUMachine:feat/ckb-locale
Open

Add Central Kurdish (ckb) locale#6078
KUMachine wants to merge 4 commits into
colinhacks:mainfrom
KUMachine:feat/ckb-locale

Conversation

@KUMachine

@KUMachine KUMachine commented Jun 11, 2026

Copy link
Copy Markdown

Summary

This PR adds the ckb locale for Zod, providing Central Kurdish / Sorani translations for validation error messages.

Changes

  • Added a new ckb locale file.
  • Added translated error messages for Zod validation issues.
  • Exported the locale so it can be used alongside the existing locales.

Motivation

This makes Zod more accessible for Kurdish-speaking Sorani dialect users and applications that need validation messages in Central Kurdish / Sorani.

Testing

  • Ran the existing test suite with pnpm test.
  • Verified that the new locale follows the same structure as the other locale files.

@KUMachine KUMachine changed the title Feat/ckb locale Add Central Kurdish (ckb) locale Jun 11, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ckb locale file — new packages/zod/src/v4/locales/ckb.ts with full $ZodErrorMap implementation, including Sizable units, FormatDictionary, TypeDictionary, and all error-code switch cases
  • Register in exportspackages/zod/src/v4/locales/index.ts and packages/zod/jsr.json entries, 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

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Comment thread packages/zod/src/v4/locales/ckb.ts Outdated
Comment thread packages/zod/src/v4/locales/ckb.ts

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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_small wording — changed زۆرەوە ("too big") to کەمەوە ("too small") in the too_small error messages at packages/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.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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_type messagepackages/zod/src/v4/locales/ckb.ts:86 now 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.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant