@@ -2,8 +2,7 @@ import { Translation } from './components/Translation'
22import { NumberFormat } from './components/NumberFormat'
33import { DatetimeFormat } from './components/DatetimeFormat'
44import { vTDirective } from './directive'
5- import { I18nWarnCodes , getWarnMessage } from './warnings'
6- import { isPlainObject , warn , isBoolean } from '@intlify/shared'
5+ import { isPlainObject , isBoolean } from '@intlify/shared'
76
87import type { App } from 'vue'
98import type { I18n } from './i18n'
@@ -17,17 +16,6 @@ import type { I18n } from './i18n'
1716 * @VueI 18nGeneral
1817 */
1918export interface I18nPluginOptions {
20- /**
21- * Whether to use the tag name `i18n` for Translation Component
22- *
23- * @remarks
24- * This option is used for compatibility with Vue I18n v8.x.
25- *
26- * If you can't migrate right away, you can temporarily enable this option, and you can work Translation Component.
27- *
28- * @defaultValue `false`
29- */
30- useI18nComponentName ?: boolean
3119 /**
3220 * Whether to globally install the components that is offered by Vue I18n
3321 *
@@ -45,25 +33,13 @@ export function apply(app: App, i18n: I18n, ...options: unknown[]): void {
4533 const pluginOptions = isPlainObject ( options [ 0 ] )
4634 ? ( options [ 0 ] as I18nPluginOptions )
4735 : { }
48- const useI18nComponentName = ! ! pluginOptions . useI18nComponentName
4936 const globalInstall = isBoolean ( pluginOptions . globalInstall )
5037 ? pluginOptions . globalInstall
5138 : true
5239
53- if ( __DEV__ && globalInstall && useI18nComponentName ) {
54- warn (
55- getWarnMessage ( I18nWarnCodes . COMPONENT_NAME_LEGACY_COMPATIBLE , {
56- name : Translation . name
57- } )
58- )
59- }
60-
6140 if ( ! __LITE__ && globalInstall ) {
6241 // install components
63- app . component (
64- ! useI18nComponentName ? Translation . name : 'i18n' ,
65- Translation
66- )
42+ app . component ( Translation . name , Translation )
6743 app . component ( NumberFormat . name , NumberFormat )
6844 app . component ( DatetimeFormat . name , DatetimeFormat )
6945 }
0 commit comments