Releases: i18next/i18next-scanner
Releases · i18next/i18next-scanner
v2.3.1
v2.3.0
v2.2.1
v2.2.0
- Add a
trans
option for specifyingextensions
andfallbackKey
:
{
trans: {
extensions: ['.js', '.jsx'],
fallbackKey: false // Defaults to false
}
}
Available options for fallbackKey
:
- Pass
true
to return the content as key. - Specify a function to return user-defined key:
// @param {string} ns The namespace currently used. // @param {string} value The value. // @return {string} Returns a translation key for the given value. fallbackKey: function(ns, value) { return value; }
v2.1.5
v2.1.4
v2.1.3
v2.1.2
v2.1.1
v2.1.0
Add CLI support (#48)
$ i18next-scanner
Usage: i18next-scanner [options] <file ...>
Options:
-V, --version output the version number
--config <config> Path to the config file (default: i18next-scanner.config.js)
--output <path> Path to the output directory (default: .)
-h, --help output usage information
Examples:
$ i18next-scanner --config i18next-scanner.config.js --output /path/to/output 'src/**/*.{js,jsx}'
$ i18next-scanner --config i18next-scanner.config.js 'src/**/*.{js,jsx}'
$ i18next-scanner '/path/to/src/app.js' '/path/to/assets/index.html'