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 tc and $tc for Legacy API mode #1839

Merged
merged 2 commits into from
May 6, 2024
Merged

Conversation

kazupon
Copy link
Member

@kazupon kazupon commented May 6, 2024

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.

@kazupon kazupon added the Type: Deprecated Includes deprecate fixes label May 6, 2024
Copy link

Deploying vue-i18n-next with  Cloudflare Pages  Cloudflare Pages

Latest commit: db38d30
Status: ✅  Deploy successful!
Preview URL: https://3156503a.vue-i18n-next.pages.dev
Branch Preview URL: https://fix-deprecate-tc1.vue-i18n-next.pages.dev

View logs

@kazupon kazupon changed the title fix: deprecate tc and $tc for Legacy API mode feat!: deprecate tc and $tc for Legacy API mode May 6, 2024
@kazupon kazupon merged commit f3ea368 into master May 6, 2024
25 checks passed
@kazupon kazupon deleted the fix/deprecate-tc1 branch May 6, 2024 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Deprecated Includes deprecate fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant