forked from idena-network/idena-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
i18next-scanner.config.js
68 lines (67 loc) · 1.01 KB
/
i18next-scanner.config.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
const AVAILABLE_LANGS = [
'en',
'id',
'fr',
'de',
'es',
'ru',
'zh',
'zh_Hant',
'ar',
'ko',
'hr',
'uk',
'sr',
'ro',
'it',
'pt',
'pl',
'sl',
'hi',
'tr',
'bg',
'sv',
'ja',
'vi',
]
module.exports = {
input: [
'pages/*.{js,jsx}',
'shared/components/*.{js,jsx}',
'!**/node_modules/**',
'!**/dist/**',
],
output: './',
options: {
debug: true,
// trans: false,
func: {
list: ['t'],
extensions: ['.js', '.jsx'],
},
lngs: AVAILABLE_LANGS,
defaultNs: 'common',
defaultValue(_lng, _ns, key, options) {
return options.defaultValue || key
},
ns: [
'index',
'contribute',
'donate',
'download',
'faq',
'flip-challenge',
'guide',
'gitcoin',
'join-idena',
'stake',
],
resource: {
loadPath: 'locales/{{lng}}/{{ns}}.json',
savePath: 'locales/{{lng}}/{{ns}}.json',
jsonIndent: 2,
lineEnding: '\n',
},
keySeparator: false,
},
}