Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(nuxt): require locale mapping for i18n integration #1462

Merged
merged 4 commits into from
Jul 1, 2024

Conversation

markbrockhoff
Copy link
Member

This PR fixes an issue with the registration order warning of the nuxt module.
It also requires the user to specify a mapping for onyx locales to the locales from nuxt-i18n specific to their project.
This fixes a bug where all projects would display all locales of onyx as supported languages even if they were not specified within the project.
An issue and PR were already created for nuxt-i18n to support loading locales from npm packages. (nuxt-modules/i18n#2999)
This way it would be possible to decouple onyx and nuxt-i18n while preserving easy support and customizability. This PR should make the onyx module useable until the feature is available inside nuxt-i18n.

Checklist

  • The added / edited code has been documented with JSDoc
  • All changes are documented in the documentation app (folder apps/docs)
  • If a new component is added, at least one Playwright screenshot test is added
  • A changeset is added with npx changeset add if your changes should be released as npm package (because they affect the library usage)

@markbrockhoff markbrockhoff requested a review from a team as a code owner July 1, 2024 09:23
Copy link

changeset-bot bot commented Jul 1, 2024

🦋 Changeset detected

Latest commit: 459a9d0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@sit-onyx/nuxt Major
docs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

apps/docs/src/development/packages/nuxt.md Show resolved Hide resolved
packages/nuxt/src/module.ts Show resolved Hide resolved
.changeset/old-dogs-sin.md Outdated Show resolved Hide resolved
@larsrickert larsrickert self-assigned this Jul 1, 2024
@larsrickert larsrickert merged commit 981495f into main Jul 1, 2024
19 checks passed
@larsrickert larsrickert deleted the nuxt/fix-locale-registration branch July 1, 2024 14:34
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