feat!: deprecate tc
and $tc
for Legacy API mode
#1839
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
deprecated feature
The following APIs are deprecated in v10:
tc(key: Key | ResourceKeys): TranslateResult;
tc(key: Key | ResourceKeys, locale: Locales | Locale): TranslateResult;
tc(key: Key | ResourceKeys, list: unknown[]): TranslateResult;
tc(key: Key | ResourceKeys, named: Record<string, unknown>): TranslateResult;
tc(key: Key | ResourceKeys, choice: number): TranslateResult;
tc(key: Key | ResourceKeys, choice: number, locale: Locales | Locale): TranslateResult;
tc(key: Key | ResourceKeys, choice: number, list: unknown[]): TranslateResult;
tc(key: Key | ResourceKeys, choice: number, named: Record<string, unknown>): TranslateResult;
$tc(key: Key): TranslateResult;
$tc(key: Key, locale: Locale): TranslateResult;
$tc(key: Key, list: unknown[]): TranslateResult;
$tc(key: Key, named: Record<string, unknown>): TranslateResult;
$tc(key: Key, choice: number): TranslateResult;
$tc(key: Key, choice: number, locale: Locale): TranslateResult;
$tc(key: Key, choice: number, list: unknown[]): TranslateResult;
$tc(key: Key, choice: number, named: Record<string, unknown>): TranslateResult;
Reason: Legacy API mode has
t
and$t
support plural interfaces, so they can be replaced.In v10,
tc
and$tc
still exist to give benefit migration. These will be dropped completely in v11.If you will use them, Vue I18n will output the console warning in your application.