Skip to content

fix(i18n): pass scope to components#339

Merged
danielroe merged 1 commit intonpmx-dev:mainfrom
BobbieGoede:fix/i18n-component-scope
Jan 29, 2026
Merged

fix(i18n): pass scope to components#339
danielroe merged 1 commit intonpmx-dev:mainfrom
BobbieGoede:fix/i18n-component-scope

Conversation

@BobbieGoede
Copy link
Copy Markdown
Contributor

This prevents these warning logs:
image

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 29, 2026

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

Project Deployment Actions Updated (UTC)
docs.npmx.dev Ready Ready Preview, Comment Jan 29, 2026 7:48pm
npmx.dev Ready Ready Preview, Comment Jan 29, 2026 7:48pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
npmx-lunaria Ignored Ignored Jan 29, 2026 7:48pm

Request Review

@userquin
Copy link
Copy Markdown
Member

shouldn't be global if not specified? at elk.zone we don't have any i18n-t with scope global 🤔

@BobbieGoede
Copy link
Copy Markdown
Contributor Author

@userquin yeah it falls back to global by default, this is just to get rid of the warnings

@danielroe danielroe enabled auto-merge January 29, 2026 23:08
@danielroe danielroe disabled auto-merge January 29, 2026 23:08
@danielroe danielroe added this pull request to the merge queue Jan 29, 2026
Merged via the queue into npmx-dev:main with commit 123029b Jan 29, 2026
13 of 20 checks passed
@cernymatej
Copy link
Copy Markdown

@BobbieGoede potentially a suggestion for a breaking change, but why isn't global the default (and not just a fallback) - i.e. no wraning?
I personally never use local scopes at all and I think that most users don't either. (might be mistaken, though...)

@BobbieGoede
Copy link
Copy Markdown
Contributor Author

BobbieGoede commented Jan 30, 2026

@cernymatej this behavior is from vue-i18n, by default the scope is inherited from its parent which could be global or local.

I think the warning was added because this behavior was confusing, without making a breaking change. I agree that a static default scope would probably be more intuitive.

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.

4 participants