{"_id":"@daledupreez-isc/gulp-angular-translate-extract","_rev":"1-3e86d3ca903d43b80dc6db73884f5c5a","name":"@daledupreez-isc/gulp-angular-translate-extract","dist-tags":{"latest":"0.1.10-daledupreez-isc"},"versions":{"0.1.10-daledupreez-isc":{"name":"@daledupreez-isc/gulp-angular-translate-extract","version":"0.1.10-daledupreez-isc","description":"Gulp version of grunt-angular-translate. Simply extract all the translation keys for angular-translate project created by Pascal Precht. Forked from https://github.com/bcabanes/gulp-angular-translate-extract.","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/daledupreezISC/gulp-angular-translate-extract.git"},"keywords":["gulpplugin","angularJS","angular","angular-translate","gulp","javascript","js","translate","i18n","l10n","localisation","translation","internationalization","internationalisation"],"author":{"name":"Ben"},"license":"MIT","bugs":{"url":"https://github.com/daledupreezISC/gulp-angular-translate-extract/issues"},"homepage":"https://github.com/daledupreezISC/gulp-angular-translate-extract","devDependencies":{"gulp":"*"},"dependencies":{"chalk":"1.1.*","flat":"^1.6.0","gulp-util":"3.0.*","json-stable-stringify":"^1.0.0","lodash":"3.10.*","through2":"^2.0.0"},"gitHead":"fc91e6b91189fe4211b0df157612e9a2fe07efa1","_id":"@daledupreez-isc/gulp-angular-translate-extract@0.1.10-daledupreez-isc","_shasum":"246f7535881c9332d40ab090a7abd7461980dea0","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.4","_npmUser":{"name":"daledupreez-isc","email":"dale.dupreez@intersystems.com"},"dist":{"shasum":"246f7535881c9332d40ab090a7abd7461980dea0","tarball":"https://registry.npmjs.org/@daledupreez-isc/gulp-angular-translate-extract/-/gulp-angular-translate-extract-0.1.10-daledupreez-isc.tgz","integrity":"sha512-gBLWu9evPydvhENmdmJnB/nT2LPkshwTEfLA9ddZw3HnhPQpJ4wyRvfmnbgjB5FwCbH4j5Ms7bJ0/aNgMTCU3w==","fileCount":18,"unpackedSize":38984,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUrYCCRA9TVsSAnZWagAAXsYP/3DcgsKWdcNvGvB42UFv\nvRcg2KO3an1IdXcSEUHgll3cS1g0xGt2UJJO7+cfrNPqr9PnOTIculqFxtfr\n0HYAq7sSkXf0D8UzmFxwJxQKeU2zFt7w5hucBoEi8FGtfD/CQiwERXFMUrx4\nGJR9TEqNvhQLOBr6PACxkjwE33O+5cwFuzOxPmaH8dytuxEMoe1MjL1+++k4\ni8jEPJ/C5WYjK/Q0NW5uGyQmQ0hF6AmcpAo+qDOz+e5Wx145ehHOUQTfaw1f\nHik4cjL/WcHqhGFxvyuAwxMntZDJ6FcCv/cvM/ZpwWYxDuApRPY7SM45Tf9A\nvqTgjK15Ydm/PIM6wF4AuKtA/Yzsv2zhyBfHI76mNx6SO8s4Zk18DSzWlwRv\nbaImxpU/iTqDm+avrzgzPILJT8lNm5jCmoWOuuYpziMw7SmU1Uh/cie7wWZr\nWtO+mj1Xi+XUJwAGBQh7Qow9xeNMUvkWQtD23ayyBpXQkHlzelyIJs1izgkD\nT7RP0DJBy+BVJ94RlSMJeJnVDrQ9X/V1b6qqXttVB3BxkLAkMtcTSd4olPBU\nTC/lSlhJ3knhsVVKFmlkasD8e0shpAKycm60/UY98nr4E9I0JyldQtrw7Unx\neqhBDdhNhYgxtaY38wuffokCAC1GPk5DpwkIQISf6IdrlLe+4p91NnHEuSJz\nEZd2\r\n=5W2e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEFmVH3pQQX1KTPGJnIQejFtEQQhnUpeyW4wrYohtoUeAiBvCTFnR4VHPuKzlsQimg7C7QB4OKVRptw0DTdUl3pZcQ=="}]},"maintainers":[{"name":"daledupreez-isc","email":"dale.dupreez@intersystems.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gulp-angular-translate-extract_0.1.10-daledupreez-isc_1548924417920_0.19419982684266746"},"_hasShrinkwrap":false}},"time":{"created":"2019-01-31T08:46:57.724Z","0.1.10-daledupreez-isc":"2019-01-31T08:46:58.077Z","modified":"2022-04-05T02:37:49.459Z"},"maintainers":[{"name":"daledupreez-isc","email":"dale.dupreez@intersystems.com"}],"description":"Gulp version of grunt-angular-translate. Simply extract all the translation keys for angular-translate project created by Pascal Precht. Forked from https://github.com/bcabanes/gulp-angular-translate-extract.","homepage":"https://github.com/daledupreezISC/gulp-angular-translate-extract","keywords":["gulpplugin","angularJS","angular","angular-translate","gulp","javascript","js","translate","i18n","l10n","localisation","translation","internationalization","internationalisation"],"repository":{"type":"git","url":"git+https://github.com/daledupreezISC/gulp-angular-translate-extract.git"},"author":{"name":"Ben"},"bugs":{"url":"https://github.com/daledupreezISC/gulp-angular-translate-extract/issues"},"license":"MIT","readme":"# gulp-angular-translate-extract\r\nGulp version of [grunt-angular-translate](https://github.com/angular-translate/grunt-angular-translate).\r\nSimply extract all the translation keys for [angular-translate](https://github.com/PascalPrecht/angular-translate) project created by [Pascal Precht](https://github.com/PascalPrecht).\r\n\r\n## Getting started\r\nInstall this gulp plugin next to your project. Require [gulpjs](https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md).\r\n\r\n```bash\r\n$ npm install gulp-angular-translate-extract\r\n```\r\n\r\nThen you can use the gulp plugin inside your gulp tasks, as follow:\r\n\r\n```javascript\r\n//...\r\n    var gulp = require('gulp');\r\n    var angularTranslate = require('./');\r\n//...\r\n    gulp.task('default', function () {\r\n        return gulp.src('fixtures/*.html')\r\n            .pipe(angularTranslate({\r\n                lang: ['en_CA', 'fr_CA']\r\n            }))\r\n            //..\r\n    });\r\n//...\r\n```\r\n\r\nTo know all options available, please read the documentation ([here](#Options)).\r\n\r\n## Use Cases\r\n\r\n### Views\r\n\r\n#### Filters\r\n\r\n```html\r\n{{'TRANSLATION' | translate}}\r\n```\r\n\r\n```html\r\n{{'TRANSLATION' | translate:XXXXXX}}\r\n```\r\n\r\n#### Directives\r\n\r\n```html\r\n<a href=\"#\" translate>TRANSLATION</a>\r\n```\r\n\r\n#### Directives plural (custom attribute angular-plural-extract to automatize extraction)\r\n\r\n```html\r\n<span translate=\"TRANSLATION_KEY\" angular-plural-extract=\"['TEXT FOR ONE','# TEXT FOR OTHER']\" translate-values=\"{NB: X}\" translate-interpolation=\"messageformat\"></span>\r\n```\r\n\r\n### Javascript\r\n\r\n#### Filter\r\n\r\n```javascript\r\nfilter(\"translate\")(\"TRANSLATION\")\r\n```\r\n\r\n#### Service angular-translate\r\n\r\n```javascript\r\n$translate('TRANSLATION')\r\n```\r\n\r\n```javascript\r\n$translate.instant('TRANSLATION')\r\n```\r\n\r\n```javascript\r\n$translate(['TRANSLATION', 'TRANSLATION_1'])\r\n```\r\n\r\n## Configuration\r\n\r\n### Options\r\n\r\nThis is all options supported by gulp-angular-translate:\r\n\r\n- [nullEmpty](#nullempty)\r\n- [namespace](#namespace)\r\n- [interpolation](#interpolation)\r\n- [defaultLang](#defaultLang)\r\n- [lang](#lang)\r\n- [prefix](#prefix)\r\n- [suffix](#suffix)\r\n- [dest](#dest)\r\n- [safeMode](#safeMode)\r\n- [stringifyOptions](#stringifyoptions)\r\n\r\n#### nullEmpty\r\n\r\nType: `Boolean`\r\nDefault: `false`\r\n\r\nExample: `true`\r\n\r\nIf set to true, it will replace all final empty translations by *null* value.\r\n\r\n#### namespace\r\n\r\nType: `Boolean`\r\nDefault: `false`\r\n\r\nExample: `true`\r\n\r\nIf set to true, it will organize output JSON like the following.\r\n\r\n> It is important that, when this option is set to `true`, all your tokens __MUST HAVE__ a dot `.` namespace's delimiter.\r\nThe token `noNamespace` is invalid contrary to `has.namespace` which is valid.\r\n\r\n`````\r\n{\r\n  \"MODULE\": {\r\n    \"CATEGORY\": {\r\n      \"TITLE\": \"My Title\",\r\n      \"TITLE1\": null\r\n    }\r\n  }\r\n}\r\n`````\r\n\r\n\r\n#### interpolation\r\n\r\nType: `Object`\r\nDefault: `{ startDelimiter: '{{', endDelimiter: '}}' }`\r\n\r\nExample: `{ startDelimiter: '[[', endDelimiter: ']]' }`\r\n\r\nDefine interpolation symbol use for your angular application.\r\nThe angular's docs about [$interpolateProvider](http://docs.angularjs.org/api/ng.$interpolateProvider) explain how you can configure the interpolation markup.\r\n\r\n#### defaultLang\r\n\r\nType: `String`\r\nDefault: `undefined`\r\n\r\nExample: `\"en_CA\"`\r\n\r\nDefine the default language. For default language, by default the key will be set as value.\r\n\r\n#### customRegex\r\n\r\nType: `Array<String>`\r\nDefault: `[]`\r\n\r\nExample:\r\n\r\n```javascript\r\ncustomRegex: [\r\n  'tt-default=\"\\'((?:\\\\\\\\.|[^\\'\\\\\\\\])*)\\'\\\\|translate\"'\r\n],\r\n```\r\n\r\nWill extract `MY.CUSTOM.REGEX` from the following HTML: `<article tt-default=\"'MY.CUSTOM.REGEX'|translate\">`.\r\n\r\nEnjoy your custom regex guys!\r\n\r\n#### lang\r\n\r\nType: `Array`\r\nDefault: `undefined`\r\n\r\nExample: `['en_CA', 'en_US']`\r\n\r\nDefine language to be extract (en__CA, en__US, xxx). xxx will be the output filename wrapped by prefix and suffix option.\r\n\r\n#### prefix\r\n\r\nType: `String`\r\nDefault: `\"\"`\r\n\r\nExample: `\"project_\"`\r\n\r\nSet prefix to output filenames (cf [angular-translate#static-files](https://github.com/PascalPrecht/angular-translate/wiki/Asynchronous-loading#using-extension-static-files-loader)).\r\n\r\n#### suffix\r\n\r\nType: `String`\r\nDefault:  `\"\"`\r\n\r\nExample: `\".json\"`\r\n\r\nSet suffix to output filenames (cf [angular-translate#static-files](https://github.com/PascalPrecht/angular-translate/wiki/Asynchronous-loading#using-extension-static-files-loader)).\r\n\r\n#### dest\r\n\r\nType: `String`\r\nDefault:  `\"\"`\r\n\r\nExample: `\"src/assets/i18n\"`\r\n\r\nRelative path to output folder.\r\n\r\n#### safeMode\r\n\r\nType: `Boolean`\r\nDefault: `false`\r\n\r\nIf safeMode is set to `true` the deleted translations will stay in the output lang file.\r\n\r\n#### stringifyOptions\r\n\r\nType: `Boolean` or `Object`\r\nDefault: `false`\r\n\r\nIf stringifyOptions is set to `true` the output will be sort (case insensitive).\r\nIf stringifyOptions is an `object`, you can easily check [json-stable-stringify](https://github.com/substack/json-stable-stringify) README.\r\n\r\n## License\r\n\r\nThe MIT License (MIT)\r\n\r\nCopyright (c) 2015 Benjamin Cabanes\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy of\r\nthis software and associated documentation files (the \"Software\"), to deal in\r\nthe Software without restriction, including without limitation the rights to\r\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\r\nthe Software, and to permit persons to whom the Software is furnished to do so,\r\nsubject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\r\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r\n","readmeFilename":"README.md"}