138 lines
11 KiB
JSON
138 lines
11 KiB
JSON
|
{
|
||
|
"_args": [
|
||
|
[
|
||
|
{
|
||
|
"raw": "po2json@git+https://github.com/mikeedwards/po2json.git",
|
||
|
"scope": null,
|
||
|
"escapedName": "po2json",
|
||
|
"name": "po2json",
|
||
|
"rawSpec": "git+https://github.com/mikeedwards/po2json.git",
|
||
|
"spec": "git+https://github.com/mikeedwards/po2json.git",
|
||
|
"type": "hosted",
|
||
|
"hosted": {
|
||
|
"type": "github",
|
||
|
"ssh": "git@github.com:mikeedwards/po2json.git",
|
||
|
"sshUrl": "git+ssh://git@github.com/mikeedwards/po2json.git",
|
||
|
"httpsUrl": "git+https://github.com/mikeedwards/po2json.git",
|
||
|
"gitUrl": "git://github.com/mikeedwards/po2json.git",
|
||
|
"shortcut": "github:mikeedwards/po2json",
|
||
|
"directUrl": "https://raw.githubusercontent.com/mikeedwards/po2json/master/package.json"
|
||
|
}
|
||
|
},
|
||
|
"/home/dold/repos/taler/wallet-webex"
|
||
|
]
|
||
|
],
|
||
|
"_from": "git+https://github.com/mikeedwards/po2json.git",
|
||
|
"_id": "po2json@0.4.4",
|
||
|
"_inCache": true,
|
||
|
"_location": "/po2json",
|
||
|
"_phantomChildren": {},
|
||
|
"_requested": {
|
||
|
"raw": "po2json@git+https://github.com/mikeedwards/po2json.git",
|
||
|
"scope": null,
|
||
|
"escapedName": "po2json",
|
||
|
"name": "po2json",
|
||
|
"rawSpec": "git+https://github.com/mikeedwards/po2json.git",
|
||
|
"spec": "git+https://github.com/mikeedwards/po2json.git",
|
||
|
"type": "hosted",
|
||
|
"hosted": {
|
||
|
"type": "github",
|
||
|
"ssh": "git@github.com:mikeedwards/po2json.git",
|
||
|
"sshUrl": "git+ssh://git@github.com/mikeedwards/po2json.git",
|
||
|
"httpsUrl": "git+https://github.com/mikeedwards/po2json.git",
|
||
|
"gitUrl": "git://github.com/mikeedwards/po2json.git",
|
||
|
"shortcut": "github:mikeedwards/po2json",
|
||
|
"directUrl": "https://raw.githubusercontent.com/mikeedwards/po2json/master/package.json"
|
||
|
}
|
||
|
},
|
||
|
"_requiredBy": [
|
||
|
"#DEV:/"
|
||
|
],
|
||
|
"_resolved": "git+https://github.com/mikeedwards/po2json.git#4520fb008f9ac52ffd87abdc89ccaec40355514e",
|
||
|
"_shasum": "d61d74dbfc942d01bc94e350dbf8d157386e2981",
|
||
|
"_shrinkwrap": null,
|
||
|
"_spec": "po2json@git+https://github.com/mikeedwards/po2json.git",
|
||
|
"_where": "/home/dold/repos/taler/wallet-webex",
|
||
|
"author": {
|
||
|
"name": "Joshua I. Miller",
|
||
|
"email": "unrtst@cpan.org"
|
||
|
},
|
||
|
"bin": {
|
||
|
"po2json": "bin/po2json"
|
||
|
},
|
||
|
"bugs": {
|
||
|
"url": "https://github.com/mikeedwards/po2json/issues"
|
||
|
},
|
||
|
"contributors": [
|
||
|
{
|
||
|
"name": "Zach Carter",
|
||
|
"email": "zcarter@cse.usf.edu"
|
||
|
},
|
||
|
{
|
||
|
"name": "Daniel Roberts",
|
||
|
"email": "danielrobertsdesign@gmail.com"
|
||
|
},
|
||
|
{
|
||
|
"name": "Mike Edwards",
|
||
|
"email": "michael.edwards@huffingtonpost.com"
|
||
|
},
|
||
|
{
|
||
|
"name": "Illimar Tambek",
|
||
|
"email": "illimar@sliptree.com"
|
||
|
},
|
||
|
{
|
||
|
"name": "mahata",
|
||
|
"email": "mahata777@gmail.com"
|
||
|
},
|
||
|
{
|
||
|
"name": "Szigetvári Áron"
|
||
|
},
|
||
|
{
|
||
|
"name": "rafalt-iRonin"
|
||
|
},
|
||
|
{
|
||
|
"name": "Alex Petty",
|
||
|
"email": "pettyalex@gmail.com"
|
||
|
}
|
||
|
],
|
||
|
"dependencies": {
|
||
|
"gettext-parser": "1.1.0",
|
||
|
"nomnom": "1.8.1"
|
||
|
},
|
||
|
"description": "Convert PO files to JSON",
|
||
|
"devDependencies": {
|
||
|
"jed": "~1.0.2",
|
||
|
"nodeunit": "*"
|
||
|
},
|
||
|
"engines": {
|
||
|
"node": ">= 0.8.0"
|
||
|
},
|
||
|
"gitHead": "4520fb008f9ac52ffd87abdc89ccaec40355514e",
|
||
|
"homepage": "https://github.com/mikeedwards/po2json",
|
||
|
"keywords": [
|
||
|
"i18n",
|
||
|
"l10n",
|
||
|
"gettext",
|
||
|
"po"
|
||
|
],
|
||
|
"licenses": [
|
||
|
{
|
||
|
"type": "GNU Library General Public License",
|
||
|
"url": "http://www.gnu.org/licenses/old-licenses/lgpl-2.0.html"
|
||
|
}
|
||
|
],
|
||
|
"main": "./lib/po2json",
|
||
|
"name": "po2json",
|
||
|
"optionalDependencies": {},
|
||
|
"readme": "# po2json\n\n[![Build Status](https://secure.travis-ci.org/mikeedwards/po2json.png?branch=master)](http://travis-ci.org/mikeedwards/po2json)\n[![Dependency Status](https://david-dm.org/mikeedwards/po2json.png?theme=shields.io)](https://david-dm.org/mikeedwards/po2json)\n[![devDependency Status](https://david-dm.org/mikeedwards/po2json/dev-status.png?theme=shields.io)](https://david-dm.org/mikeedwards/po2json#info=devDependencies)\n\n[![NPM](https://nodei.co/npm/po2json.png)](https://nodei.co/npm/po2json/)\n\nConvert PO files to Javascript objects or JSON strings. The result is Jed-compatible.\n\n## Getting Started\nInstall the module with: `npm install po2json`\n\n### As a library\n```\nvar po2json = require('po2json');\n```\n\n### As an executable\n```\npo2json translation.po translation.json\n```\n\n## Documentation\n\n### Methods\n\npo2json has 3 methods, all of which take exactly the same options. The main function is `parse` which actually does the parsing to JSON. The 2 others - `parseFile` and `parseFileSync` are convenience functions to directly read PO data from a file and convert it to JSON.\n\nParse a PO buffer to JSON\n\n* `po2json.parse(buf[, options])`\n\t* `buf` - a _po_ file as a Buffer or an unicode string.\n\t* `options` - an optional object with the following possible parameters:\n\t\t* `fuzzy` Whether to include fuzzy translation in JSON or not. Should be either `true` or `false`. Defaults to `false`.\n\t\t* `stringify` If `true`, returns a JSON string. Otherwise returns a plain Javascript object. Defaults to `false`.\n\t\t* `pretty` If `true`, the resulting JSON string will be pretty-printed. Has no effect when `stringify` is `false`. Defaults to `false`\n\t\t* `format` Defaults to `raw`.\n\t\t\t* `raw` produces a \"raw\" JSON output\n\t\t\t* `jed` produces an output that is 100% compatible with Jed < 1.1.0\n\t\t\t* `jed1.x` produces an output that is 100% compatible with Jed >= 1.1.0\n\t\t\t* `mf` produces simple key:value output.\n\t\t* `domain` - the domain the messages will be wrapped inside. Only has effect if `format: 'jed'`.\n\nParse a PO file to JSON\n\n* `po2json.parseFile(fileName[,options], cb)`\n\t* `fileName` - path to the po file\n\t* `options` - same as for `po2json.parse`\n\t* `cb` - a function that receives 2 arguments: `err` and `jsonData`\n\nParse a PO file to JSON (synchronous)\n\n* `po2json.parseFileSync(fileName[, options])`\n\t* `fileName` - path to the po file\n\t* `options` - same as for `po2json.parse`\n\n#### fallback-to-msgid\nIf `fallback-to-msgid` is set, for those entries that would be omitted\n(fuzzy entries without the fuzzy flag) and for those that are empty,\nthe msgid will be used as translation in the json file.\nIf the entry is plural, msgid_plural will be used for msgstr[1].\nThis means that this option makes sense only for those languages\nthat have nplurals=2.\n\n### Command Line Arguments\n\npo2json in command-line parametrization support added to allow override\ndefault options.\n\n* --pretty, -p: same as pretty = true in function options\n* --fuzzy, -F: same as fuzzy = true in function options\n* --format, -f: Output format (raw, jed, jed1.x, or mf)\n* --domain, -d: same as domain in function options\n\nNote: `'format': 'mf'` means the json format used by messageFormatter in github.com/SlexAxton/messageformat.js\nThis system does any pluralization within the string, so only msgstr[0] is used with these format, in a simple \"key\": \"value\" form.\n\n## Examples\n\n### Basic usage with PO data as a buffer/string\n```\nvar po2json = require('po2json'),\n fs = require('fs');\nfs.readFile('messages.po', function (err, buffer) {\n var jsonData = po2json.parse(buffer);\n // do something interesting ...\n});\n```\n\n### Parse a PO file directly - Asynchronous Usage\n```\nvar po2json = require('po2json');\npo2json.parseFile('messages.po', function (err, jsonData) {\n // do something interesting ...\n});\n```\n\n### Parse a PO file directly - Synchronous Usage\n```\nvar po2json = require('po2json');\nvar jsonData = '';\ntry {\n jsonData = p
|
||
|
"readmeFilename": "README.md",
|
||
|
"repository": {
|
||
|
"type": "git",
|
||
|
"url": "git://github.com/mikeedwards/po2json.git"
|
||
|
},
|
||
|
"scripts": {
|
||
|
"test": "nodeunit test/"
|
||
|
},
|
||
|
"version": "0.4.4"
|
||
|
}
|