-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(nuxt): require locale mapping for i18n integration (#1462)
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.
- Loading branch information
1 parent
5018480
commit 981495f
Showing
6 changed files
with
75 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@sit-onyx/nuxt": patch | ||
--- | ||
|
||
Only show registration order warning if nuxt-i18n is used |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@sit-onyx/nuxt": major | ||
"docs": patch | ||
--- | ||
|
||
Require mapping of onyx locales to the project ones. | ||
|
||
This change was necessary because registering all languages supported by onyx would force the project to also support them due to the way locales are merged by nuxt-i18n. |
This file contains 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
This file contains 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
This file contains 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
This file contains 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