{"_id":"gettext-swig","_rev":"9-a08963cb764e6afce9b8f1b125d86f6e","name":"gettext-swig","description":"Extract translatable strings from Swig templates","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"gettext-swig","version":"0.1.0","description":"Extract translatable strings from Swig templates","main":"index.js","directories":{"test":"test"},"scripts":{"test":"jshint index.js test/index.js && mocha"},"repository":{"type":"git","url":"https://github.com/smhg/gettext-swig.git"},"keywords":["swig","gettext","hbs","i18n","translate","translation"],"author":{"name":"Sam Hauglustaine"},"license":"MIT","bugs":{"url":"https://github.com/smhg/gettext-swig/issues"},"homepage":"https://github.com/smhg/gettext-swig","devDependencies":{"jshint":"^2.5.10","mocha":"^2.0.1"},"gitHead":"d0c43416205a4bc429cb4b59992cbaff8b93c0fb","_id":"gettext-swig@0.1.0","_shasum":"267ee45d4d020beb9de4f83dff8b222ff91dbf3a","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"smhg","email":"sam@strictlyphp.com"},"maintainers":[{"name":"smhg","email":"sam@strictlyphp.com"}],"dist":{"shasum":"267ee45d4d020beb9de4f83dff8b222ff91dbf3a","tarball":"https://registry.npmjs.org/gettext-swig/-/gettext-swig-0.1.0.tgz","integrity":"sha512-1J64fud7UejsUIv9UqhzYemfrv92wwHsGGZKKbd+my4CvWZ0YYvaKXJzlRBCDorC5Rk/p7VH2nJsdQX7sBri1Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUppra5cGJAddsbHDXngAiHDoCCTJP3mz39nzoMuyeFgIhANoV/gazzfi7qE87mNY1T8hESxAuwkWLFb/Oq90dqvbM"}]}},"0.1.1":{"name":"gettext-swig","version":"0.1.1","description":"Extract translatable strings from Swig templates","main":"index.js","directories":{"test":"test"},"scripts":{"test":"jshint index.js test/index.js && mocha"},"repository":{"type":"git","url":"https://github.com/smhg/gettext-swig.git"},"keywords":["swig","gettext","hbs","i18n","translate","translation"],"author":{"name":"Sam Hauglustaine"},"license":"MIT","bugs":{"url":"https://github.com/smhg/gettext-swig/issues"},"homepage":"https://github.com/smhg/gettext-swig","devDependencies":{"jshint":"^2.5.10","mocha":"^2.0.1"},"gitHead":"c8cfc8f3c9ea76f7c95842958f65d878d8260236","_id":"gettext-swig@0.1.1","_shasum":"7a7d06dadb79d1b7141b4a5d7104f2083fd77d9b","_from":".","_npmVersion":"2.1.16","_nodeVersion":"0.10.35","_npmUser":{"name":"smhg","email":"sam@strictlyphp.com"},"maintainers":[{"name":"smhg","email":"sam@strictlyphp.com"}],"dist":{"shasum":"7a7d06dadb79d1b7141b4a5d7104f2083fd77d9b","tarball":"https://registry.npmjs.org/gettext-swig/-/gettext-swig-0.1.1.tgz","integrity":"sha512-ZKBXEjoKzzGZynHB1i8GhxKTuhQUMhRmik5U2iAXqkn/Syz+mL5L7uLOS/3kBlKUGMrbipuTdXw3HNK91/ypIA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD3kXIFcD4BLOy4JM5SDLhZYpKldy50vlTZyoKdhwwGUgIgdpegbcexeG6zgbfXMYh40yf8/r28Ws2jrEWsekQEwF4="}]}},"0.2.0":{"name":"gettext-swig","version":"0.2.0","description":"Extract translatable strings from Swig templates","main":"index.js","directories":{"test":"test"},"scripts":{"test":"jshint index.js test/index.js && mocha"},"repository":{"type":"git","url":"https://github.com/smhg/gettext-swig.git"},"keywords":["swig","gettext","hbs","i18n","translate","translation"],"author":{"name":"Sam Hauglustaine"},"license":"MIT","bugs":{"url":"https://github.com/smhg/gettext-swig/issues"},"homepage":"https://github.com/smhg/gettext-swig","devDependencies":{"jshint":"^2.5.10","mocha":"^2.0.1"},"gitHead":"f44b59635bc5f0044763d2551fac5d0ed56d0c45","_id":"gettext-swig@0.2.0","_shasum":"b03d1409a963633846b279cd52910cd9527f9531","_from":".","_npmVersion":"2.1.16","_nodeVersion":"0.10.35","_npmUser":{"name":"smhg","email":"sam@strictlyphp.com"},"maintainers":[{"name":"smhg","email":"sam@strictlyphp.com"}],"dist":{"shasum":"b03d1409a963633846b279cd52910cd9527f9531","tarball":"https://registry.npmjs.org/gettext-swig/-/gettext-swig-0.2.0.tgz","integrity":"sha512-wqtz/tSxvGOBkTjVItiuV2WbsEX3zGuzk0Uj1EJrVe54lDw97GcZX5x+CC201S6+fhKXy9DE9QK0N0xbyqobdw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDV+BVaTGoLEGjAeC/MjVa8xvcAmFSwaSxgwiOPdWO0ZQIgG3X4O29bUG2tk4ZoTUDkk8xvxsUStT9SrJ7waaiiDCU="}]}},"0.3.0":{"name":"gettext-swig","version":"0.3.0","description":"Extract translatable strings from Swig templates","main":"index.js","directories":{"test":"test"},"scripts":{"lint":"eslint index.js test","test":"mocha","preversion":"npm run lint && npm test","postversion":"git push && git push --tags"},"repository":{"type":"git","url":"git+https://github.com/smhg/gettext-swig.git"},"keywords":["swig","gettext","hbs","i18n","translate","translation"],"author":{"name":"Sam Hauglustaine"},"license":"MIT","bugs":{"url":"https://github.com/smhg/gettext-swig/issues"},"homepage":"https://github.com/smhg/gettext-swig","devDependencies":{"eslint":"3.13.0","eslint-config-standard":"6.2.1","eslint-plugin-promise":"3.4.0","eslint-plugin-standard":"2.0.1","mocha":"3.2.0"},"dependencies":{},"gitHead":"7695bb718a08e88f70903ea0ea0b6ef7f6b48e8e","_id":"gettext-swig@0.3.0","_shasum":"4e87923a239ec5b1b0ac0ad9835a036799235758","_from":".","_npmVersion":"4.0.5","_nodeVersion":"6.9.4","_npmUser":{"name":"smhg","email":"sam@strictlyphp.com"},"dist":{"shasum":"4e87923a239ec5b1b0ac0ad9835a036799235758","tarball":"https://registry.npmjs.org/gettext-swig/-/gettext-swig-0.3.0.tgz","integrity":"sha512-6kPMcf00qKmxv3DZ9uaDvyYzzqFUOp23CUg2dWnm7HKzVdUVUX6270hPVtI8hSYYKQKMhDBSz8ZnrYzOY2+nsg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8Rjdt8NwLgQRl/bm0nGCHI4Wgt1hcAZOYy/uOWEWmywIgW/jEFchepUlsYPpPs4lKnQSLlfLW3xI+dcN2hx6y0ck="}]},"maintainers":[{"name":"smhg","email":"sam@strictlyphp.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/gettext-swig-0.3.0.tgz_1483985874727_0.018930671038106084"}}},"readme":"# gettext-swig [![build status](https://secure.travis-ci.org/smhg/gettext-swig.png)](http://travis-ci.org/smhg/gettext-swig)\n\nExtract translatable strings from [Swig](http://node-swig.github.io/swig-templates/) template strings.\n\nIt can be used stand-alone or through [gmarty/gettext](https://github.com/gmarty/xgettext).\n\n### API\n\n#### new Parser(keywordSpec)\nCreates a new parser.\nThe `keywordSpec` parameter is optional, with the default being:\n```javascript\n{\n  _: {\n    msgid: 0\n  },\n  gettext: {\n    msgid: 0\n  },\n  dgettext: {\n    msgid: 1\n  },\n  dcgettext: {\n    msgid: 1\n  },\n  ngettext: {\n    msgid: 0,\n    msgid_plural: 1\n  },\n  dngettext: {\n    msgid: 1,\n    msgid_plural: 2\n  },\n  pgettext: {\n    msgctxt: 0,\n    msgid: 1\n  },\n  dpgettext: {\n    msgctxt: 1,\n    msgid: 2\n  }\n}\n```\nEach keyword (key) requires an object with argument positions. The `msgid` position is required. `msgid_plural` and `msgctxt` are optional.\nFor example `gettext: {msgid: 0}` indicates that the Swig expression looks like `{{ \"string\"|gettext }}`.\n\n#### .parse(template)\nParses the `template` string for Handlebars expressions using the keywordspec.\nIt returns an object with this structure:\n```javascript\n{\n  msgid1: {\n    line: [1, 3]\n  },\n  msgid2: {\n    line: [2],\n    plural: 'msgid_plural'\n  },\n  context\\u0004msgid2: {\n    line: [4]\n  }\n}\n```\n\n### Development\n\n#### Install\n```shell\ngit clone git@github.com:smhg/gettext-swig.git\nnpm i\n```\n\n#### Test\n```shell\nnpm run lint\nnpm test\n```\n","maintainers":[{"name":"smhg","email":"sam@strictlyphp.com"}],"time":{"modified":"2022-06-18T08:02:17.293Z","created":"2014-11-26T11:26:27.494Z","0.1.0":"2014-11-26T11:26:27.494Z","0.1.1":"2014-12-31T19:31:08.285Z","0.2.0":"2015-01-18T12:32:42.151Z","0.3.0":"2017-01-09T18:17:56.711Z"},"homepage":"https://github.com/smhg/gettext-swig","keywords":["swig","gettext","hbs","i18n","translate","translation"],"repository":{"type":"git","url":"git+https://github.com/smhg/gettext-swig.git"},"author":{"name":"Sam Hauglustaine"},"bugs":{"url":"https://github.com/smhg/gettext-swig/issues"},"license":"MIT","readmeFilename":"README.md"}