json2pot
Information
Package | json2pot |
---|---|
Description | Generate pot files from JSON keyed translation files. |
Install
$ npm install --save-dev json2pot
Example usage
const json2pot = ; ;
Options
All options are optional
-
bugReport
Description: Header with URL for reporting translation bugs
Type:string
Default: undefined -
domain
Description: Domain to retrieve the translated text. All textdomains is included if undefined.
Type:string
Default: undefined -
destFile
Description: Filename for template file
Type:string
Default:domain.pot
ortranslations.pot
if domain is undefined -
headers
Description: Object containing extra POT-file headers. Set to false to not generate the default extra headers for Poedit.
Type:object|bool
Default: Headers used by Poedit -
lastTranslator
Description: Name and email address of the last translator (ex:John Doe <me@example.com>
)
Type:string
Default: undefined -
package
Description: Package name
Type:string
Default:domain
orunnamed project
if domain is undefined -
src
Description: Glob or globs to match files (see Globbing Patterns)
Type:string|array
Default: ['/*.i18n.json', '/i18n/*.json', '!node_modules'] -
team
Description: Name and email address of the translation team (ex:Team <team@example.com>
)
Type:string
Default: undefined -
writeFile
Description: Write pot-file to disk. The function always returns the contents as well.
Type:boolean
Default:true
Related
- gulp-json2pot - Run json2pot via gulp
License
MIT © Diosney Sarmiento
Thanks to Rasmus Bengtsson for its work on wp-pot which this package is heavily based on.