Skip to content

fix: stop i18n:check adding empty keys - #3392

Merged
trueberryless merged 1 commit into
mainfrom
roman/fix-3391
Nov 1, 2026
Merged

trueberryless merged 1 commit into
mainfrom
roman/fix-3391

Conversation

@gameroman

Copy link
Copy Markdown
Member

🔗 Linked issue

Closes #3391

🧭 Context

📚 Description

@vercel

vercel Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
npmx.dev Ready Ready Preview Nov 1, 2026 12:15am UTC
2 Skipped Deployments
Project Deployment Actions Updated
docs.npmx.dev Ignored Ignored Preview Nov 1, 2026 12:15am UTC
npmx-lunaria Ignored Ignored Nov 1, 2026 12:15am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between fefe4f6 and 5135c5b.

Files selected for processing: 20
  • i18n/locales/ar.json
  • i18n/locales/az-AZ.json
  • i18n/locales/bg-BG.json
  • i18n/locales/fr-FR.json
  • i18n/locales/hi-IN.json
  • i18n/locales/hu-HU.json
  • i18n/locales/id-ID.json
  • i18n/locales/kn-IN.json
  • i18n/locales/mr-IN.json
  • i18n/locales/pl-PL.json
  • i18n/locales/pt-BR.json
  • i18n/locales/pt-PT.json
  • i18n/locales/ro-RO.json
  • i18n/locales/sr-Latn-RS.json
  • i18n/locales/ta-IN.json
  • i18n/locales/te-IN.json
  • i18n/locales/vi-VN.json
  • i18n/locales/zh-CN.json
  • i18n/locales/zh-TW.json
  • scripts/compare-translations.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Summary

Summary by CodeRabbit

  • Chores
    • Removed empty translation placeholders from several language packs while retaining existing translations.
    • Updated translation comparisons to omit empty sections consistently.
  • Bug Fixes
    • Corrected the Chinese translation for the deprecated package timeline label.
    • Added the missing Portuguese (Portugal) logo description.

The translation synchroniser now omits empty nested objects in all modes. Empty translation placeholders were removed from multiple locale files, and some populated translations were retained or moved.

Changes: Locale synchronisation and cleanup

Layer / File(s) Summary
Synchronise and prune empty locale entries
scripts/compare-translations.ts, i18n/locales/*.json
syncLocaleData omits empty nested results even when fix mode is disabled. Locale files remove empty placeholders. The Chinese (Simplified) deprecated translation moves into package.timeline.chart, and the Portuguese (Portugal) locale adds alt_logo_kawaii.

Suggested reviewers: alexdln

Merge Risk: Minimal · up to 5135c

The change prevents empty translation placeholders from being retained during synchronisation. No merge-blocking issue is established; merge after normal checks pass.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly states that the change prevents i18n:check from adding empty keys. It is concise and directly describes the main change.
Description check Passed The description links to issue #3391, which reports the same empty-key problem addressed by the changeset. The description is brief but related to the changes.
Linked Issues check Passed Issue #3391 requires i18n:check to stop creating empty locale objects after reference keys are removed. In scripts/compare-translations.ts, syncLocaleData now deletes a nested result when it has…
Out of Scope Changes check Passed The changes remain within issue #3391. The locale edits remove empty entries produced by the translation synchronisation, and the zh-CN edit preserves an existing translation at the reference struct…
Full details: Linked Issues check

Explanation

Issue #3391 requires i18n:check to stop creating empty locale objects after reference keys are removed. In scripts/compare-translations.ts, syncLocaleData now deletes a nested result when it has no keys, without requiring --fix. The changed locale files remove the resulting empty placeholders. No separate coding acceptance criteria or required automated tests are stated in issue #3391.

Full details: Out of Scope Changes check

Explanation

The changes remain within issue #3391. The locale edits remove empty entries produced by the translation synchronisation, and the zh-CN edit preserves an existing translation at the reference structure. No unrelated runtime behaviour or unrelated files are changed.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@gameroman gameroman changed the title fix i18n:check adding empty keys fix: fix i18n:check adding empty keys Oct 31, 2026
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the tracking.ignoredKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
i18n/locales/ar.json Localization changed, will be marked as complete.
i18n/locales/az-AZ.json Localization changed, will be marked as complete.
i18n/locales/bg-BG.json Localization changed, will be marked as complete.
i18n/locales/fr-FR.json Localization changed, will be marked as complete.
i18n/locales/hi-IN.json Localization changed, will be marked as complete.
i18n/locales/hu-HU.json Localization changed, will be marked as complete.
i18n/locales/id-ID.json Localization changed, will be marked as complete.
i18n/locales/kn-IN.json Localization changed, will be marked as complete.
i18n/locales/mr-IN.json Localization changed, will be marked as complete.
i18n/locales/pl-PL.json Localization changed, will be marked as complete.
i18n/locales/pt-BR.json Localization changed, will be marked as complete.
i18n/locales/pt-PT.json Localization changed, will be marked as complete.
i18n/locales/ro-RO.json Localization changed, will be marked as complete.
i18n/locales/sr-Latn-RS.json Localization changed, will be marked as complete.
i18n/locales/ta-IN.json Localization changed, will be marked as complete.
i18n/locales/te-IN.json Localization changed, will be marked as complete.
i18n/locales/vi-VN.json Localization changed, will be marked as complete.
i18n/locales/zh-CN.json Localization changed, will be marked as complete.
i18n/locales/zh-TW.json Localization changed, will be marked as complete.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@codecov

codecov Bot commented Oct 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@gameroman gameroman changed the title fix: fix i18n:check adding empty keys fix: stop i18n:check adding empty keys Nov 1, 2026
@gameroman
gameroman marked this pull request as ready for review November 1, 2026 00:18
@gameroman gameroman added the needs review This PR is waiting for a review from a maintainer label Nov 1, 2026
@gameroman
gameroman requested a review from a team November 1, 2026 00:20

@trueberryless trueberryless left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Amazing, looks perfect to me 🙌

@trueberryless
trueberryless added this pull request to the merge queue Nov 1, 2026
@trueberryless trueberryless added i18n Related to internationalization and removed needs review This PR is waiting for a review from a maintainer labels Nov 1, 2026
Merged via the queue into main with commit 1645564 Nov 1, 2026
28 checks passed
@trueberryless
trueberryless deleted the roman/fix-3391 branch November 1, 2026 07:44

This branch was successfully deployed

1 active deployment
Preview – npmx.dev — 5135c5ba Deployed Nov 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

i18n Related to internationalization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

i18n:check adds empty keys to all languages which creates massive diffs when an i18n key is removed

2 participants