fix(i18n): align locale files with translation schema - #1417
Conversation
📝 WalkthroughWalkthroughThe PR expands eleven locale catalogs and the shared i18n schema with strings for notification preferences, webhooks, workspace labels and roles, task actions, authentication, projects, and team member and invitation flows. ChangesLocalization catalog expansion
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
PR Summary by QodoAlign i18n schema and locale catalogs to current translation keys
AI Description
Diagram
High-Level Assessment
Files changed (12)
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@i18n/uk-UA.json`:
- Around line 1091-1093: Add Ukrainian _few and _many plural translations for
permissionCount and reminderLeadTime.days, reminderLeadTime.hours, and
reminderLeadTime.minutes in the locale data, preserving the existing _one and
_other entries and using correct Ukrainian forms for counts 2–4 and 5+.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: dd18128f-e5bd-40c2-ac82-5b4f22dd3fc4
📒 Files selected for processing (12)
i18n/de-DE.jsoni18n/el-GR.jsoni18n/es-ES.jsoni18n/fr-FR.jsoni18n/id-ID.jsoni18n/ko-KR.jsoni18n/mk-MK.jsoni18n/nl-NL.jsoni18n/ru-RU.jsoni18n/schema.jsoni18n/tr-TR.jsoni18n/uk-UA.json
Code Review by Qodo
1. Plural keys violate schema
|
| "success_other": "{{count}} задач архивировано", | ||
| "success": "Archived {{count}} tasks" |
There was a problem hiding this comment.
1. Plural keys violate schema 🐞 Bug ≡ Correctness
Some locales still contain i18next plural-suffix keys (e.g., *_few, *_many) while i18n/schema.json (generated from en-US.json) disallows unknown properties, so these locales cannot validate against the schema. This PR adds the base key (e.g. tasks.archive.success) without addressing the plural variants, so scripts/i18n/check.mjs will continue reporting “extra keys” vs en-US and schema/tooling remains inconsistent.
Agent Prompt
## Issue description
Some locales legitimately use i18next plural-suffix keys (e.g. `_few`, `_many`) but `i18n/schema.json` is generated strictly from `en-US.json` and sets `additionalProperties: false`, so those locales can never validate against the schema. Additionally, `scripts/i18n/check.mjs` does an exact keyset comparison against en-US and will keep reporting these plural keys as “extra”.
This PR adds base keys (e.g. `tasks.archive.success`) while leaving plural variants in place, increasing the mismatch between strict-schema expectations and i18next pluralization practices.
## Issue Context
- Example: `i18n/ru-RU.json` has `tasks.archive.success_one|few|many|other` and now also `success`.
- Schema defines `tasks.archive` as an object with only `{ success }` and `additionalProperties: false`.
- `scripts/i18n/check.mjs` flags any keys not present in en-US as extra.
## Fix Focus Areas
- scripts/i18n/check.mjs[29-37]
- scripts/i18n/schema.mjs[5-13]
- scripts/i18n/schema.mjs[24-35]
- scripts/i18n/report.mjs[13-16]
- i18n/schema.json[7058-7067]
## Suggested fix direction
1. Update `scripts/i18n/check.mjs` to treat plural families as equivalent to the base key (mirror the plural-suffix handling that already exists in `scripts/i18n/report.mjs`).
2. Update `scripts/i18n/schema.mjs` generation to allow plural-suffix keys alongside the base key for string leaves (e.g. add `patternProperties` for `.*_(zero|one|two|few|many|other)$` with `{ type: "string" }` at generated object nodes, or otherwise represent plural families).
3. Re-generate `i18n/schema.json` and re-run the i18n scripts to confirm locales like `ru-RU` no longer fail schema/keyset validation.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Description
Establishes a consistent i18n baseline across Kaneo’s locale files.
This PR updates the locale JSON schema to reflect the current translation structure and synchronizes incomplete locale files with the required translation keys. This prevents locales from drifting from the expected schema and provides a complete baseline for future translation work.
Changes
Updated
i18n/schema.jsonwith the current translation keys and required fields.Added missing translation keys to the following locales:
de-DE)el-GR)es-ES)fr-FR)id-ID)ko-KR)mk-MK)nl-NL)ru-RU)tr-TR)uk-UA)Removed outdated or inconsistent entries where necessary.
Aligned locale structures so they can be validated consistently against the shared schema.
Related Issue(s)
Fixes #
Type of Change
How Has This Been Tested?
i18n/schema.jsonScreenshots
Not applicable. This PR only updates translation resources and their JSON schema.
Checklist
Additional Notes
This PR intentionally focuses on keeping locale files structurally complete and aligned with the schema. It does not attempt to verify the linguistic accuracy of every translated value.
Follow-up contributions can improve individual translations while preserving the consistent key structure introduced here.
Summary by CodeRabbit