{"_id":"@aum_biosync/ngx-translate-extract","_rev":"9-cadb3f51cf244dc67b513a059171e7d6","name":"@aum_biosync/ngx-translate-extract","dist-tags":{"latest":"8.0.8"},"versions":{"8.0.8":{"name":"@aum_biosync/ngx-translate-extract","version":"8.0.8","keywords":["angular","ionic","ngx-translate","extract","extractor","translate","translation","i18n","gettext"],"author":{"name":"Kim Biesbjerg","email":"kim@biesbjerg.com"},"license":"MIT","_id":"@aum_biosync/ngx-translate-extract@8.0.8","maintainers":[{"name":"tmijieux","email":"thomas.mijieux@hotmail.fr"},{"name":"hbaltz","email":"hugobaltz@gmail.com"}],"homepage":"https://github.com/aum-biosync/ngx-translate-extract","bugs":{"url":"https://github.com/aum-biosync/ngx-translate-extract/issues"},"bin":{"ngx-translate-extract":"bin/cli.js"},"dist":{"shasum":"9b04d106015a0b076b04d09fe914716c033bd7d2","tarball":"https://registry.npmjs.org/@aum_biosync/ngx-translate-extract/-/ngx-translate-extract-8.0.8.tgz","fileCount":79,"integrity":"sha512-jIlMp7npPADvtV7fBuH0RCcoTvaDQwjkaLgwDnAq/cdGD+jmDAB9b3iMwkVqe9dnY9Z/D4j8hKZBS46sGXwzSQ==","signatures":[{"sig":"MEUCIQCV+Rzn9nDDQ0GzoQJqoQTbbkkeiLjjBZReBGbKTIWtuAIgRGNfIJsVrCetIokLBxScDofgFA8rbb7EpGCBmGihcto=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":101523,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj0r66ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrcJg/+NQNuIx27wQH/2zyhuGesUOCgCUrh7I4u8xLkNyLD6WdTlpck\r\npgQIVtEeRfseyT+y7orzFt11HlcUVWaKRhT5K0jdvgfyhJk4rhfh0Lt+FT/+\r\n+CqpFjsEVHypXAcKLUEVhrcbLyanPU1hPMt86/aQ9DQhKH47tbXvK3dpT5p+\r\nBnJkNvl1NmasbnDKRIlXaHuEGd7vW8zGuQ6GhE2KRCeW/sCwoPYumP/Lzxep\r\n5Y3Tpck5/2GbiCtZA7Nwi/tNdRF3R32B0pr9P471QmozL9+AbTB9JHUwVePT\r\nDsJ5pTYJMUXgRtnF9EfcRt00TCA9aKuLBkUfvTknT/R38A8WZ2A8ZvolKfgg\r\nK50WImvpRKgT55MmDoAA8Y/yJZFxbSt8kkwIGnBlK8+NiB+64SmwpAs9AWmG\r\n3whnmTPr2+sL4rRy+O+NYCdU+LFSb0bRjI8W8+seiAnSlzVaKWaL4yU3Hzfi\r\nHmmHLo9qqahBUYv4IWdRLJPR9qlyFgSx2pCA9l51rvJfDniT676X6XQsm+5A\r\nv9xjWslBvrmOhzDu+jofJnk56zTXlUHjnVY6gvy+ATaunZDosc86eVKXgWXd\r\nrOZA8eloRGpcbc7WSmUI3wcVayGCMmr4/unNR0kixSZbEghpmhPmob6EGqFh\r\nRhXfvjil4/kGIPLhaCDDlO98DGoVK2orTYw=\r\n=jgxR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","type":"module","config":{},"engines":{"node":">=14"},"gitHead":"194271d61e44f786de644e6a34cd04f9c51f398c","scripts":{"lint":"eslint ./src/**/*.ts","test":"ts-mocha -p tsconfig.spec.json tests/**/*.spec.ts","build":"npm run clean && tsc","clean":"rimraf ./dist","watch":"npm run clean && tsc --watch"},"typings":"dist/index.d.ts","_npmUser":{"name":"tmijieux","email":"thomas.mijieux@hotmail.fr"},"prettier":{"useTabs":true,"printWidth":145,"singleQuote":true,"trailingComma":"none"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"git+ssh://git@github.com/aum-biosync/ngx-translate-extract.git","type":"git"},"_npmVersion":"9.4.0","description":"Extract strings from projects using ngx-translate","directories":{},"_nodeVersion":"18.12.0","dependencies":{"flat":"^5.0.2","glob":"^7.2.0","path":"^0.12.7","boxen":"^6.2.1","yargs":"^17.5.1","colorette":"^2.0.16","terminal-link":"^3.0.0","gettext-parser":"^4.2.0","@angular/compiler":"^13.1.2","@phenomnomnominal/tsquery":"^4.1.1"},"publishConfig":{"registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.3.6","mocha":"^10.2.0","braces":"^3.0.2","eslint":"^8.32.0","rimraf":"^3.0.2","ts-node":"^10.4.0","prettier":"^2.7.1","ts-mocha":"^10.0.0","cross-env":"^7.0.3","typescript":"^4.5.2","@types/chai":"^4.3.3","@types/flat":"^5.0.2","@types/glob":"^8.0.0","@types/node":"^16","@types/mocha":"^9.1.1","@types/yargs":"^17.0.20","pretty-quick":"^3.1.3","@types/braces":"^3.0.1","eslint-plugin-import":"^2.27.5","@types/gettext-parser":"4.0.1","@typescript-eslint/parser":"^5.48.2","@typescript-eslint/eslint-plugin":"^5.48.2","@typescript-eslint/eslint-plugin-tslint":"^5.48.2"},"peerDependencies":{"typescript":">=4.4.0","@angular/compiler":">=13.1.2"},"_npmOperationalInternal":{"tmp":"tmp/ngx-translate-extract_8.0.8_1674755770618_0.6819625216321639","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-01-26T17:56:10.412Z","modified":"2024-10-29T12:26:05.957Z","8.0.7":"2023-01-26T17:52:37.620Z","8.0.8":"2023-01-26T17:56:10.836Z"},"bugs":{"url":"https://github.com/aum-biosync/ngx-translate-extract/issues"},"author":{"name":"Kim Biesbjerg","email":"kim@biesbjerg.com"},"license":"MIT","homepage":"https://github.com/aum-biosync/ngx-translate-extract","keywords":["angular","ionic","ngx-translate","extract","extractor","translate","translation","i18n","gettext"],"repository":{"url":"git+ssh://git@github.com/aum-biosync/ngx-translate-extract.git","type":"git"},"description":"Extract strings from projects using ngx-translate","maintainers":[{"email":"thomas.mijieux@hotmail.fr","name":"tmijieux"}],"readme":"# ngx-translate-extract\n\n> Angular translations extractor (plugin for [@ngx-translate](https://github.com/ngx-translate/core))\n\n> ✓ _Angular 14, Ivy and Angular Universal (SSR) compatible_\n\nExtract translatable (ngx-translate) strings and save as a JSON or Gettext pot file.\nMerges with existing strings if the output file already exists.\n\n## History\n\nThis project was originally created by [Kim Biesbjerg](https://github.com/biesbjerg/ngx-translate-extract).\nUnfortunately he was unable to continue to maintain it so the Vendure team agreed to take over maintenance of a fork.\nThis is a fork of the latter for experimentation and to cater to some personal modifications.\n\n## Install\n\nInstall the package in your project:\n\n```bash\nnpm install @colsen1991/ngx-translate-extract --save-dev\n```\n\nChoose the version corresponding to your Angular version:\n\n| Angular    | ngx-translate-extract                                                                      |\n|------------|--------------------------------------------------------------------------------------------|\n| 14         | 8.0.5+                                                                                     |\n| 13         | 8.0.5+                                                                                     |\n| 8.x – 12.x | [@biesbjerg/ngx-translate-extract](https://github.com/biesbjerg/ngx-translate-extract) 7.x |\n\nAdd a script to your project's `package.json`:\n\n```json\n...\n\"scripts\": {\n  \"i18n:init\": \"ngx-translate-extract --input ./src --output ./src/assets/i18n/template.json --key-as-default-value --replace --format json\",\n  \"i18n:extract\": \"ngx-translate-extract --input ./src --output ./src/assets/i18n/{en,da,de,fi,nb,nl,sv}.json --clean --format json\"\n}\n...\n```\n\nYou can now run `npm run i18n:extract` and it will extract strings from your project.\n\n## Usage\n\n**Extract from dir and save to file**\n\n```bash\nngx-translate-extract --input ./src --output ./src/assets/i18n/strings.json\n```\n\n**Extract from multiple dirs**\n\n```bash\nngx-translate-extract --input ./src-a ./src-b --output ./src/assets/i18n/strings.json\n```\n\n**Extract and save to multiple files using path expansion**\n\n```bash\nngx-translate-extract --input ./src --output ./src/i18n/{da,en}.json\n```\n\n### JSON indentation\n\nTabs are used by default for indentation when saving extracted strings in json formats:\n\nIf you want to use spaces instead, you can do the following:\n\n```bash\nngx-translate-extract --input ./src --output ./src/i18n/en.json --format-indentation ' '\n```\n\n### Marker function\n\nIf you want to extract strings that are not passed directly to `NgxTranslate.TranslateService`'s\n`get()`/`instant()`/`stream()` methods, or its `translate` pipe or directive, you can wrap them\nin a marker function/pipe/directive to let `ngx-translate-extract` know you want to extract them.\n\n```bash\nnpm install @colsen1991/ngx-translate-extract-marker\n```\n\nSee [@colsen1991/ngx-translate-extract-marker](https://github.com/colsen1991/ngx-translate-extract-marker/blob/master/README.md) documentation for more information.\n\n### Commandline arguments\n\n```\nUsage:\nngx-translate-extract [options]\n\nOutput\n  --format, -f                Format        [string] [choices: \"json\", \"namespaced-json\", \"pot\"] [default: \"json\"]\n  --format-indentation, --fi  Format indentation (JSON/Namedspaced JSON)                  [string] [default: \"\\t\"]\n  --sort, -s                  Sort strings in alphabetical order                                         [boolean]\n  --clean, -c                 Remove obsolete strings after merge                                        [boolean]\n  --replace, -r               Replace the contents of output file if it exists (Merges by default)       [boolean]\n\nExtracted key value (defaults to empty string)\n  --key-as-default-value, -k     Use key as default value                                                [boolean]\n  --null-as-default-value, -n    Use null as default value                                               [boolean]\n  --string-as-default-value, -d  Use string as default value                                              [string]\n\nOptions:\n  --version, -v  Show version number                                                                     [boolean]\n  --help, -h     Show help                                                                               [boolean]\n  --input, -i    Paths you would like to extract strings from. You can use path expansion, glob patterns and\n                 multiple paths                                               [array] [required] [default: [\"./\"]]\n  --output, -o   Paths where you would like to save extracted strings. You can use path expansion, glob\n                 patterns and multiple paths                                                    [array] [required]\n\nExamples:\n  ngx-translate-extract -i ./src-a/ -i ./src-b/ -o strings.json             Extract (ts, html) from multiple paths\n  ngx-translate-extract -i './{src-a,src-b}/' -o strings.json               Extract (ts, html) from multiple paths using brace expansion\n  ngx-translate-extract -i ./src/ -o ./i18n/da.json -o ./i18n/en.json       Extract (ts, html) and save to da.json and en.json\n  ngx-translate-extract -i ./src/ -o './i18n/{en,da}.json'                  Extract (ts, html) and save to da.json and en.json using brace expansion\n  ngx-translate-extract -i './src/**/*.{ts,tsx,html}' -o strings.json       Extract from ts, tsx and html\n  ngx-translate-extract -i './src/**/!(*.spec).{ts,html}' -o strings.json   Extract from ts, html, excluding files with \".spec\"\n```\n\n## Note for GetText users\n\nPlease pay attention of which version of `gettext-parser` you actually use in your project. \nFor instance, `gettext-parser:1.2.2` does not support HTML tags in translation keys.\n\n## Credits\n\n- Original library, idea and code: [Kim Biesbjerg](https://github.com/biesbjerg/ngx-translate-extract) ❤️\n- Further updates and improvements were then made by [bartholomej](https://github.com/bartholomej) ❤️\n- Further updates and improvements were then made by [michaelbromley](https://github.com/michaelbromley)/[vendure-ecommerce](https://github.com/vendure-ecommerce) ❤️\n- Further updates and improvements were made by [P4's](https://github.com/P4) ❤️\n","readmeFilename":"README.md"}