feat(locales): add Tajik - #6581
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The locale is fully integrated (exports + docs + JSR) and includes focused tests covering the added error-message branches.
Pull request overview
Adds the Tajik (tg) locale to Zod v4, wiring it into the locales barrel export, JSR subpath exports, docs, and a dedicated locale test to validate the translated error branches.
Changes:
- Add new Tajik locale implementation (
tg) with translated type/format dictionaries and size-unit handling. - Export
tgfrom the v4 locales index and expose it viapackages/zod/jsr.jsonsubpaths. - Document the new locale and add targeted Vitest coverage for the locale’s main error-message branches.
File summaries
| File | Description |
|---|---|
| packages/zod/src/v4/locales/tg.ts | Implements the Tajik error map and dictionaries for v4 locales. |
| packages/zod/src/v4/locales/index.ts | Exports the new tg locale from the locales barrel. |
| packages/zod/src/v4/core/tests/locales/tg.test.ts | Adds coverage asserting Tajik messages across key error codes/branches. |
| packages/zod/jsr.json | Adds a JSR subpath export for ./v4/locales/tg. |
| packages/docs/content/error-customization.mdx | Lists tg among the available locales in the docs. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
ℹ️ One localization correction inline.
Reviewed changes Checked the full Tajik locale implementation, its package and documentation integration, and the added branch coverage.
- Locale implementation Adds Tajik type, format, size, and issue-code messages following the existing v4 locale structure.
- Package integration Exports
tgfrom the locale barrel, adds the JSR subpath, and documents the locale in alphabetical order. - Coverage Exercises every error-map branch with exact expectations; focused locale, parity, compile, typecheck, build, and tree-shaking checks pass.
GPT Sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Reviewed the Tajik localization correction added since the prior Pullfrog review.
- Corrected discriminator wording Reordered the Tajik adjective to express “invalid discriminator value” and updated the exact-message expectation to match.
GPT Sol | 𝕏
|
Thanks for merging it and for adding the tests. The discriminator wording is |

Adds the Tajik locale from @ismoil77’s branch, preserving author credit. Includes the locale export, JSR subpath, documentation entry, and coverage for each error branch.
Closes #6578.