Skip to content

feat: added Slovak i18n#1334

Merged
fabian-hiller merged 5 commits intoopen-circle:mainfrom
adamvx:feat-slovak
Mar 17, 2026
Merged

feat: added Slovak i18n#1334
fabian-hiller merged 5 commits intoopen-circle:mainfrom
adamvx:feat-slovak

Conversation

@adamvx
Copy link
Copy Markdown

@adamvx adamvx commented Oct 9, 2025

This PR adds Slovak (sk) translations.

I translated all messages myself as a native Slovak speaker, aiming to keep them consistent with other languages.
I’d appreciate it if someone could review the translations for accuracy.

Summary by CodeRabbit

  • New Features

    • Added Slovak (sk) localization to the i18n package with comprehensive validation messages across all validators (email, URL, dates, numbers, etc.).
  • Documentation

    • Updated changelog to note the new Slovak translations.
  • Chores

    • Updated build and packaging config to include the new Slovak locale and ignore rules.

@vercel
Copy link
Copy Markdown

vercel bot commented Oct 9, 2025

Someone is attempting to deploy a commit to the Valibot Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request labels Oct 9, 2025
Copy link
Copy Markdown

@martinzilak martinzilak left a comment

Choose a reason for hiding this comment

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

Overall looks (and sounds) good to me, Slovak is my first language.

Comment thread packages/i18n/src/sk.ts
Comment thread packages/i18n/src/sk.ts Outdated
Comment thread packages/i18n/src/sk.ts
Comment thread packages/i18n/src/sk.ts Outdated
@fabian-hiller fabian-hiller requested a review from Copilot March 17, 2026 20:46
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 17, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: cf74cd1d-70bc-44a6-857b-3fcb815e5793

📥 Commits

Reviewing files that changed from the base of the PR and between b4bc35e and fc67c3f.

📒 Files selected for processing (8)
  • packages/i18n/.gitignore
  • packages/i18n/CHANGELOG.md
  • packages/i18n/jsr.json
  • packages/i18n/package.json
  • packages/i18n/scripts/build-jsr.ts
  • packages/i18n/scripts/build-npm.ts
  • packages/i18n/src/sk.ts
  • packages/i18n/src/types.ts

📝 Walkthrough

Walkthrough

Adds Slovak (sk) locale to the i18n package: introduces a new sk language module, updates type union and build scripts to include it, and extends package exports/manifests and .gitignore entries for the new locale.

Changes

Cohort / File(s) Summary
Build scripts & ignore
packages/i18n/.gitignore, packages/i18n/scripts/build-jsr.ts, packages/i18n/scripts/build-npm.ts
Added sk to .gitignore and included sk in the languages imports/arrays used by build scripts.
Package manifests / exports
packages/i18n/package.json, packages/i18n/jsr.json
Added comprehensive ./sk export block with sub-paths for all validator modules (imports/types and require mappings) mirroring existing locales.
Language source & types
packages/i18n/src/sk.ts, packages/i18n/src/types.ts
Added new Slovak language module exporting localized error message factories and extended Language.code union to include 'sk'.
Changelog
packages/i18n/CHANGELOG.md
Added entry noting Slovak (sk) translations.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped through strings and schema trees so spry,

Slovak words now whisper when checks go awry.
Exports aligned and build scripts in tune,
Messages bloom beneath the validation moon.
Hooray — sk joined the i18n rune! 🌙✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: added Slovak i18n' clearly summarizes the main change—adding Slovak internationalization support—which is the primary focus of all file modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds Slovak (sk) as a new locale to the @valibot/i18n package, wiring it into the i18n build pipeline and published subpath exports.

Changes:

  • Add sk to the Language['code'] union type.
  • Introduce a new Slovak translation file (packages/i18n/src/sk.ts).
  • Register sk in i18n build scripts, package files, .gitignore, and add subpath exports for the locale.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/i18n/src/types.ts Adds sk to the set of supported locale codes.
packages/i18n/src/sk.ts New Slovak translation definitions (schema + specific messages).
packages/i18n/scripts/build-npm.ts Includes sk in the npm build language list.
packages/i18n/scripts/build-jsr.ts Includes sk in the JSR build language list.
packages/i18n/package.json Adds sk to files and adds export-map entries for Slovak subpaths.
packages/i18n/.gitignore Ignores generated sk output directory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread packages/i18n/src/sk.ts
Comment thread packages/i18n/package.json
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/i18n/package.json`:
- Around line 18705-19441: The Slovak locale export entries (all "./sk/*" export
keys such as "./sk/schema", "./sk/base64", "./sk/check", "./sk/uuid", etc.)
currently set "import.types" to "*.d.ts"; update every "./sk/..." export
object's import.types to point to the ESM type files with the ".d.mts" extension
instead of ".d.ts" (i.e. change "./sk/<name>.d.ts" → "./sk/<name>.d.mts" for all
~74 "./sk/*" entries) so that TypeScript resolves ESM types correctly for those
symbols.

In `@packages/i18n/src/sk.ts`:
- Around line 7-80: The Slovak `specific` object in sk.ts is missing 24 required
Language keys (e.g., domain, entries, gtValue, guard, isbn, isrc, jwsCompact,
ltValue, maxEntries, minEntries, notEntries, notValues, parseBoolean, parseJson,
rawCheck, rawTransform, rfcEmail, slug, stringifyJson, toBigint, toDate,
toNumber, toString, values) which breaks type-checking; fix by merging the
English fallback into the `specific` object (spread the English `specific`
defaults before/after the Slovak overrides) so all required handlers exist while
preserving existing Slovak translations in the `specific` object.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1ec0502b-7b10-448a-80fe-3b00c2f0e581

📥 Commits

Reviewing files that changed from the base of the PR and between 5a14033 and b4bc35e.

📒 Files selected for processing (6)
  • packages/i18n/.gitignore
  • packages/i18n/package.json
  • packages/i18n/scripts/build-jsr.ts
  • packages/i18n/scripts/build-npm.ts
  • packages/i18n/src/sk.ts
  • packages/i18n/src/types.ts

Comment thread packages/i18n/package.json
Comment thread packages/i18n/src/sk.ts
@fabian-hiller
Copy link
Copy Markdown
Member

I will finalize this PR or close it because there is also #1415

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 17, 2026

Open in StackBlitz

npm i https://pkg.pr.new/valibot@1334

commit: fc67c3f

@fabian-hiller fabian-hiller merged commit a3ce172 into open-circle:main Mar 17, 2026
12 of 14 checks passed
@fabian-hiller
Copy link
Copy Markdown
Member

v1.1.0 of our i18n package is out very soon

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

Labels

enhancement New feature or request size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants