@@ -2,8 +2,7 @@ import { Translation } from './components/Translation'
2
2
import { NumberFormat } from './components/NumberFormat'
3
3
import { DatetimeFormat } from './components/DatetimeFormat'
4
4
import { vTDirective } from './directive'
5
- import { I18nWarnCodes , getWarnMessage } from './warnings'
6
- import { isPlainObject , warn , isBoolean } from '@intlify/shared'
5
+ import { isPlainObject , isBoolean } from '@intlify/shared'
7
6
8
7
import type { App } from 'vue'
9
8
import type { I18n } from './i18n'
@@ -17,17 +16,6 @@ import type { I18n } from './i18n'
17
16
* @VueI 18nGeneral
18
17
*/
19
18
export 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
31
19
/**
32
20
* Whether to globally install the components that is offered by Vue I18n
33
21
*
@@ -45,25 +33,13 @@ export function apply(app: App, i18n: I18n, ...options: unknown[]): void {
45
33
const pluginOptions = isPlainObject ( options [ 0 ] )
46
34
? ( options [ 0 ] as I18nPluginOptions )
47
35
: { }
48
- const useI18nComponentName = ! ! pluginOptions . useI18nComponentName
49
36
const globalInstall = isBoolean ( pluginOptions . globalInstall )
50
37
? pluginOptions . globalInstall
51
38
: true
52
39
53
- if ( __DEV__ && globalInstall && useI18nComponentName ) {
54
- warn (
55
- getWarnMessage ( I18nWarnCodes . COMPONENT_NAME_LEGACY_COMPATIBLE , {
56
- name : Translation . name
57
- } )
58
- )
59
- }
60
-
61
40
if ( ! __LITE__ && globalInstall ) {
62
41
// install components
63
- app . component (
64
- ! useI18nComponentName ? Translation . name : 'i18n' ,
65
- Translation
66
- )
42
+ app . component ( Translation . name , Translation )
67
43
app . component ( NumberFormat . name , NumberFormat )
68
44
app . component ( DatetimeFormat . name , DatetimeFormat )
69
45
}
0 commit comments