-
-
Notifications
You must be signed in to change notification settings - Fork 336
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
Conversation
@intlify/core
@intlify/devtools-types
@intlify/core-base
petite-vue-i18n
@intlify/message-compiler
@intlify/shared
vue-i18n
@intlify/vue-i18n-core
commit: |
@@ -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.`, |
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.
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?
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.
Yeah, I'm going to open a separate PR.
When I will merge this PR, I will release v11 beta
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. |
Deploying vue-i18n-next with Cloudflare Pages
|
Thank you for your review! |
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
i18n.global.locale
type definiton wrong #1003watch
callback argument forlocale
. #630legacy
is set tofalse
#1347misc
VueI18nExtender
(use case Nuxt I18n)deprecated APIs & Types
legacy
options oncreateI18n
: https://vue-i18n.intlify.dev/api/general.html#legacyI18nMode
: https://vue-i18n.intlify.dev/api/general.html#i18nmode