i18next.option.js   A
last analyzed

Complexity

Total Complexity 2
Complexity/F 2

Size

Lines of Code 40
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 21
dl 0
loc 40
rs 10
c 0
b 0
f 0
cc 0
nc 2
mnd 1
bc 0
fnc 1
bpm 0
cpm 2
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A ➔ ??? 0 1 2
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