-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathi18next-parser.config.js
More file actions
49 lines (46 loc) · 1.18 KB
/
i18next-parser.config.js
File metadata and controls
49 lines (46 loc) · 1.18 KB
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
export default {
contextSeparator: '_',
createOldCatalogs: false,
defaultNamespace: 'translation',
defaultValue: function (lng, ns, key) {
if (lng === 'en') {
return key;
}
return '';
},
indentation: 2,
keepRemoved: true,
keySeparator: '.',
lexers: {
hbs: ['HandlebarsLexer'],
handlebars: ['HandlebarsLexer'],
htm: ['HTMLLexer'],
html: ['HTMLLexer'],
mjs: ['JavascriptLexer'],
js: ['JavascriptLexer'],
ts: ['JavascriptLexer'],
jsx: ['JsxLexer'],
tsx: ['JsxLexer'],
default: ['JavascriptLexer'],
},
lineEnding: 'auto',
locales: ['en'],
namespaceSeparator: ':',
output: 'src/renderer/shared/i18n/locales/$LOCALE.json',
pluralSeparator: '_',
input: ['src/renderer/**/*.{ts,tsx,js,jsx}', '!src/renderer/**/*.test.{ts,tsx,js,jsx}', '!src/renderer/**/*.d.ts'],
sort: false,
verbose: true,
failOnWarnings: false,
failOnUpdate: false,
skipDefaultValues: true,
customValueTemplate: null,
resetDefaultValueLocale: null,
i18nextOptions: null,
yamlOptions: null,
// Add support for marker functions
func: {
list: ['t', 'i18nMarker', 'i18nMark'],
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
};