feat(i18n): add Nuxt i18n and Lunaria translation tracking#305
Draft
RedStar071 wants to merge 5 commits into
Draft
feat(i18n): add Nuxt i18n and Lunaria translation tracking#305RedStar071 wants to merge 5 commits into
RedStar071 wants to merge 5 commits into
Conversation
Introduce npmx-style localization: @nuxtjs/i18n with no_prefix strategy, en source + it-IT locale files, Lunaria dashboard/status generation, and wire header/footer/chrome strings through $t with a locale preference. Co-authored-by: RedStar <redstar071@proton.me>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #305 +/- ##
==========================================
- Coverage 71.53% 71.44% -0.10%
==========================================
Files 167 173 +6
Lines 3302 3372 +70
Branches 702 711 +9
==========================================
+ Hits 2362 2409 +47
- Misses 447 466 +19
- Partials 493 497 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Comment on lines
+22
to
+27
| - name: Checkout | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| # Necessary for Lunaria to work properly | ||
| fetch-depth: 0 | ||
| persist-credentials: false |
There was a problem hiding this comment.
Checkout PR head
This pull_request_target workflow checks out the base repository default ref because no PR ref is supplied, so Lunaria runs against main instead of the PR's locale changes. The action will post an overview for stale base-branch files on every PR update; checkout needs ref: ${{ github.event.pull_request.head.sha }} before generating the overview.
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/lunaria.yml
Line: 22-27
Comment:
**Checkout PR head**
This `pull_request_target` workflow checks out the base repository default ref because no PR `ref` is supplied, so Lunaria runs against `main` instead of the PR's locale changes. The action will post an overview for stale base-branch files on every PR update; checkout needs `ref: ${{ github.event.pull_request.head.sha }}` before generating the overview.
How can I resolve this? If you propose a fix, please make it concise.Add an AppLocaleCode type guard for setLocale calls, harden the Lunaria build against dirty trees, and keep footer/nuxt tests in sync. Co-authored-by: RedStar <redstar071@proton.me>
Align the dashboard UI locale with the bot language keys (en-US / es-ES) by replacing it-IT with Español (es-ES). Co-authored-by: RedStar <redstar071@proton.me>
Wire CI i18n validation, autofix translation/Lunaria steps, zizmor exceptions, vue-i18n-extract report scripts, staged locale hooks, and i18n-ally / CONTRIBUTING docs to match npmx.dev. Co-authored-by: RedStar <redstar071@proton.me>
Co-authored-by: RedStar <redstar071@proton.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Nuxt i18n + Lunaria translation tracking modeled on npmx.dev, including the related CI workflows, autofix hooks, VS Code i18n-ally setup, and contributor docs.
en) source + Spanish (es-ES), matching Skyra/WolfStar locale keys@nuxtjs/i18n:no_prefixstrategy, browser detection off, preferred locale inlocalStoragelunaria.config.json+ nested-keystatus.jsonbuilder; dashboard at/lunaria/, status page at/translation-statusAppLocaleSelect, translation-status link in footeri18n:check/i18n:report/i18n:schema/build:lunaria(vp tasks +:fixpackage scripts)Workflows & related pieces (npmx-style)
.github/workflows/ci.yml→ 🌐 i18n validationpnpm vp run i18n:report+ schema drift check.github/workflows/lunaria.ymllunariajs/action(pull_request_target).github/workflows/autofix.ymli18n:check+build:lunariabefore lintvite.config.tsstaged hooki18n/locales/*changes → rebuild Lunaria + refresh schema.vscode/settings.json+extensions.json@intlify/vue-i18n-ally).github/CONTRIBUTING.mdAGENTS.md.github/zizmor.ymlTest plan
pnpm buildpnpm lint:fixpnpm typecheckpnpm testi18n:check/build:lunariawhen locale files change/translation-statusand/lunaria/Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Confidence Score: 4/5
The PR is close, but the translation-status asset serving path needs a fix before merging.
The main i18n setup is coherent, but the generated Lunaria assets are not served because the local Nuxt module is not registered.
nuxt.config.tsWhat T-Rex did
Prompt To Fix All With AI
Reviews (4): Last reviewed commit: "docs(agents): document i18n and Lunaria ..." | Re-trigger Greptile