i18next-parser
Advanced tools
Comparing version 0.1.9 to 0.1.10
@@ -18,3 +18,3 @@ #!/usr/bin/env node | ||
program | ||
.version('0.1.9') | ||
.version('0.1.10') | ||
.option( '-r, --recursive' , 'Parse sub directories' ) | ||
@@ -25,4 +25,4 @@ .option( '-p, --parser <string>' , 'A custom regex to use to parse your code' ) | ||
.option( '-n, --namespace <string>' , 'The default namespace (translation by default)' ) | ||
.option( '-ns, --namespace-separator <string>' , 'The default namespace separator(: by default)' ) | ||
.option( '-ks, --key-separator <string>' , 'The default key separator(. by default)' ) | ||
.option( '-s, --namespace-separator <string>' , 'The default namespace separator(: by default)' ) | ||
.option( '-k, --key-separator <string>' , 'The default key separator(. by default)' ) | ||
.option( '-l, --locales <list>' , 'The locales in your application' ) | ||
@@ -29,0 +29,0 @@ .option( '--directoryFilter <list>' , 'Filter directories' ) |
@@ -5,3 +5,3 @@ { | ||
"name": "i18next-parser", | ||
"version": "0.1.9", | ||
"version": "0.1.10", | ||
"bin": { | ||
@@ -8,0 +8,0 @@ "i18next": "./bin/cli.js" |
@@ -44,4 +44,4 @@ # i18next Parser | ||
- **-n, --namespace <string>**: Default namespace used in your i18next config. Defaults to `translation` | ||
- **-ns, --namespace-separator <string>**: Namespace separator used in your translation keys. Defaults to `:` | ||
- **-ks, --key-separator <string>**: Key separator used in your translation keys. Defaults to `.` | ||
- **-s, --namespace-separator <string>**: Namespace separator used in your translation keys. Defaults to `:` | ||
- **-k, --key-separator <string>**: Key separator used in your translation keys. Defaults to `.` | ||
- **-l, --locales <list>**: The locales in your applications. Defaults to `en,fr` | ||
@@ -155,12 +155,19 @@ | ||
`i18next /path/to/file/or/dir -n my_default_namespace` | ||
`i18next /path/to/file/or/dir -s '?' -k '_'` | ||
Gulp: | ||
`.pipe(i18next({namespace: 'my_default_namespace'}))` | ||
`.pipe(i18next({namespaceSeparator: '?', keySeparator: '_'}))` | ||
This will add all the translation from the default namespace in the following file: | ||
This parse the translation keys as follow: | ||
``` | ||
locales/en/my_default_namespace.json | ||
namespace?key_subkey | ||
namespace.json | ||
{ | ||
key: { | ||
subkey: '' | ||
} | ||
} | ||
... | ||
@@ -167,0 +174,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
228
74906