forked from kazupon/vue-i18n
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
144 lines (144 loc) · 4.97 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
module.exports = {
en: {
message: {
hello: 'the world',
helloName: 'Hello {name}',
hoge: 'hoge',
empty: '',
format: {
named: 'Hello {name}, how are you?',
list: 'Hello {0}, how are you?'
},
fallback: 'this is fallback',
link: '@:message.hello',
linkHelloName: '@:message.helloName',
linkLinkHelloName: '@:message.linkHelloName',
linkEnd: 'This is a linked translation to @:message.hello',
linkWithin: 'Isn\'t @:message.hello we live in great?',
linkMultiple: 'Hello @:message.hoge!, isn\'t @:message.hello great?',
linkBrackets: 'Hello @:(message.hoge). Isn\'t @:(message.hello) great?',
linkHyphen: '@:hyphen-hello',
linkUnderscore: '@:underscore_hello',
linkPipe: '@:pipe|hello',
linkColon: '@:(colon:hello)',
linkList: '@:message.hello: {0} {1}',
linkCaseLower: 'Please provide @.lower:message.homeAddress',
linkCaseUpper: '@.upper:message.homeAddress',
linkCaseCapitalize: '@.capitalize:message.homeAddress',
linkCaseUnknown: '@.unknown:message.homeAddress',
linkCaseCustom: '@.custom:message.homeAddress',
homeAddress: 'home Address',
circular1: 'Foo @:message.circular2',
circular2: 'Bar @:message.circular3',
circular3: 'Buz @:message.circular1',
linkTwice: '@:message.hello: @:message.hello',
'Hello {0}': 'Hello {0}',
'hyphen-locale': 'hello hyphen',
'1234': 'Number-based keys are found',
'1mixedKey': 'Mixed keys are not found.',
'sálvame': 'save me'
},
'0123a': 'Starts with number and contains non-number',
'01234': 'Numeric only',
'日本語': 'Japanese',
'hello world': 'Hello World',
'Hello {0}': 'Hello {0}',
'continue-with-new-account': 'continue with new account',
'hyphen-hello': 'hyphen the wolrd',
/* eslint-disable */
underscore_hello: 'underscore the wolrd',
'colon:hello': 'hello colon',
'pipe|hello': 'hello pipe',
/* eslint-enable */
underscore: '{helloMsg} world',
plurals: {
car: 'car | cars',
apple: 'no apples | one apple | {count} apples',
format: {
named: 'Hello {name}, how are you? | Hi {name}, you look fine',
list: 'Hello {0}, how are you? | Hi {0}, you look fine'
},
fallback: 'this is fallback | this is a plural fallback'
},
errors: [
'this is 0 error code message',
{
internal1: 'this is internal 1 error message'
},
[
'this is nested array error 1'
]
],
issues: {
arrayBugs: ['bug1', 'bug2'],
builtins: {
existing: {
// '__proto__': 'i exist', // TODO
'constructor': 'i exist',
'hasOwnProperty': 'i exist',
'isPrototypeOf': 'i exist',
'propertyIsEnumerable': 'i exist',
'toLocaleString': 'i exist',
'toString': 'i exist',
'valueOf': 'i exist'
},
missing: {}
}
},
'foo.bar.buz': 'hello flat key!'
},
ja: {
message: {
hello: 'ザ・ワールド',
hoge: 'ほげ',
empty: '',
format: {
named: 'こんにちは {name}, ごきげんいかが?',
list: 'こんにちは {0}, ごきげんいかが?'
},
fallback1: 'これはフォールバック',
'hyphen-locale': 'こんにちは、ハイフン',
'1234': '数字ベースのキーは見つかりませんでした。',
'1mixedKey': 'ミックスされたキーは見つかりませんでした。',
'sálvame': '私を助けて'
},
'01234': '数字のみ',
'12345a': '数字で始まり、数字以外を含む',
'日本語': '日本語',
plurals: {
car: 'ザ・ワールド | これはフォールバック',
implicitPluralCount: 'こっちには来ない | count:{count}, n:{n}',
format: {
named: 'こんにちは {name}, ごきげんいかが? | こんにちは {name}, ごきげんいかが?',
list: 'こんにちは {0}, ごきげんいかが?| こんにちは {0}, ごきげんいかが?'
},
fallback: 'これはフォールバック | ザ・ワールド'
},
errors: [
'これはエラーコード0のエラーメッセージです。',
{
internal1: 'これは内部エラーコード1のエラーメッセージです。'
},
[
'これはネストされた配列のエラー1です。'
]
],
issues: {
arrayBugs: ['バグ1', 'バグ2'],
builtins: {
existing: {
// '__proto__': 'i exist (ja)', // TODO
'constructor': 'i exist (ja)',
'hasOwnProperty': 'i exist (ja)',
'isPrototypeOf': 'i exist (ja)',
'propertyIsEnumerable': 'i exist (ja)',
'toLocaleString': 'i exist (ja)',
'toString': 'i exist (ja)',
'valueOf': 'i exist (ja)'
},
missing: {}
}
},
'foo.bar.buz': 'こんにちは、フラットなキーさん!'
}
}