nuxt-modules / i18n

I18n module for Nuxt
https://i18n.nuxtjs.org
MIT License
1.75k stars 483 forks source link

chore!: remove deprecated legacy dynamic route params #2801

Closed BobbieGoede closed 2 months ago

BobbieGoede commented 9 months ago

πŸ”— Linked issue

❓ Type of change

πŸ“š Description

The deprecation of using nuxtI18n with definePageMeta was a bit soft, as we kept using the same key internally for setI18nParams I can imagine there may have been users ignoring the warning. I changed the nuxtI18n key to nuxtI18nInternal, this will break the functionality for projects using the deprecated functionality and better communicate that this is an internal key.

At some point we may or may not move away from using the meta key on routes, this is already the case when having experimental.switchLocalePathLinkSSR feature enabled.

πŸ“ Checklist

nuxt-studio[bot] commented 9 months ago

Live Preview ready!

Name Edit Preview Latest Commit
i18n Edit on Studio β†—οΈŽ View Live Preview 3ea37e1d7925f7660cbaac006f942d5653c26471
kazupon commented 9 months ago

Thank you!

I had planned to drop features in v8.1 that I had marked as deprecated prior to the v8.0 release. However, nuxt i18n versioning is in semver, and according to semver policy that is equivalent to a major change. And also, the recent OSS semver for automatic tracking tools like renovate and dependbot, as well as release tools.

So I believe that if we drop deprecation, we should release as v9.

There may be other deprecations in nuxt i18n. I think we should pickup all of them once and drop them and release v9.

BobbieGoede commented 9 months ago

However, nuxt i18n versioning is in semver, and according to semver policy that is equivalent to a major change.

There may be other deprecations in nuxt i18n. I think we should pickup all of them once and drop them and release v9.

I agree, I'll label it v9 and set it to draft. It's good to be careful with breaking changes, I think with some planning it can be combined with some other changes.

Maybe I'll open an issue/discussion for v9 in the coming days to track which issues/changes could be included so users can give feedback or suggest changes.

kazupon commented 9 months ago

Maybe I'll open an issue/discussion for v9 in the coming days to track which issues/changes could be included so users can give feedback or suggest changes.

Good idea! πŸ‘ Let's open the issue/discussion!

BobbieGoede commented 3 months ago

@kazupon I have updated this branch and changed the relevant docs in the v9 documentation, originally this PR also added logs whenever the old nuxtI18n meta key were set by users but since we have the deprecation warning in v8 and the added migration docs I don't think those logs are necessary.

Related to this feature, should we also remove experimental.switchLocalePathLinkSSR and have it enabled by default? It would clean up the implementation further and will be easier to document how to get proper dynamic route parameter for SSR projects. This change would be a separate PR.