Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

i18next-parser

Package Overview
Dependencies
Maintainers
1
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

i18next-parser - npm Package Compare versions

Comparing version 0.1.9 to 0.1.10

6

bin/cli.js

@@ -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 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc