Skip to content

feat(i18n): add Nuxt i18n and Lunaria translation tracking#305

Draft
RedStar071 wants to merge 5 commits into
mainfrom
cursor/lunaria-nuxt-i18n-98c9
Draft

feat(i18n): add Nuxt i18n and Lunaria translation tracking#305
RedStar071 wants to merge 5 commits into
mainfrom
cursor/lunaria-nuxt-i18n-98c9

Conversation

@RedStar071

@RedStar071 RedStar071 commented Jul 18, 2026

Copy link
Copy Markdown
Member

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.

  • Locales: English (en) source + Spanish (es-ES), matching Skyra/WolfStar locale keys
  • @nuxtjs/i18n: no_prefix strategy, browser detection off, preferred locale in localStorage
  • Lunaria: lunaria.config.json + nested-key status.json builder; dashboard at /lunaria/, status page at /translation-status
  • UI: locale-aware header/footer/auth chrome, AppLocaleSelect, translation-status link in footer
  • Tooling: i18n:check / i18n:report / i18n:schema / build:lunaria (vp tasks + :fix package scripts)

Workflows & related pieces (npmx-style)

Piece Purpose
.github/workflows/ci.yml🌐 i18n validation pnpm vp run i18n:report + schema drift check
.github/workflows/lunaria.yml PR overview comment via lunariajs/action (pull_request_target)
.github/workflows/autofix.yml Runs i18n:check + build:lunaria before lint
vite.config.ts staged hook On i18n/locales/* changes → rebuild Lunaria + refresh schema
.vscode/settings.json + extensions.json i18n Ally (@intlify/vue-i18n-ally)
.github/CONTRIBUTING.md Localization section (add locale, check/report, Lunaria)
AGENTS.md i18n / Lunaria command docs
.github/zizmor.yml Ignore dangerous-triggers + pin note for Lunaria workflow

Test plan

  • pnpm build
  • pnpm lint:fix
  • pnpm typecheck
  • pnpm test
  • CI: 🌐 i18n validation job green
  • CI: Lunaria overview comment posts on PR
  • Autofix runs i18n:check / build:lunaria when locale files change
  • Manual: switch to Español via footer selector; open /translation-status and /lunaria/
Open in Web Open in Cursor 

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with 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.ts

T-Rex T-Rex Logs

What T-Rex did

  • Verified the Lunaria module's runtime asset registration by running the Node/Nuxt repro harness, confirming dist/lunaria/status.json exists and parses as JSON, and that the Nitro publicAssets contain only /avatars with no /lunaria entry.
  • T-Rex produced a proof for the posted P1 finding, and the corresponding review comment contains the details.
  • Observed that the Nuxt app footer locale control renders English and cannot reveal Español; the DOM shows the combobox as closed (aria-expanded false) with no Español option, and the interaction video plus logs document the failure to surface Español.
  • Artifacts from the Lunaria repro harness and the locale-interaction run were captured and uploaded for reviewer access.

View all artifacts

T-Rex Ran code and verified through T-Rex

Fix All in Claude Code Fix All in Cursor Fix All in Cursor Cloud Agents

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
nuxt.config.ts:29-36
**Register Lunaria module**
`modules/lunaria.ts` is the only code that publishes `dist/lunaria` as Nitro public assets, but this config never registers that module. As shipped, `build:lunaria` can generate `dist/lunaria/status.json`, yet the Nuxt app has no `publicAssets` entry for `/lunaria/`, so `/translation-status` fetches `/lunaria/status.json` and always gets no data in production. Add the local module to `modules` before relying on the route.

Reviews (4): Last reviewed commit: "docs(agents): document i18n and Lunaria ..." | Re-trigger Greptile

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

codecov Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 67.60563% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.44%. Comparing base (8babfde) to head (7086a59).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
config/i18n.ts 69.69% 10 Missing ⚠️
app/app.vue 0.00% 4 Missing and 2 partials ⚠️
app/components/app/LocaleSelect.vue 63.63% 2 Missing and 2 partials ⚠️
app/composables/usePreferredLocale.ts 75.00% 1 Missing ⚠️
app/plugins/i18n-loader.client.ts 83.33% 1 Missing ⚠️
app/utils/is-app-locale.ts 50.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            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     
Flag Coverage Δ
component 66.12% <67.60%> (+0.03%) ⬆️
unit 67.71% <69.69%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
app/components/app/Footer.vue 100.00% <100.00%> (ø)
app/components/app/Header.vue 78.57% <100.00%> (+1.64%) ⬆️
app/components/app/HeaderAuth.vue 60.00% <100.00%> (+4.44%) ⬆️
app/composables/useFooter.ts 100.00% <100.00%> (ø)
app/composables/useHeader.ts 90.00% <100.00%> (+1.11%) ⬆️
app/utils/marketing-routes.ts 50.00% <ø> (ø)
i18n/i18n.config.ts 100.00% <100.00%> (ø)
package.json 100.00% <ø> (ø)
app/composables/usePreferredLocale.ts 75.00% <75.00%> (ø)
app/plugins/i18n-loader.client.ts 83.33% <83.33%> (ø)
... and 4 more
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Fix in Claude Code Fix in Cursor Fix in Cursor Cloud Agents

cursoragent and others added 4 commits July 18, 2026 18:22
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>
@codspeed-hq

codspeed-hq Bot commented Jul 18, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 44 untouched benchmarks


Comparing cursor/lunaria-nuxt-i18n-98c9 (7086a59) with main (8babfde)

Open in CodSpeed

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.

2 participants