Skip to content
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!: deprecate Legacy API mode #2016

Merged
merged 4 commits into from
Nov 14, 2024
Merged

Conversation

kazupon
Copy link
Member

@kazupon kazupon commented Nov 14, 2024

summary

The Legacy API mode was the API mode compatible with vue-i18n v8 for Vue 2. When vue-i18n v9 was released, the Legacy API was provided to smooth the migration from v8 to v9.

Legacy API mode will be deprecated in vue-i18n v11, as previous vue-i18n releases have already provided the following to support migration to Composition API mode

For compatibility, Legacy API mode still works in vue-i18n v11, but will be removed entirely in vue-i18n v12, so Legacy API mode will not work after that version.

benefits

misc

  • The vue-i18n documentation will be renewed besed on Composition API in vue-i18n v12.
  • internal API will be removed, such as VueI18nExtender (use case Nuxt I18n)

deprecated APIs & Types

Copy link

pkg-pr-new bot commented Nov 14, 2024

Open in Stackblitz

@intlify/core

pnpm add https://pkg.pr.new/@intlify/core@2016

@intlify/devtools-types

pnpm add https://pkg.pr.new/@intlify/devtools-types@2016

@intlify/core-base

pnpm add https://pkg.pr.new/@intlify/core-base@2016

petite-vue-i18n

pnpm add https://pkg.pr.new/petite-vue-i18n@2016

@intlify/message-compiler

pnpm add https://pkg.pr.new/@intlify/message-compiler@2016

@intlify/shared

pnpm add https://pkg.pr.new/@intlify/shared@2016

vue-i18n

pnpm add https://pkg.pr.new/vue-i18n@2016

@intlify/vue-i18n-core

pnpm add https://pkg.pr.new/@intlify/vue-i18n-core@2016

commit: 800393f

@@ -14,7 +18,11 @@ export const warnMessages: { [code: number]: string } = {
[I18nWarnCodes.FALLBACK_TO_ROOT]: `Fall back to {type} '{key}' with root locale.`,
[I18nWarnCodes.NOT_FOUND_PARENT_SCOPE]: `Not found parent scope. use the global scope.`,
[I18nWarnCodes.IGNORE_OBJ_FLATTEN]: `Ignore object flatten: '{key}' key has an string value`,
[I18nWarnCodes.DEPRECATE_TC]: `'tc' and '$tc' has been deprecated in v10. Use 't' or '$t' instead. 'tc' and '$tc’ are going to remove in v11.`
[I18nWarnCodes.DEPRECATE_TC]: `'tc' and '$tc' has been deprecated in v10. Use 't' or '$t' instead. 'tc' and '$tc’ are going to remove in v11.`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose it's not necessarily related this PR as it's not specific to legacy API, but we should make sure to remove tc and $tc for v11 as well. I assume this will happen in a separate PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm going to open a separate PR.
When I will merge this PR, I will release v11 beta

@BobbieGoede
Copy link
Member

Looks good to me!

Any changes in particular you would like me to look at? If you have changes to documentation in mind I can try and pick those up too.

Copy link

cloudflare-workers-and-pages bot commented Nov 14, 2024

Deploying vue-i18n-next with  Cloudflare Pages  Cloudflare Pages

Latest commit: 800393f
Status: ✅  Deploy successful!
Preview URL: https://f6ec458a.vue-i18n-next.pages.dev
Branch Preview URL: https://deprecate-deprecate-legacy-s.vue-i18n-next.pages.dev

View logs

@kazupon
Copy link
Member Author

kazupon commented Nov 14, 2024

Thank you for your review!
I'll merge this PR! :)

@kazupon kazupon added the Type: Breaking Includes backwards-incompatible fixes label Nov 14, 2024
@kazupon kazupon merged commit e1d966e into master Nov 14, 2024
26 checks passed
@kazupon kazupon deleted the deprecate/deprecate-legacy-style branch November 14, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Breaking Includes backwards-incompatible fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants