Skip to content

Commit b162a4e

Browse files
authored
Support vetur component data (#346)
1 parent 274ed5d commit b162a4e

File tree

3 files changed

+83
-2
lines changed

3 files changed

+83
-2
lines changed

packages/vue-i18n/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
},
2727
"files": [
2828
"index.js",
29-
"dist"
29+
"dist",
30+
"vetur"
3031
],
3132
"main": "index.js",
3233
"module": "dist/vue-i18n.esm-bundler.js",
@@ -56,5 +57,9 @@
5657
"global-runtime"
5758
]
5859
},
59-
"sideEffects": false
60+
"sideEffects": false,
61+
"vetur": {
62+
"tags": "vetur/tags.json",
63+
"attributes": "vetur/attributes.json"
64+
}
6065
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"i18n-t/keypath": {
3+
"description": "[required]\nThe locale message key can be specified prop",
4+
"type": "string"
5+
},
6+
"i18n-t/plural": {
7+
"description": "[optional]\nThe Plural Choosing the message number prop",
8+
"type": "number|string"
9+
},
10+
"i18n-t/locale": {
11+
"description": "[optional]\nThe locale to be used for the component",
12+
"type": "string"
13+
},
14+
"i18n-t/scope": {
15+
"description": "[optional]\tThe scope to be used in the target component.\nYou can specify either `global` or `parent`",
16+
"type": "string"
17+
},
18+
"i18n-t/tag": {
19+
"description": "[optional]\nUsed to wrap the content that is distribute in the slot.\nIf omitted, the slot content is treated as Fragments",
20+
"type": "string|object"
21+
},
22+
"i18n-d/value": {
23+
"description": "[required]\nThe value specified for the target component",
24+
"type": "number|date"
25+
},
26+
"i18n-d/format": {
27+
"description": "[optional]\nThe format to use in the target component",
28+
"type": "string|object"
29+
},
30+
"i18n-d/locale": {
31+
"description": "[optional]\nThe locale to be used for the component",
32+
"type": "string"
33+
},
34+
"i18n-d/scope": {
35+
"description": "[optional]\tThe scope to be used in the target component.\nYou can specify either `global` or `parent`",
36+
"type": "string"
37+
},
38+
"i18n-d/tag": {
39+
"description": "[optional]\nUsed to wrap the content that is distribute in the slot.\nIf omitted, the slot content is treated as Fragments",
40+
"type": "string|object"
41+
},
42+
"i18n-n/value": {
43+
"description": "[required]\nThe value specified for the target component",
44+
"type": "number"
45+
},
46+
"i18n-n/format": {
47+
"description": "[optional]\nThe format to use in the target component",
48+
"type": "string|object"
49+
},
50+
"i18n-n/locale": {
51+
"description": "[optional]\nThe locale to be used for the component",
52+
"type": "string"
53+
},
54+
"i18n-n/scope": {
55+
"description": "[optional]\tThe scope to be used in the target component.\nYou can specify either `global` or `parent`",
56+
"type": "string"
57+
},
58+
"i18n-n/tag": {
59+
"description": "[optional]\nUsed to wrap the content that is distribute in the slot.\nIf omitted, the slot content is treated as Fragments",
60+
"type": "string|object"
61+
}
62+
}

packages/vue-i18n/vetur/tags.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"i18n-t": {
3+
"attributes": ["keypath", "locale", "tag", "plural", "scope"],
4+
"description": "This is Translation component that can be used when HTML interpolation is needed.\n\nhttps://vue-i18n.intlify.dev/guide/advanced/component.html#basic-usage"
5+
},
6+
"i18n-d": {
7+
"attributes": ["value", "format", "locale", "tag", "scope"],
8+
"description": "This is Datetime Format component provides a way to use HTML interpolation in pair with number formatting.\n\nhttps://vue-i18n.intlify.dev/guide/essentials/datetime.html#custom-formatting"
9+
},
10+
"i18n-n": {
11+
"attributes": ["value", "format", "locale", "tag", "scope"],
12+
"description": "This is Number Format component provides a way to use HTML interpolation in pair with number formatting.\n\nhttps://vue-i18n.intlify.dev/guide/essentials/number.html#custom-formatting"
13+
}
14+
}

0 commit comments

Comments
 (0)