Uh oh!
There was an error while loading. Please reload this page.
chore: prevent adding missing entries to wrong locale files - #1157
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughThis pull request makes two changes to translation tooling: it appends a trailing newline when writing JSON locale files in Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Thank you. I tested with the same text files in #1063 and existing JSON. And, lunaria doesn't strip the newline at EOF 😀
There's only one remaining issue, when it runs in all locale mode (runAllLocales()) that is without specifying a specific locale in the command, it still try processing ar-EG. We should filter out that such case.
> pnpm run i18n:check:fix
> npmx@0.0.0 i18n:check:fix /home/shuuji3/dev/npmx.dev
> node scripts/compare-translations.ts --fix
Error: Locale "ar-EG" cannot be fixed, fix the ar locale instead!
ELIFECYCLE Command failed with exit code 1.@shuuji3 Changes in this PR will prevent to run |
I'm going to update the logic... |
@shuuji3 to collect the info, the ![]() |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.

This PR is the continuation of #1063 where we didn't prevent fix wrong locale files (locales):
nr i18n:check:fix es-ESis wrong, we should runnr i18n:check:fix esnr i18n:check:fix es-419, since i18n will do the work for us (we should fix only language locale)i18n:check:fix: won't save files withmergeLocale: trueThis PR also includes a fix when running
build:lunariascript, won't add extra\nat the end./cc @shuuji3