-
Notifications
You must be signed in to change notification settings - Fork 473
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
feat: configurable directory restructure #3054
feat: configurable directory restructure #3054
Conversation
Thanks! It might be good to be able to change the top directory name, as this might cause conflicts with users and 3rd vendors. |
@kazupon We should set the default value in a separate PR as that would be a breaking change, but these changes should be fully compatible with v8, so users can opt into the restructure. I've tried to update the v9 docs to already reflect the new default values, hopefully I haven't missed anything 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done!
Thank you so much always 💚 !
* feat: i18n dir resolve * feat: i18n dir resolve * test: add restructure test * refactor: file resolution * fix: layer option validation * docs: describe breaking folder structure change * fix: layer validation * chore: update lockfile * test: change fixture structure * feat: `restructureDir` option * docs: describe restructure and compatible option
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@nuxtjs/i18n](https://i18n.nuxtjs.org) ([source](https://github.com/nuxt-community/i18n-module)) | [`^8.3.3` -> `^8.4.0`](https://renovatebot.com/diffs/npm/@nuxtjs%2fi18n/8.3.3/8.4.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@nuxtjs%2fi18n/8.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@nuxtjs%2fi18n/8.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@nuxtjs%2fi18n/8.3.3/8.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@nuxtjs%2fi18n/8.3.3/8.4.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>nuxt-community/i18n-module (@​nuxtjs/i18n)</summary> ### [`v8.4.0`](https://github.com/nuxt-modules/i18n/releases/tag/v8.4.0) [Compare Source](https://github.com/nuxt-community/i18n-module/compare/v8.3.3...v8.4.0) ##### 🚀 Features - Configurable directory restructure - by [@​BobbieGoede](https://github.com/BobbieGoede) in [nuxt-modules/i18n#3054 [<samp>(c906a)</samp>](https://github.com/nuxt-modules/i18n/commit/c906a8d9) ##### 🐞 Bug Fixes - Rename locale `iso` property to `language` - by [@​BobbieGoede](https://github.com/BobbieGoede) in [nuxt-modules/i18n#3055 [<samp>(df938)</samp>](https://github.com/nuxt-modules/i18n/commit/df938371) - `strategy: 'no_prefix'` when using `differentDomains` - by [@​BobbieGoede](https://github.com/BobbieGoede) in [nuxt-modules/i18n#3061 [<samp>(53f16)</samp>](https://github.com/nuxt-modules/i18n/commit/53f16e6a) ##### [View changes on GitHub](https://github.com/nuxt-modules/i18n/compare/v8.3.3...v8.4.0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View the [repository job log](https://developer.mend.io/github/antoinezanardi/werewolves-assistant-web-next). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AiLCJsYWJlbHMiOltdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
🔗 Linked issue
srcDir
instead ofrootDir
#2983❓ Type of change
📚 Description
This is still a work in progress!
This changes the way files are resolved and can be enabled by setting
restructureDir: 'i18n'
. This is no longer a breaking change as it is disabled by default allowing users a path to migrate before updating to v9, we will have to make sure to set the default values for v9 before release!With
restructureDir
set toi18n
the directory structure would look like so:And
langDir
will have a default value oflocales
, perhaps we may want to rename this tomessages
instead?This kind of tackles #2983, as with this feature enabled we would resolve from
<rootDir>/i18n/
for all i18n files.📝 Checklist