diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-10-10 03:43:44 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-10-10 03:43:44 +0200 |
commit | abd94a7f5a50f43c797a11b53549ae48fff667c3 (patch) | |
tree | ab8ed457f65cdd72e13e0571d2975729428f1551 /node_modules/po2json/bin | |
parent | a0247c6a3fd6a09a41a7e35a3441324c4dcb58be (diff) |
add node_modules to address #4364
Diffstat (limited to 'node_modules/po2json/bin')
-rwxr-xr-x | node_modules/po2json/bin/po2json | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/node_modules/po2json/bin/po2json b/node_modules/po2json/bin/po2json new file mode 100755 index 000000000..9eab18831 --- /dev/null +++ b/node_modules/po2json/bin/po2json @@ -0,0 +1,53 @@ +#!/usr/bin/env node + +var po2json = require('../'), + fs = require('fs'), + assert = require('assert'), + argv = process.argv; + +var opts = require("nomnom") + .script('po2json') + .option('pretty', { + abbr: 'p', + flag: true, + help: 'pretty-print JSON' + }) + .option('fuzzy', { + abbr: 'F', + flag: true, + help: 'include fuzzy messages' + }) + .option('format', { + abbr: 'f', + default: 'raw', + help: 'output format, one of: raw, jed, jed1.x, mf (messageformat)' + }) + .option('domain', { + abbr: 'd', + default: 'messages', + help: 'domain' + }) + .option('fallback-to-msgid', { + flag: true, + help: 'Use msgid if translation is missing (nplurals must match)' + }) + .option('input', { + position: 0, + required: true, + list: false, + help: 'input file' + }) + .option('output', { + position: 1, + required: true, + list: false, + help: 'output file' + }) + .parse(); + +opts.stringify = true; + +var result = po2json.parseFileSync(opts.input, opts), + stream = fs.createWriteStream(opts.output, {}); + +stream.write(result); |