Skip to content

refactor(i18n): use $t in script#182

Merged
danielroe merged 4 commits intonpmx-dev:mainfrom
BobbieGoede:refactor/i18n-usage
Jan 27, 2026
Merged

refactor(i18n): use $t in script#182
danielroe merged 4 commits intonpmx-dev:mainfrom
BobbieGoede:refactor/i18n-usage

Conversation

@BobbieGoede
Copy link
Copy Markdown
Contributor

This feature is enabled by default and the documentation is lacking https://i18n.nuxtjs.org/docs/api/options#autodeclare, the PR is more descriptive nuxt-modules/i18n#2858.

Essentially nuxt-i18n checks and adds const { t: $t } = useI18n() if needed inside script tags making translating consistent between template and script. (also makes it easier to statically retrieve keys per component/page if I ever have time to work on it)

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 27, 2026

@BobbieGoede is attempting to deploy a commit to the danielroe Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 27, 2026

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

Project Deployment Review Updated (UTC)
npmx.dev Ready Ready Preview, Comment Jan 27, 2026 5:01pm

Request Review

@danielroe danielroe merged commit 17b07e0 into npmx-dev:main Jan 27, 2026
8 checks passed
vinnymac pushed a commit to vinnymac/npmx.dev that referenced this pull request Jan 28, 2026
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