|
| 1 | +module.exports = { |
| 2 | + contextSeparator: '_', |
| 3 | + // Key separator used in your translation keys |
| 4 | + |
| 5 | + createOldCatalogs: false, |
| 6 | + // Save the \_old files |
| 7 | + |
| 8 | + defaultNamespace: 'translation', |
| 9 | + // Default namespace used in your i18next config |
| 10 | + |
| 11 | + defaultValue: '', |
| 12 | + // Default value to give to keys with no value |
| 13 | + // You may also specify a function accepting the locale, namespace, key, and value as arguments |
| 14 | + |
| 15 | + indentation: 2, |
| 16 | + // Indentation of the catalog files |
| 17 | + |
| 18 | + keepRemoved: false, |
| 19 | + // Keep keys from the catalog that are no longer in code |
| 20 | + |
| 21 | + keySeparator: ':::', |
| 22 | + // Key separator used in your translation keys |
| 23 | + // If you want to use plain english keys, separators such as `.` and `:` will conflict. You might want to set `keySeparator: false` and `namespaceSeparator: false`. That way, `t('Status: Loading...')` will not think that there are a namespace and three separator dots for instance. |
| 24 | + |
| 25 | + // see below for more details |
| 26 | + lexers: { |
| 27 | + hbs: ['HandlebarsLexer'], |
| 28 | + handlebars: ['HandlebarsLexer'], |
| 29 | + |
| 30 | + htm: ['HTMLLexer'], |
| 31 | + html: ['HTMLLexer'], |
| 32 | + |
| 33 | + mjs: ['JavascriptLexer'], |
| 34 | + js: ['JavascriptLexer'], // if you're writing jsx inside .js files, change this to JsxLexer |
| 35 | + ts: ['JavascriptLexer'], |
| 36 | + jsx: ['JsxLexer'], |
| 37 | + tsx: ['JsxLexer'], |
| 38 | + |
| 39 | + default: ['JavascriptLexer'], |
| 40 | + }, |
| 41 | + |
| 42 | + lineEnding: 'auto', |
| 43 | + // Control the line ending. See options at https://github.com/ryanve/eol |
| 44 | + |
| 45 | + locales: ['en', 'it'], |
| 46 | + // An array of the locales in your applications |
| 47 | + |
| 48 | + namespaceSeparator: false, |
| 49 | + // Namespace separator used in your translation keys |
| 50 | + // If you want to use plain english keys, separators such as `.` and `:` will conflict. You might want to set `keySeparator: false` and `namespaceSeparator: false`. That way, `t('Status: Loading...')` will not think that there are a namespace and three separator dots for instance. |
| 51 | + |
| 52 | + output: 'src/locales/$LOCALE/$NAMESPACE.json', |
| 53 | + // Supports $LOCALE and $NAMESPACE injection |
| 54 | + // Supports JSON (.json) and YAML (.yml) file formats |
| 55 | + // Where to write the locale files relative to process.cwd() |
| 56 | + |
| 57 | + pluralSeparator: '_', |
| 58 | + // Plural separator used in your translation keys |
| 59 | + // If you want to use plain english keys, separators such as `_` might conflict. You might want to set `pluralSeparator` to a different string that does not occur in your keys. |
| 60 | + |
| 61 | + input: undefined, |
| 62 | + // An array of globs that describe where to look for source files |
| 63 | + // relative to the location of the configuration file |
| 64 | + |
| 65 | + sort: true, |
| 66 | + // Whether or not to sort the catalog. Can also be a [compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#parameters) |
| 67 | + |
| 68 | + verbose: false, |
| 69 | + // Display info about the parsing including some stats |
| 70 | + |
| 71 | + failOnWarnings: false, |
| 72 | + // Exit with an exit code of 1 on warnings |
| 73 | + |
| 74 | + failOnUpdate: false, |
| 75 | + // Exit with an exit code of 1 when translations are updated (for CI purpose) |
| 76 | + |
| 77 | + customValueTemplate: null, |
| 78 | + // If you wish to customize the value output the value as an object, you can set your own format. |
| 79 | + // ${defaultValue} is the default value you set in your translation function. |
| 80 | + // Any other custom property will be automatically extracted. |
| 81 | + // |
| 82 | + // Example: |
| 83 | + // { |
| 84 | + // message: "${defaultValue}", |
| 85 | + // description: "${maxLength}", // t('my-key', {maxLength: 150}) |
| 86 | + // } |
| 87 | + |
| 88 | + resetDefaultValueLocale: null, |
| 89 | + // The locale to compare with default values to determine whether a default value has been changed. |
| 90 | + // If this is set and a default value differs from a translation in the specified locale, all entries |
| 91 | + // for that key across locales are reset to the default value, and existing translations are moved to |
| 92 | + // the `_old` file. |
| 93 | + |
| 94 | + i18nextOptions: null, |
| 95 | + // If you wish to customize options in internally used i18next instance, you can define an object with any |
| 96 | + // configuration property supported by i18next (https://www.i18next.com/overview/configuration-options). |
| 97 | + // { compatibilityJSON: 'v3' } can be used to generate v3 compatible plurals. |
| 98 | + |
| 99 | + yamlOptions: null, |
| 100 | + // If you wish to customize options for yaml output, you can define an object here. |
| 101 | + // Configuration options are here (https://github.com/nodeca/js-yaml#dump-object---options-). |
| 102 | + // Example: |
| 103 | + // { |
| 104 | + // lineWidth: -1, |
| 105 | + // } |
| 106 | +}; |
0 commit comments