-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
refactor: integrate vue-i18n-routing
#2686
refactor: integrate vue-i18n-routing
#2686
Conversation
vue-i18n-routing
You don't have to worry about that. :) |
I think you can remove them if they are not used in Nuxt I18n.
|
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.
Great! π
LGTM!
β Live Preview ready!
|
Thanks for the feedback!
Some of it is still being used but I have now removed the unused parts and cleaned/refactored the rest of the utils.
I think all that's left to do is to move/add the relevant tests from |
vue-i18n-routing
vue-i18n-routing
8963658
to
021465a
Compare
@kazupon Some of the tests had to be adjusted due to #2581. I haven't added the Moving the tests also revealed an existing bug as seen here https://github.com/nuxt-modules/i18n/pull/2686/files#diff-1e1fee9c39238ac92309cc638084d2fa0d3a898b6ea2f4f98de2d01188447306R46-R56. When using strategy |
@BobbieGoede
This may be due to a slight difference in behavior between the
|
It seems to be working π
What do you mean exactly? If there's any changes planned for I have no more changes for this PR, it can be merged if everything looks good! |
With using And I wanted to give i18n routing on SSR with using vike I wanted to give these to the vite community via |
* refactor: integrate routing compatibles * fix: routing integration * refactor: integrate and replace `vue-i18n-routing` * refactor: remove vue instance proxy * refactor: cleanup imports and duplicate code * refactor: restructure composables and remove unused global registry * refactor: remove unused type declaration file * refactor: remove links to `vue-i18n-routing` repo types * refactor: routing utils * refactor: cleanup routing utils and extends * test: add routing compatibles tests * test: add routing tests * test: fix routing tests * test: add `switchLocalePath` test * test: add test clarification
π Linked issue
β Type of change
π Description
As mentioned here intlify/routing#79 (comment) we want to integrate
vue-i18n-routing
in this repo.We probably want the tests from that repo as well, so I still need to work on that.
@kazupon
There is likely still quite some code that can be removed, and maybe the overall directory structure should be changed, let me know what you think.
I also removed the exclusions/splits that were added to support Vue 2, would this cause issues for Nuxt I18n Bridge/7.4? I removed it to lower the build size.
Also could you take a look at https://github.com/BobbieGoede/i18n/blob/refactor/integrate-routing-4/src/runtime/routing/utils.ts, I'm not sure if the checks are still relevant for Nuxt/Vue 3 as I don't fully understand the difference between
I18n
,VueI18n
andComposer
ππ Checklist