feat: added Slovak i18n#1334
Conversation
|
Someone is attempting to deploy a commit to the Valibot Team on Vercel. A member of the Team first needs to authorize it. |
martinzilak
left a comment
There was a problem hiding this comment.
Overall looks (and sounds) good to me, Slovak is my first language.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughAdds Slovak (sk) locale to the i18n package: introduces a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
There was a problem hiding this comment.
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
skto theLanguage['code']union type. - Introduce a new Slovak translation file (
packages/i18n/src/sk.ts). - Register
skin i18n build scripts, packagefiles,.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.
There was a problem hiding this comment.
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
📒 Files selected for processing (6)
packages/i18n/.gitignorepackages/i18n/package.jsonpackages/i18n/scripts/build-jsr.tspackages/i18n/scripts/build-npm.tspackages/i18n/src/sk.tspackages/i18n/src/types.ts
|
I will finalize this PR or close it because there is also #1415 |
commit: |
|
v1.1.0 of our i18n package is out very soon |
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
Documentation
Chores