From abd94a7f5a50f43c797a11b53549ae48fff667c3 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 10 Oct 2016 03:43:44 +0200 Subject: add node_modules to address #4364 --- node_modules/po2json/bin/po2json | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 node_modules/po2json/bin/po2json (limited to 'node_modules/po2json/bin') 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); -- cgit v1.2.3