Skip to content

fix(i18n): align locale files with translation schema - #1417

Closed
Navdeepannu wants to merge 2 commits into
usekaneo:mainfrom
Navdeepannu:fix/i18n-baseline
Closed

fix(i18n): align locale files with translation schema#1417
Navdeepannu wants to merge 2 commits into
usekaneo:mainfrom
Navdeepannu:fix/i18n-baseline

Conversation

@Navdeepannu

@Navdeepannu Navdeepannu commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

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.json with the current translation keys and required fields.

  • Added missing translation keys to the following locales:

    • German (de-DE)
    • Greek (el-GR)
    • Spanish (es-ES)
    • French (fr-FR)
    • Indonesian (id-ID)
    • Korean (ko-KR)
    • Macedonian (mk-MK)
    • Dutch (nl-NL)
    • Russian (ru-RU)
    • Turkish (tr-TR)
    • Ukrainian (uk-UA)
  • Removed outdated or inconsistent entries where necessary.

  • Aligned locale structures so they can be validated consistently against the shared schema.

This PR establishes the translation structure and fallback baseline. Native-language translation improvements can be handled separately without blocking schema consistency.

Related Issue(s)

Fixes #

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test addition or update
  • Other (please describe):

How Has This Been Tested?

  • Unit tests
  • Integration tests
  • Manual testing
  • Other: Verified that the updated locale files follow the structure defined in i18n/schema.json

Screenshots

Not applicable. This PR only updates translation resources and their JSON schema.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

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

  • New Features
    • Added localized text for workspace label and role management, including permissions, validation, dialogs, and notifications.
    • Added notification preferences and messages for comments, mentions, overdue tasks, due-date reminders, and configurable reminder timing.
    • Added support text for webhook events, task imports/exports, task moving, workflow integrations, and the “blocked by” relation.
    • Expanded team and invitation messaging, including viewer roles, invitation status, expiry details, and role updates.
  • Documentation
    • Updated translation coverage across multiple languages for newly available interface areas.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

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

Changes

Localization catalog expansion

Layer / File(s) Summary
i18n schema contracts
i18n/schema.json
Adds schema properties and required entries for notification preferences, webhook events, reminder units, notification events, and team invitations.
Workspace labels and roles
i18n/*-*.json
Adds workspace label CRUD text and workspace role, permission, validation, dialog, and toast strings.
Notifications and integrations
i18n/*-*.json
Adds notification event and reminder text, webhook event labels, integration copy, and workflow editor strings.
Task, authentication, and project copy
i18n/*-*.json
Adds sign-in errors, task relations and actions, task activity and lookup messages, project navigation, and read-only empty-state text.
Team members and invitations
i18n/*-*.json
Adds viewer/member labels, member-page text, invitation metadata, invite errors, and role-update statuses.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

  • usekaneo/kaneo#1253: Introduces the workspace RBAC concepts represented by the new workspace role translations.
  • usekaneo/kaneo#1399: Adds backend reminder events represented by the new notification and webhook strings.
  • usekaneo/kaneo#1413: Implements team invitation copy-link behavior supported by the added invitation and role-update strings.

Suggested reviewers: tinsever, andrejsshell

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: syncing i18n locale files with the translation schema.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Align i18n schema and locale catalogs to current translation keys

🐞 Bug fix ⚙️ Configuration changes 🕐 40+ Minutes

Grey Divider

AI Description

• Update i18n JSON schema to match the current translation key structure.
• Backfill missing keys across locales to prevent runtime fallback/key drift.
• Normalize inconsistent entries so all catalogs validate against one schema.
Diagram

graph TD
A["Kaneo UI"] --> B["i18n loader"] --> C["Locale JSONs"]
D["i18n/schema.json"] --> E["Schema validation"] --> C
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Generate schema from a canonical locale (e.g., en-US)
  • ➕ Removes manual schema maintenance by deriving it from the source of truth.
  • ➕ Reduces risk of schema/locale divergence over time.
  • ➖ Requires build tooling/codegen and a defined canonical locale.
  • ➖ Harder to express constraints beyond what the canonical file contains.
2. Add CI gating for schema validation on i18n changes
  • ➕ Prevents future drift immediately with fast feedback.
  • ➕ Keeps this PR’s baseline intact long-term.
  • ➖ Needs a validator wired into CI and maintained.
  • ➖ May increase contributor friction when new keys are introduced.
3. Scripted backfill of missing keys across locales
  • ➕ Repeatable workflow for future key additions.
  • ➕ Less error-prone than manual edits across many locale files.
  • ➖ Still needs review of placeholders/values.
  • ➖ Adds repo tooling that must be kept up-to-date.

Recommendation: The PR’s approach (update schema, then synchronize catalogs) is the right baseline-setting move for immediate consistency. Follow up by adding CI validation and/or automated backfill generation from a canonical locale to prevent drift from reappearing.

Files changed (12) +2991 / -127

Bug fix (11) +2738 / -101
de-DE.jsonBackfill missing DE keys for roles/labels, invitations, and notifications +180/-6

Backfill missing DE keys for roles/labels, invitations, and notifications

• Adds missing authentication error keys and expands catalog coverage for workspace labels/roles, task link types, project empty-state messaging, member roles, invitations, and role-update toasts. Ensures the German catalog matches the updated schema-required key set.

i18n/de-DE.json

el-GR.jsonBackfill missing EL keys for notification preferences and admin sections +226/-10

Backfill missing EL keys for notification preferences and admin sections

• Adds missing auth error keys and notification preference fields (event categories, reminder lead time labels/validation). Also fills webhook event coverage and workspace labels/roles keys to match the updated schema.

i18n/el-GR.json

es-ES.jsonSynchronize ES catalog with schema, including Gitea integration strings +454/-12

Synchronize ES catalog with schema, including Gitea integration strings

• Adds missing auth error keys, integration section headings/subtitles (including Gitea/Telegram), and many missing keys (e.g., Gitea integration UI, webhook reminder lead time label, workspace labels/roles). Aligns the Spanish catalog structure to validate against the updated schema.

i18n/es-ES.json

fr-FR.jsonBackfill missing FR keys for notification preferences and admin sections +201/-3

Backfill missing FR keys for notification preferences and admin sections

• Adds the new notification preference fields, webhook reminder lead time label, and workspace labels/roles key groups required by schema. Updates event/webhook coverage to avoid missing-key fallbacks.

i18n/fr-FR.json

id-ID.jsonBackfill missing ID keys for notifications and notification templates +70/-4

Backfill missing ID keys for notifications and notification templates

• Adds notification preference fields, webhook reminder lead time label, workspace labels keys, new notification templates (due-date reminder, task comment, overdue), and reminder lead-time pluralization strings. Syncs members table keys (e.g., "you") to schema.

i18n/id-ID.json

ko-KR.jsonBackfill missing KO keys for notification preferences and admin sections +223/-9

Backfill missing KO keys for notification preferences and admin sections

• Adds missing auth error keys, the full notification preference key set, webhook reminder lead time label, and workspace labels/roles keys. Ensures the Korean catalog matches schema-required keys and expanded event coverage.

i18n/ko-KR.json

mk-MK.jsonBackfill missing MK keys for notification preferences and admin sections +226/-10

Backfill missing MK keys for notification preferences and admin sections

• Adds missing auth error keys, new notification preference fields, webhook reminder lead time label, and workspace labels/roles key groups. Aligns Macedonian catalog structure to the shared schema.

i18n/mk-MK.json

nl-NL.jsonSynchronize NL catalog with schema, including Gitea integration strings +452/-11

Synchronize NL catalog with schema, including Gitea integration strings

• Adds missing auth error keys, integration section headings/subtitles (including Gitea/Telegram), and many missing keys (e.g., Gitea integration UI, webhook reminder lead time label, workspace labels/roles). Aligns the Dutch catalog structure to validate against the updated schema.

i18n/nl-NL.json

ru-RU.jsonBackfill missing RU keys for notifications and import/export strings +253/-18

Backfill missing RU keys for notifications and import/export strings

• Adds missing auth error keys, notification preference fields, webhook reminder lead time label, and workspace labels/roles. Backfills import/export task strings and additional import result messaging to satisfy schema requirements.

i18n/ru-RU.json

tr-TR.jsonBackfill missing TR keys for notification preferences and admin sections +219/-5

Backfill missing TR keys for notification preferences and admin sections

• Adds missing auth error keys and fills notification preference keys, webhook reminder lead time label, and workspace labels/roles groups. Brings the Turkish catalog into alignment with the updated schema-required keys.

i18n/tr-TR.json

uk-UA.jsonBackfill missing UK keys for notifications and import/export strings +234/-13

Backfill missing UK keys for notifications and import/export strings

• Adds missing auth error keys, notification preference fields, webhook reminder lead time label, and workspace labels/roles. Backfills import/export task strings and related descriptions so the Ukrainian catalog validates against the schema.

i18n/uk-UA.json

Other (1) +253 / -26
schema.jsonExtend schema for notification preferences, reminders, and invitations +253/-26

Extend schema for notification preferences, reminders, and invitations

• Adds/marks required keys for notification preferences (workspace enablement, event types, reminder lead time UI), expands webhook/notification event definitions, introduces reminder lead-time pluralization structure, and adds invitations/members required fields. Normalizes schema sections for consistent validation.

i18n/schema.json

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 90d8b69 and 07d95da.

📒 Files selected for processing (12)
  • i18n/de-DE.json
  • i18n/el-GR.json
  • i18n/es-ES.json
  • i18n/fr-FR.json
  • i18n/id-ID.json
  • i18n/ko-KR.json
  • i18n/mk-MK.json
  • i18n/nl-NL.json
  • i18n/ru-RU.json
  • i18n/schema.json
  • i18n/tr-TR.json
  • i18n/uk-UA.json

Comment thread i18n/uk-UA.json
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Plural keys violate schema 🐞 Bug ≡ Correctness
Description
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.
Code

i18n/ru-RU.json[R1810-1811]

+			"success_other": "{{count}} задач архивировано",
+			"success": "Archived {{count}} tasks"
Evidence
ru-RU retains plural-suffix keys under tasks.archive that the generated schema cannot represent
because it restricts the object to a single success property and forbids additional properties; at
the same time, scripts/i18n/check.mjs computes “extra” keys via an exact set difference against
en-US keys, so these plural variants will remain failing unless the tooling/schema becomes
plural-aware.

i18n/ru-RU.json[1806-1812]
i18n/schema.json[7058-7067]
scripts/i18n/check.mjs[29-37]
scripts/i18n/schema.mjs[5-13]
scripts/i18n/schema.mjs[24-35]
scripts/i18n/report.mjs[13-16]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## 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


Grey Divider

Qodo Logo

Comment thread i18n/ru-RU.json
Comment on lines +1810 to +1811
"success_other": "{{count}} задач архивировано",
"success": "Archived {{count}} tasks"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

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

@Navdeepannu
Navdeepannu deleted the fix/i18n-baseline branch July 22, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant