{"_id":"gettext-extract","_rev":"5-6763139859ecdc9171355be0a45ec040","name":"gettext-extract","description":"CLI for extracting Gettext messages from JavaScript, TypeScript, JSX and HTML","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"gettext-extract","version":"1.0.0","description":"CLI for extracting Gettext messages from JavaScript, TypeScript, JSX and HTML","keywords":["gettext","extract","messages","cli","typescript","jsx","html","po","pot","i18n","l10n","translation"],"author":{"name":"Yohan Lasorsa"},"license":"MIT","homepage":"https://github.com/sinedied/gettext-extract","bugs":{"url":"https://github.com/sinedied/gettext-extract/issues"},"preferGlobal":true,"main":"index.js","bin":{"gettext-extract":"./bin/gettext-extract"},"scripts":{"lint":"eslint *.js","test":"npm run lint -s && cd test && ../bin/gettext-extract && cat out/template.pot","postpublish":"git tag -a $npm_package_version -m '$npm_package_version' && git push --tags"},"dependencies":{"find-up":"^2.1.0","fs-extra":"^4.0.2","gettext-extractor":"^3.1.0","minimist":"^1.2.0"},"devDependencies":{"eslint":"^4.11.0","eslint-config-xo-space":"^0.17.0"},"engines":{"node":">=6.0.0"},"eslintConfig":{"extends":"xo-space/esnext"},"gitHead":"2158dbce663621c930f6aa560ee1e48aaace4d70","_id":"gettext-extract@1.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"sinedied","email":"noda@free.fr"},"maintainers":[{"name":"sinedied","email":"contact@nxcode.org"}],"dist":{"integrity":"sha512-xukJGlkY9hq2TLDcLhs7Cu2xkJUSkRP2PdJAlcgCLcGOK2qoYxJhE6hokeQfEVDU/hISXbYLhjttqbNf/7pWhw==","shasum":"95642f08b98150523c2eeb34c7be4543c04d9fba","tarball":"https://registry.npmjs.org/gettext-extract/-/gettext-extract-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFJIbOigQoySOsgzcPtbAoinsXeZ8JU08INCdCBcI8LdAiAXxFwPAUYgZTqQ0UwHb00sxDAE4ST+YJtwIqmszaR5lg=="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gettext-extract-1.0.0.tgz_1511257937412_0.09746058494783938"},"directories":{}},"1.0.1":{"name":"gettext-extract","version":"1.0.1","description":"CLI for extracting Gettext messages from JavaScript, TypeScript, JSX and HTML","keywords":["gettext","extract","messages","cli","typescript","jsx","html","po","pot","i18n","l10n","translation"],"author":{"name":"Yohan Lasorsa"},"license":"MIT","homepage":"https://github.com/sinedied/gettext-extract","bugs":{"url":"https://github.com/sinedied/gettext-extract/issues"},"preferGlobal":true,"main":"index.js","bin":{"gettext-extract":"./bin/gettext-extract"},"scripts":{"lint":"eslint *.js","test":"npm run lint -s && cd test && ../bin/gettext-extract && cat out/template.pot","postpublish":"git tag -a $npm_package_version -m '$npm_package_version' && git push --tags"},"dependencies":{"chalk":"^2.3.0","find-up":"^2.1.0","fs-extra":"^4.0.2","gettext-extractor":"^3.1.0","minimist":"^1.2.0"},"devDependencies":{"eslint":"^4.11.0","eslint-config-xo-space":"^0.17.0"},"engines":{"node":">=6.0.0"},"eslintConfig":{"extends":"xo-space/esnext"},"gitHead":"510f424258f5d2fd8026bc0ae44f862078614cb2","_id":"gettext-extract@1.0.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"sinedied","email":"noda@free.fr"},"maintainers":[{"name":"sinedied","email":"noda@free.fr"}],"dist":{"integrity":"sha512-QruthKqUQKMGiDMA5qaI707dS8V7kY09MqVBF54wSGX/N++6hTMUEQllMqbBpWRqUWoV2N+W6h85m9GZ8NhypQ==","shasum":"62bcf7ba099be081a78b967076f903481406db29","tarball":"https://registry.npmjs.org/gettext-extract/-/gettext-extract-1.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2veB+T+cDqHSUishem20iioDXqw/2k3Nr0hNZjQ/2bgIgUIGoiQMeD7QkFI/Lkt5m5m7FBPo1vnMAVevnEQ7AEG0="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gettext-extract-1.0.1.tgz_1511260357966_0.23928440804593265"},"directories":{}},"1.0.2":{"name":"gettext-extract","version":"1.0.2","description":"CLI for extracting Gettext messages from JavaScript, TypeScript, JSX and HTML","keywords":["gettext","extract","messages","cli","typescript","jsx","html","po","pot","i18n","l10n","translation"],"author":{"name":"Yohan Lasorsa"},"license":"MIT","homepage":"https://github.com/sinedied/gettext-extract","bugs":{"url":"https://github.com/sinedied/gettext-extract/issues"},"preferGlobal":true,"main":"index.js","bin":{"gettext-extract":"./bin/gettext-extract"},"scripts":{"lint":"eslint *.js","test":"npm run lint -s && cd test && ../bin/gettext-extract && cat out/template.pot","postpublish":"git tag -a $npm_package_version -m '$npm_package_version' && git push --tags"},"dependencies":{"chalk":"^2.3.0","find-up":"^2.1.0","fs-extra":"^4.0.2","gettext-extractor":"^3.1.0","minimist":"^1.2.0"},"devDependencies":{"eslint":"^4.11.0","eslint-config-xo-space":"^0.17.0"},"engines":{"node":">=6.0.0"},"eslintConfig":{"extends":"xo-space/esnext"},"gitHead":"55975b3c0bcfa301e7bcec89142b0ad22ccae6d0","_id":"gettext-extract@1.0.2","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"sinedied","email":"noda@free.fr"},"maintainers":[{"name":"sinedied","email":"noda@free.fr"}],"dist":{"integrity":"sha512-zRONr7lfWtyC6ccflr7ULihcSRENynVw9BPFc+X79V1y9IS9G4TU1KelaLJv3MS0y1fL1/uOt3F762QISWOCwQ==","shasum":"ea0a528e2a83a3d754ecee803bf522e816f5b4c8","tarball":"https://registry.npmjs.org/gettext-extract/-/gettext-extract-1.0.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDOGDHJFBQHF1WIjQg4lUvRotKC/LiNLuIqKFKlzUKZ0AiBn8+SeRa6fqUtuuDi71ynJROq4j3QMuxj/UCWbdx6E0A=="}]},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gettext-extract-1.0.2.tgz_1511260889194_0.2934652999974787"},"directories":{}},"2.0.0":{"name":"gettext-extract","version":"2.0.0","description":"CLI for extracting Gettext messages from JavaScript, TypeScript, JSX and HTML","keywords":["gettext","extract","messages","cli","typescript","jsx","html","po","pot","i18n","l10n","translation"],"author":{"name":"Yohan Lasorsa"},"license":"MIT","homepage":"https://github.com/sinedied/gettext-extract","bugs":{"url":"https://github.com/sinedied/gettext-extract/issues"},"preferGlobal":true,"main":"index.js","bin":{"gettext-extract":"./bin/gettext-extract"},"scripts":{"lint":"eslint *.js","test":"npm run lint -s && cd test && ../bin/gettext-extract && cat out/template.pot","postpublish":"git tag -a $npm_package_version -m '$npm_package_version' && git push --tags"},"dependencies":{"chalk":"^2.3.0","find-up":"^3.0.0","fs-extra":"^7.0.1","gettext-extractor":"^3.1.0","minimist":"^1.2.0"},"devDependencies":{"eslint":"^5.15.3","eslint-config-xo-space":"^0.21.0"},"engines":{"node":">=8.0.0"},"eslintConfig":{"extends":"xo-space/esnext"},"gitHead":"1c1fad698ca990231e389230a360f5aabebc238c","_id":"gettext-extract@2.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"sinedied","email":"noda@free.fr"},"dist":{"integrity":"sha512-/nG3oArrGBbt2zsoHjHvA5fu3byyHTxgbNRo6kR1VQWmMvFJ13pRgvwrYbZyPqq8JgCX2A7xZjBiPK03VJ6eKw==","shasum":"d0759eea77524d55b72d2b78a71e35164a8acc0f","tarball":"https://registry.npmjs.org/gettext-extract/-/gettext-extract-2.0.0.tgz","fileCount":7,"unpackedSize":8847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcm29DCRA9TVsSAnZWagAAvkoQAJ5FgRrSIf4fulN0HTlY\n1xb8veK2LTY6wG1BjgSmXvEMdRP96Uom4IJf+PRk0Kd3utyr+zjhXtGkX5rg\n2d4ZX0vWg+K2zWxR8oJVBpDdPS7RKAJgLVmWgbwvDlwiFSadJEBfarUnpg24\nAsqLu7xxvwXaFhzB582kpBT7Z6JqWbFQQ4yJIk7lvrcf+rZcRa+X10FxVDn7\neUq8mclk8YQuq7WLZJ37z6GHxzB4g4nog8+mOvkZCmZtXaAUTNzbiaQDpQyQ\nj/4GfNmB07YUGiOEBgcus9McPMKYkCWD4fF8vW2FaMGjLttU+zb1SxJi/yCn\nQ74bSuY+RI1KnKcJ88V2v9eUBONbjsPSyFBf5JxksfU79a6xj8GksSu453FL\n+7i3UpJi/0F0SIfXY3ZwoLjQ5QyWBCgNjgiE5LmzxT3U00RaDTlSBxdUpzND\n77gZswM9eZtU8sEHZbsWLr93uWEvfd9bDQQANbq0Jg3vDmbbq4W+rQn4w00p\n1WgbOGEkEth4xL9K2C/wdwHeM/ohpfNqL8VaC1LJxZx6bkQR3Y1PTSmgu3iO\nlgI+0tKUVbo8HRbZVBk1AEk3J1PF6CraB/PWZ5c3YApKhJ/Pfnzjfz7u5NpT\nFqiFQ/+O8j5QqV5/yz7umconFYFEIwIwYF/bAmGZLxCotroCGsyVL4xrr1ED\nvaX9\r\n=eJnd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDwoybXU/0OZL70IDv/9pyQWnEtZKMA36MW8DaXMXPyOAiBlP6cYQPNHLDGDcsNs7OVoVopQ87ZWKjCEpzzaVVIR4g=="}]},"maintainers":[{"name":"sinedied","email":"noda@free.fr"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gettext-extract_2.0.0_1553690434658_0.7683692163810796"},"_hasShrinkwrap":false},"2.0.1":{"name":"gettext-extract","version":"2.0.1","description":"CLI for extracting Gettext messages from JavaScript, TypeScript, JSX and HTML","keywords":["gettext","extract","messages","cli","typescript","jsx","html","po","pot","i18n","l10n","translation"],"author":{"name":"Yohan Lasorsa"},"license":"MIT","homepage":"https://github.com/sinedied/gettext-extract","bugs":{"url":"https://github.com/sinedied/gettext-extract/issues"},"preferGlobal":true,"main":"index.js","bin":{"gettext-extract":"./bin/gettext-extract"},"scripts":{"lint":"eslint *.js","test":"npm run lint -s && cd test && ../bin/gettext-extract && cat out/template.pot","postpublish":"git tag -a $npm_package_version -m '$npm_package_version' && git push --tags"},"dependencies":{"chalk":"^2.3.0","find-up":"^4.1.0","fs-extra":"^8.0.1","gettext-extractor":"^3.1.0","minimist":"^1.2.0"},"devDependencies":{"eslint":"^5.16.0","eslint-config-xo-space":"^0.21.0"},"engines":{"node":">=8.0.0"},"eslintConfig":{"extends":"xo-space/esnext"},"gitHead":"ed62c6a1b8e530e9834634de35db3cb97dde89f7","_id":"gettext-extract@2.0.1","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-k51R90txkCZeXQEDjK0e7gNHfBHJVCu8IQ3AbSVZoOL5nR3yl+C+7qpzp6hoZwOtiniaY+CKeLyvNulsEUM6MA==","shasum":"4ade7e3d7c1c247d95a81f28059ca1923c355886","tarball":"https://registry.npmjs.org/gettext-extract/-/gettext-extract-2.0.1.tgz","fileCount":7,"unpackedSize":8902,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdC02JCRA9TVsSAnZWagAAcucP/3EXQnOkaWXBCwXqYfGj\nBUzpMK3jZxPw77XbnouAwqa+SKVkKF9ljGXR7i8W0CNNRC7CzwKCQJDfMKP6\nFH0UWMvQFLaQocJLGbtoj8bkyV+GsB/QntCpi03M+ZYYM/RF6wS/QfatvJBr\n4cyxNg3A4jTfKOtaPNH1dS9Qcnwfx1V+pePkNQ8nMFioehQDEQcX3D4djsHo\nD7q2nvnFAdR6e15yETxh17zzh5jT25/JI8oxQw+R4ZzS+zHJ1+uJZ0ZJtofa\nm2/8XkjsLXB8heDh8bJhCK9d4BEQ2evh7CpVuwOyJLQ65r8zCMktvqWnE1Px\nvUSj1voNs0vQ5JHGf64ViPMc89I6MphS+k3CXd7R12/nbvZIZtLg4McF26RP\n/xpXZihaVxBF08yvTKPniRbrFZZuMNdJaD8axuhA4F2zTLLV4aoiy/ZBKsKx\nUUsdbd2+O+6DKZqoGvwBPRXrVaYehl/Vi+zI7E/etNWZ6VmwuOquLKmA6BXB\n84Zl3kVhvuXFybf7aL/aszfLk1P8oLu7c1DTR/bPE8rVAPQC+jZ33t6KEV2J\nwwinmx7fP5oDe6i2cNViOvcL3NkrdXjgF1VKl3zhWuBcFUqMgv9pMtmavdjD\n/MnEPXh8ewvYgrDdiyX4RV7IpnJaGdNUnMaG0yc7gg62YPHmCWxhG78UDqeB\nrM7z\r\n=I4ve\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBFEENSTQj0kPJpB1wQ87NT+iOm3Y4J4RTw9Xlhtlu4HAiEAtjAtWt7ycssY6AUPcx/sbrcAgjxTM1jrQ22+0Bmefh0="}]},"maintainers":[{"name":"sinedied","email":"noda@free.fr"}],"_npmUser":{"name":"sinedied","email":"noda@free.fr"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gettext-extract_2.0.1_1561021832208_0.48969787137030485"},"_hasShrinkwrap":false}},"readme":"# :speech_balloon: gettext-extract\n\n[![NPM version](https://img.shields.io/npm/v/gettext-extract.svg)](https://www.npmjs.com/package/gettext-extract)\n[![Build status](https://img.shields.io/travis/sinedied/gettext-extract/master.svg)](https://travis-ci.org/sinedied/gettext-extract)\n![Node version](https://img.shields.io/node/v/gettext-extract.svg)\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\n[![License](https://img.shields.io/npm/l/gettext-extract.svg)](LICENSE)\n\n> CLI for extracting Gettext messages from JavaScript, TypeScript, JSX and HTML\n\nThis CLI is essentially a convenience wrapper around\n[gettext-extractor](https://github.com/lukasgeiter/gettext-extractor), all the processing is done by this library.\n\n## Installation\n\n```sh\nnpm install gettext-extract\n```\n\n## Usage\n```\nUsage: gettext-extract [options]\n\nOptions:\n  -c, --config  Config file [default: .gettext.json]\n  -o, --output  Output file [default: template.pot]\n  -h, --help    Show this help\n```\n\n## Configuration\n\nConfiguration for message extraction can be provided using a `.gettext.json` file, a custom JSON file using the\n`--config` CLI option or by adding a `gettext` object in your `package.json`.\n\nHere is an example configuration (remove comments for valid JSON):\n```hson\n{\n  \"js\": {\n    \"parsers\": [\n      {\n        \"expression\": \"gettext\",\n        \"arguments\": {\n          \"text\": 0\n        }\n      },\n      {\n        \"expression\": \"ngettext\",\n        \"arguments\": {\n          \"text\": 0,\n          \"textPlural\": 1\n        }\n      },\n      {\n        \"expression\": \"pgettext\",\n        \"arguments\": {\n          \"context\": 0,\n          \"text\": 1\n        }\n      }\n    ],\n    \"glob\": {\n      // [node-glob pattern(https://github.com/isaacs/node-glob#glob-primer) to match your JS files\n      \"pattern\": \"src/**/*.ts\",\n      // Add any [node-glob options](https://github.com/isaacs/node-glob#options) here\n      \"options\": {\n        \"ignore\": \"src/**/*.spec.ts\"\n      }\n    }\n  },\n  \"html\": {\n    \"parsers\": [\n      {\n        // Extract message from content of the HTML element with the specified CSS selector\n        \"element\": \"[translate]\",\n        \"attributes\": {\n          \"textPlural\": \"translate-plural\",\n          \"context\": \"translate-context\"\n        }\n      },\n      {\n        // Extract message from attribute of the HTML element\n        \"attribute\": \"translate-text\",\n        \"attributes\": {\n          \"textPlural\": \"translate-plural\",\n          \"context\": \"translate-context\"\n        }\n      }\n    ],\n    \"glob\": {\n      \"pattern\": \"src/**/*.html\"\n    }\n  },\n  //\n  \"headers\": {\n    \"Language\": \"\"\n  },\n  \"output\": \"translations/template.pot\"\n}\n```\n\nAt least one valid parser (JS or HTML) with glob pattern must be present, everything else is optional.\n\nYou can fin additional information concerning the\n[JavaScript / TypeScript / JSX](https://github.com/lukasgeiter/gettext-extractor/wiki/JavaScript%2C-TypeScript%2C-JSX)\nor [HTML](https://github.com/lukasgeiter/gettext-extractor/wiki/HTML) parsers on the `gettext-extractor` wiki.\n","maintainers":[{"name":"sinedied","email":"noda@free.fr"}],"time":{"modified":"2022-05-03T15:39:48.598Z","created":"2017-11-21T09:52:18.399Z","1.0.0":"2017-11-21T09:52:18.399Z","1.0.1":"2017-11-21T10:32:38.869Z","1.0.2":"2017-11-21T10:41:30.053Z","2.0.0":"2019-03-27T12:40:34.767Z","2.0.1":"2019-06-20T09:10:32.348Z"},"homepage":"https://github.com/sinedied/gettext-extract","keywords":["gettext","extract","messages","cli","typescript","jsx","html","po","pot","i18n","l10n","translation"],"author":{"name":"Yohan Lasorsa"},"bugs":{"url":"https://github.com/sinedied/gettext-extract/issues"},"license":"MIT","readmeFilename":"README.md"}