-
Notifications
You must be signed in to change notification settings - Fork 463
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: add basic module locale merging #1955
feat: add basic module locale merging #1955
Conversation
This is great PR! β€οΈ We can replace the This PR solves these problems by lazy loading of the locale on runtime builds and Nuxt layers. |
@kazupon I added some documentation as well as a basic test and I haven't touched the The |
@BobbieGoede
I will write the documentation for
Yes! |
* feat: add basic module locale merging * refactor: rewrite LocaleObject merging to be generic and reusable * fix: register module hook type * docs: add documentation describing registerModule hook * test: add register module hook test
π Linked issue
#1942
β Type of change
π Description
Allows modules to provide locales in a similar way to layers (#1925), as a potential replacement for
i18n:extend-messages
hook.Current usage is using a hook to register your module with its i18n configuration, similar to configuring lazy-load locales. Other locale configuration have not been implemented yet. If a different approach is preferred please let me know!
This PR is still a work in progress, implementation will be more generic to prevent code duplication as it has in its current state. I will add tests and docs later if it's clear that we want this functionality to be added and the usage is agreed on.
π Checklist