Add Kinyarwanda (rw-RW) language translation#1489
Conversation
- Added src/rw-RW.ts with full Kinyarwanda translations for all Valibot validation error messages - Registered rw-RW in Language type union in src/types.ts - Added rwRW import and array entry in build-jsr.ts and build-npm.ts build scripts - Added Kinyarwanda entry to README.md language support table
|
@inkotany is attempting to deploy a commit to the Open Circle Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThis PR adds Kinyarwanda (rw-RW) language support to the i18n package. It extends the Language type code union with 'rw-RW', creates a new locale module with Kinyarwanda validation message translations, integrates the language into both JSR and npm build scripts, updates package.json and jsr.json with the new locale's file inclusions and export mappings, and documents the addition in the README status table, changelog, and project configuration files. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/i18n/README.md`:
- Line 43: Update the broken placeholder link "[#]" in the README table row for
"Kinyarwanda (rw-RW)" to reference the actual PR number used elsewhere (PR `#1489`
or the same named reference style used by other rows); locate the row containing
the text "Kinyarwanda (rw-RW)" and replace the placeholder "[#]" with the
project's standard PR reference format for 1489 so the link resolves correctly.
In `@packages/i18n/scripts/build-jsr.ts`:
- Line 28: Update the ESM import in build-jsr.ts to include the .ts extension:
locate the import statement that brings in the rw-RW module (import rwRW from
'../src/rw-RW') and change the module specifier to '../src/rw-RW.ts' so it
complies with the project's ESM/ESLint rule requiring .ts extensions for
TypeScript imports.
In `@packages/i18n/scripts/build-npm.ts`:
- Line 27: The import in build-npm.ts is using a bare module path; update the
import of rwRW to include the .ts extension so ESM resolution and ESLint rules
pass — change the import statement that references '../src/rw-RW' (symbol: rwRW)
to import from '../src/rw-RW.ts' and keep the imported identifier rwRW
unchanged.
In `@packages/i18n/src/rw-RW.ts`:
- Line 1: Update the ESM import to include the .ts extension: change the type
import for Language in rw-RW.ts from './types' to './types.ts' so the line
importing Language uses the explicit .ts extension to satisfy the project's ESM
import rule and ESLint checker.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6341f23e-3f4e-4055-bd4b-4f96b069307f
📒 Files selected for processing (5)
packages/i18n/README.mdpackages/i18n/scripts/build-jsr.tspackages/i18n/scripts/build-npm.tspackages/i18n/src/rw-RW.tspackages/i18n/src/types.ts
| import pt from '../src/pt'; | ||
| import ro from '../src/ro'; | ||
| import ru from '../src/ru'; | ||
| import rwRW from '../src/rw-RW'; |
There was a problem hiding this comment.
Import path should include .ts extension.
Line 28 should use ../src/rw-RW.ts for guideline-compliant ESM imports.
Suggested fix
-import rwRW from '../src/rw-RW';
+import rwRW from '../src/rw-RW.ts';As per coding guidelines, **/*.{ts,tsx,js,jsx}: Use ESM with .ts extensions in imports (enforced by ESLint).
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| import rwRW from '../src/rw-RW'; | |
| import rwRW from '../src/rw-RW.ts'; |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/i18n/scripts/build-jsr.ts` at line 28, Update the ESM import in
build-jsr.ts to include the .ts extension: locate the import statement that
brings in the rw-RW module (import rwRW from '../src/rw-RW') and change the
module specifier to '../src/rw-RW.ts' so it complies with the project's
ESM/ESLint rule requiring .ts extensions for TypeScript imports.
| import pt from '../src/pt'; | ||
| import ro from '../src/ro'; | ||
| import ru from '../src/ru'; | ||
| import rwRW from '../src/rw-RW'; |
There was a problem hiding this comment.
Import path should include .ts extension.
Line 27 should import from ../src/rw-RW.ts to satisfy ESM import conventions in this repo.
Suggested fix
-import rwRW from '../src/rw-RW';
+import rwRW from '../src/rw-RW.ts';As per coding guidelines, **/*.{ts,tsx,js,jsx}: Use ESM with .ts extensions in imports (enforced by ESLint).
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| import rwRW from '../src/rw-RW'; | |
| import rwRW from '../src/rw-RW.ts'; |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/i18n/scripts/build-npm.ts` at line 27, The import in build-npm.ts is
using a bare module path; update the import of rwRW to include the .ts extension
so ESM resolution and ESLint rules pass — change the import statement that
references '../src/rw-RW' (symbol: rwRW) to import from '../src/rw-RW.ts' and
keep the imported identifier rwRW unchanged.
There was a problem hiding this comment.
1 issue found across 5 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
@inkotany can you check my last commit and let me know if it make the translation better or worse. |
commit: |
There was a problem hiding this comment.
♻️ Duplicate comments (1)
packages/i18n/src/rw.ts (1)
1-1:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winUse
.tsextension in ESM import path.Line 1 should use
./types.tsto match the repo ESM import rule.Suggested fix
-import type { Language } from './types'; +import type { Language } from './types.ts';As per coding guidelines,
**/*.{ts,tsx,js,jsx}: Use ESM with.tsextensions in imports (enforced by ESLint).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/i18n/src/rw.ts` at line 1, Update the ESM import in rw.ts to use the .ts extension: change the import that references the Language type (import type { Language } from './types') to include the file extension (import type { Language } from './types.ts') so it follows the repo's ESM import rule and ESLint configuration.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Duplicate comments:
In `@packages/i18n/src/rw.ts`:
- Line 1: Update the ESM import in rw.ts to use the .ts extension: change the
import that references the Language type (import type { Language } from
'./types') to include the file extension (import type { Language } from
'./types.ts') so it follows the repo's ESM import rule and ESLint configuration.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 995570d0-e47c-4d8d-93bc-340cfe46b904
📒 Files selected for processing (9)
packages/i18n/.gitignorepackages/i18n/CHANGELOG.mdpackages/i18n/README.mdpackages/i18n/jsr.jsonpackages/i18n/package.jsonpackages/i18n/scripts/build-jsr.tspackages/i18n/scripts/build-npm.tspackages/i18n/src/rw.tspackages/i18n/src/types.ts
✅ Files skipped from review due to trivial changes (2)
- packages/i18n/CHANGELOG.md
- packages/i18n/.gitignore
🚧 Files skipped from review as they are similar to previous changes (3)
- packages/i18n/src/types.ts
- packages/i18n/scripts/build-npm.ts
- packages/i18n/scripts/build-jsr.ts
|
@fabian-hiller yep, the improvements are smooth, my bad, I missed some but now it looks polished. |
|
No, but my coding agent does. 😁 |
Adds Kinyarwanda (
rw) to the official@valibot/i18ntranslations #1489.What's included
packages/i18n/src/rw.ts— all 101 specific messages + schema'rw'added to theLanguage.codeunion insrc/types.tsrwregistered inscripts/build-npm.tsandscripts/build-jsr.tspackages/i18n/README.mdTranslation notes
Inyugutifor graphemes).X itamewe: hakiriwe ${received}for "Invalid X: Received Y"X itemewe: hari hitezwe ${expected} ariko hakiriwe ${received}for "Expected Y but received Z"Checks
pnpm lintpasses (tsc --noEmit)packages/i18n/README.md#add-languageKinyarwanda is a Bantu language spoken by over 12 million people, primarily in Rwanda, where it is an official language.
Murakoze!
Summary by cubic
Adds Kinyarwanda (rw) translations to
@valibot/i18n, enabling localized validation errors with npm and JSR support.packages/i18n/src/rw.tswith full schema and specific messages; refined wording for clarity.rwinLanguage.codeand build scripts; added./rw/*exports inpackage.jsonandjsr.json.CHANGELOG.md.Written for commit 89349a8. Summary will update on new commits.