Closed UfukUstali closed 11 months ago
Someone is attempting to deploy a commit to a Personal Account owned by @victorgarciaesgi on Vercel.
@victorgarciaesgi first needs to authorize it.
Thanks for the PR @UfukUstali ! Must not have been easy to navigate the code as it's a bit of a mess 😅 .
Just by looking at it it looks very good, i'll test it on my side.
Just to understand, the <NuxtLinkLocale to='/foo' locale='fr'/>
is like a shortcut to <NuxtLink to='toLocalePath('/foo', 'fr')'/>
?
Also do you mind trying to add unit type tests? :)
Either on test/fixtures/complex/tests/i18n
or test/fixtures/complex/src/pages/index.vue
!
Upgraded the workflow engine to node 18, you can rebase for the tests to run
So I did try to get tests to work but upgrading the the \@nuxtjs/i18n to a version that has the NuxtLinkLocale component broke other parts, mainly vueI18n
configuration had to be in it's own file now and NuxtI18nOptions
type was not exported anymore. (I still don't know how to fix the latter).
I do not have much time until next week, I'll keep you updated
resolved with #128
For the types for the NuxtLinkLocale component to be generated correctly this module needs to be loaded after the i18n module. This is because of how we detect if this component exists in th first place. (see module.ts file)
I did try the following to avoid this:
Conditional generation and/or declaration of the types is required because this component was introduced on July 31. in the v8.0.0-rc.1 relase. If it is fine to include the types by default then all of the above can be safely ignored and changes can be made accordingly.