Skip to content

Add Kinyarwanda (rw-RW) language translation#1489

Merged
fabian-hiller merged 4 commits into
open-circle:mainfrom
inkotany:feat/i18n-kinyarwanda-rw-RW
Jun 6, 2026
Merged

Add Kinyarwanda (rw-RW) language translation#1489
fabian-hiller merged 4 commits into
open-circle:mainfrom
inkotany:feat/i18n-kinyarwanda-rw-RW

Conversation

@inkotany

@inkotany inkotany commented May 31, 2026

Copy link
Copy Markdown
Contributor

Adds Kinyarwanda (rw) to the official @valibot/i18n translations #1489.

What's included

  • New locale file packages/i18n/src/rw.ts — all 101 specific messages + schema
  • 'rw' added to the Language.code union in src/types.ts
  • rw registered in scripts/build-npm.ts and scripts/build-jsr.ts
  • "Current status" table updated in packages/i18n/README.md

Translation notes

  • Reference Material: Translations were aligned with the official guidelines from the Rwanda Cultural Heritage Academy's ICT terminology glossary: Inkoranyamuga y'Ikoranabuhanga.
  • Simplification for Developers: Due to the inherently agglutinative and highly complex grammatical nature of Kinyarwanda, certain rigid academic terms were intentionally simplified or adapted to ensure that user-facing validation errors remain intuitive and clear for software developers and end-users alike (e.g., using Inyuguti for graphemes).
  • Follows the established message patterns:
    • X itamewe: hakiriwe ${received} for "Invalid X: Received Y"
    • X itemewe: hari hitezwe ${expected} ariko hakiriwe ${received} for "Expected Y but received Z"
  • Technical identifiers and acronyms are preserved according to standard localization practices (Base64, BIC, MAC, ULID, UUID, URL, JSON, JWS compact, Nano ID, IMEI, IP, ISBN, ISRC, Cuid2, BigInt, hash, slug).

Checks

  • pnpm lint passes (tsc --noEmit)
  • Follows the exact steps from packages/i18n/README.md#add-language

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

  • New Features
    • Added packages/i18n/src/rw.ts with full schema and specific messages; refined wording for clarity.
    • Registered rw in Language.code and build scripts; added ./rw/* exports in package.json and jsr.json.
    • Updated language support table and CHANGELOG.md.

Written for commit 89349a8. Summary will update on new commits.

Review in cubic

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

vercel Bot commented May 31, 2026

Copy link
Copy Markdown

@inkotany is attempting to deploy a commit to the Open Circle Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels May 31, 2026
@coderabbitai

coderabbitai Bot commented May 31, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

This 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)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: adding Kinyarwanda language translation support to the i18n package.
Description check ✅ Passed The description is directly related to the changeset, providing comprehensive context about what was added, translation methodology, and checks performed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between fa43437 and a8b72a0.

📒 Files selected for processing (5)
  • packages/i18n/README.md
  • packages/i18n/scripts/build-jsr.ts
  • packages/i18n/scripts/build-npm.ts
  • packages/i18n/src/rw-RW.ts
  • packages/i18n/src/types.ts

Comment thread packages/i18n/README.md Outdated
Comment thread packages/i18n/scripts/build-jsr.ts Outdated
import pt from '../src/pt';
import ro from '../src/ro';
import ru from '../src/ru';
import rwRW from '../src/rw-RW';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

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.

Suggested change
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.

Comment thread packages/i18n/scripts/build-npm.ts Outdated
import pt from '../src/pt';
import ro from '../src/ro';
import ru from '../src/ru';
import rwRW from '../src/rw-RW';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

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.

Suggested change
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.

Comment thread packages/i18n/src/rw.ts

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 5 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/i18n/README.md Outdated
@fabian-hiller

Copy link
Copy Markdown
Member

@inkotany can you check my last commit and let me know if it make the translation better or worse.

@pkg-pr-new

pkg-pr-new Bot commented Jun 6, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 89349a8

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
packages/i18n/src/rw.ts (1)

1-1: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use .ts extension in ESM import path.

Line 1 should use ./types.ts to 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 .ts extensions 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

📥 Commits

Reviewing files that changed from the base of the PR and between a8b72a0 and 89349a8.

📒 Files selected for processing (9)
  • packages/i18n/.gitignore
  • packages/i18n/CHANGELOG.md
  • packages/i18n/README.md
  • packages/i18n/jsr.json
  • packages/i18n/package.json
  • packages/i18n/scripts/build-jsr.ts
  • packages/i18n/scripts/build-npm.ts
  • packages/i18n/src/rw.ts
  • packages/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

@inkotany

inkotany commented Jun 6, 2026

Copy link
Copy Markdown
Contributor Author

@fabian-hiller yep, the improvements are smooth, my bad, I missed some but now it looks polished.
Do you know Kinyarwanda

@fabian-hiller

Copy link
Copy Markdown
Member

No, but my coding agent does. 😁

@fabian-hiller fabian-hiller merged commit 1545619 into open-circle:main Jun 6, 2026
16 of 17 checks passed
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:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants