better-translate v1.0.1
better-translate-parser
Install
$ npm i -g better-translateConfig
Create the configuration better-translate.json file in the root of the project to be parsed. This file is required.
| attributes | Type/value | Required | Default | Description |
|---|---|---|---|---|
| path | String | false | process PWD | |
| pwd | String | false | process PWD | |
| parsers | Array | false | ||
| appName | String | true |
####Example { "path": "/src", "pwd": "/Users/me/projects/myApp", "parsers": "i18n-react", "i18n" , "extensions": ".jsx", ".pug" , "appName": "myApp", "hostmame": "http://mybettertranslate.com" }
In this case better-translate will parse the folder /Users/me/projects/myApp/src
##Use
From the root of your project, you just need to run the following commands:
###Parse
Parse your project and submit variables to BetterTranslate app.
myApp $ better-translateWatch
Makes an complete parse of your projet and after, watch update and submit its to BetterTranslate app.
myApp $ better-translate -w Add
Add directly new variable(s) to BetterTranslate app.
Single
myApp $ better-translate -a helloMany
myApp $ better-translate -a hello,world,how_are_you