Skip to content

feat(locales): add Tajik - #6581

Merged
colinhacks merged 3 commits into
mainfrom
feat/tajik-locale-6578
Sep 9, 2026
Merged

colinhacks merged 3 commits into
mainfrom
feat/tajik-locale-6578

Conversation

@colinhacks

Copy link
Copy Markdown
Owner

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.

Copilot AI 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.

🟢 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 tg from the v4 locales index and expose it via packages/zod/jsr.json subpaths.
  • 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.

@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.

ℹ️ 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 tg from 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.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using GPT Sol | 𝕏

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

@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 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.

Pullfrog  | View workflow run | Using GPT Sol | 𝕏

@colinhacks
colinhacks merged commit 574d480 into main Sep 9, 2026
11 checks passed
@colinhacks
colinhacks deleted the feat/tajik-locale-6578 branch September 9, 2026 17:53
@ismoil77

ismoil77 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for merging it and for adding the tests. The discriminator wording is
better now — the adjective was attached to the wrong noun in my version.

This branch was successfully deployed

1 active deployment
Preview – zod-v4 — d613014b Deployed Sep 9, 2026 by vercel[bot]
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.

Add Tajik (tg) locale — branch ready, interaction limit blocks the PR

3 participants