Total Complexity | 2 |
Complexity/F | 2 |
Lines of Code | 40 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | module.exports = { |
||
2 | debug: true, |
||
3 | removeUnusedKeys: true, |
||
4 | func: { |
||
5 | list: ['t', 'props.t', 'this.props.t', 'i18n.t'], |
||
6 | extensions: ['.js', '.jsx'] |
||
7 | }, |
||
8 | lngs: ['en', 'fr'], |
||
9 | defaultLng: 'en', |
||
10 | keySeparator: false, // false means "keyBasedFallback" |
||
11 | nsSeparator: false, // false means "keyBasedFallback" |
||
12 | fallbackLng: false, |
||
13 | |||
14 | ns: ['translation'], // namespace |
||
15 | defaultNS: 'translation', |
||
16 | |||
17 | // @param {string} lng The language currently used. |
||
18 | // @param {string} ns The namespace currently used. |
||
19 | // @param {string} key The translation key. |
||
20 | // @return {string} Returns a default value for the translation key. |
||
21 | // Return key as the default value for English language. Otherwise, returns '__NOT_TRANSLATED__' |
||
22 | defaultValue: (lng, ns, key) => lng === 'en' ? key : '__NOT_TRANSLATED__', |
||
23 | |||
24 | react: {wait: true}, |
||
25 | |||
26 | resource: { |
||
27 | // The path where resources get loaded from. |
||
28 | // /!\ /!\ /!\ Relative to CURRENT working directory. /!\ |
||
29 | loadPath: 'i18next.scanner/{{lng}}/{{ns}}.json', |
||
30 | // The path to store resources. |
||
31 | // /!\ /!\ /!\ Relative to the path specified by `vfs.dest('./i18next.scanner')`. /!\ |
||
32 | savePath: '{{lng}}/{{ns}}.json', |
||
33 | jsonIndent: 2, |
||
34 | lineEnding: '\n' |
||
35 | }, |
||
36 | // interpolation: { |
||
37 | // escapeValue: false, // not needed for react!! |
||
38 | // }, |
||
39 | trans: false, |
||
40 | } |
||
41 |