{"_id":"@bullhorn/linguist","_rev":"31-3ced2a8356ae1a286c574ac4c91f906d","name":"@bullhorn/linguist","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@bullhorn/linguist","version":"0.1.0","keywords":["i18n","l10n","Localization"],"author":{"name":"Brian Kimball","email":"bvkimball@gmail.com"},"license":"MIT","_id":"@bullhorn/linguist@0.1.0","maintainers":[{"name":"bvkimball","email":"bvkimball@gmail.com"}],"homepage":"https://github.com/bullhorn/linguist#readme","bugs":{"url":"https://github.com/bullhorn/linguist/issues"},"ava":{"files":["build/main/**/*.spec.js"],"source":["build/main/**/*"]},"bin":{"linguist":"build/main/cli.js"},"nyc":{"exclude":["**/*.spec.js"]},"dist":{"shasum":"c6ddcdf5b90dd14d761d0fd06d08a60756571c67","tarball":"https://registry.npmjs.org/@bullhorn/linguist/-/linguist-0.1.0.tgz","integrity":"sha512-Jdhqx6JLyY2nPHzD/NxkFa0fxtKhtsyHxuYCQM1EZ/r/S5HjGkubYHRy1Lo49k9nH6UTn0A24YSo5DqwlyV23w==","signatures":[{"sig":"MEUCIC04PhsxgbVEu6BskaRhQfNbWeqmBemLz+jYNhs1bWcpAiEA3DiREk9JwxjDtyp1vyjvkvVyVfr/7akeeTA0J6BzdYw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"build/main/index.js","_from":".","files":["dist"],"module":"build/module/index.js","_shasum":"c6ddcdf5b90dd14d761d0fd06d08a60756571c67","engines":{"npm":">= 3","node":">= 4.2.1"},"gitHead":"e6a08e0f746f76821f7867734f6791951bba1f84","scripts":{"cov":"yarn unit && yarn html-coverage && opn coverage/index.html","docs":"typedoc src/index.ts --excludePrivate --mode file --theme minimal --out build/docs && opn build/docs/index.html","info":"npm-scripts-info","lint":"tslint src/**/*.ts","test":"yarn lint && yarn unit && yarn check-coverage","unit":"yarn build && nyc ava","build":"trash build && tsc -p tsconfig.json && tsc -p config/tsconfig-module.json","watch":"trash build && multiview [yarn watch:build] [yarn watch:unit]","release":"standard-version","docs:json":"typedoc --mode file --json build/docs/typedoc.json src/index.ts","watch:unit":"tsc -p tsconfig.json && ava --watch --verbose","watch:build":"tsc -p tsconfig.json -w","html-coverage":"nyc report --reporter=html","send-coverage":"nyc report --reporter=lcov > coverage.lcov && codecov","check-coverage":"nyc check-coverage --lines 50 --functions 50 --branches 50"},"typings":"build/main/index.d.ts","_npmUser":{"name":"bvkimball","email":"bvkimball@gmail.com"},"repository":{"url":"git+https://github.com/bullhorn/linguist.git","type":"git"},"_npmVersion":"3.10.9","description":"A universal localization managment tool for web projects","directories":{},"_nodeVersion":"6.9.2","dependencies":{"rc":"^1.1.6","flat":"^2.0.1","chalk":"^1.1.1","clear":"0.0.1","sinon":"^1.17.7","tslib":"^1.5.0","lodash":"4.3.0","marked":"^0.3.6","mkdirp":"^0.5.1","rimraf":"^2.5.4","xml2js":"^0.4.17","cheerio":"^0.22.0","commander":"^2.9.0","handlebars":"^4.0.5","log-update":"^1.0.2","node-fetch":"^1.6.3","fs-readline":"^2.1.0","gettext-parser":"^1.2.2"},"scripts-info":{"cov":"Run tests, generate the HTML coverage report, and open it in a browser","docs":"Generate API documentation and open it in a browser","info":"Display information about the scripts","lint":"Lint all typescript source files","test":"Lint and test the library","unit":"Run unit tests","build":"(Trash and re)build the library","watch":"Watch source files, rebuild library on changes, rerun relevant tests","release":"Bump package.json version, update CHANGELOG.md, tag a release","docs:json":"Generate API documentation in typedoc JSON format","watch:unit":"Watch the build, rerun relevant tests on changes","watch:build":"Watch source files, rebuild library on changes","html-coverage":"Output HTML test coverage report","send-coverage":"Output lcov test coverage report and send it to codecov"},"publishConfig":{"registry":"https://registry.npmjs.org"},"devDependencies":{"ava":"^0.18.1","nyc":"^10.0.0","rimraf":"^2.5.3","tslint":"^4.0.2","codecov":"^1.0.1","opn-cli":"^3.1.0","typedoc":"^0.5.5","codelyzer":"^2.0.0-beta.4","multiview":"^2.3.1","trash-cli":"^1.4.0","typescript":"^2.2.0","@types/node":"^7.0.5","pascal-case":"^2.0.0","@types/chalk":"^0.4.31","@types/marked":"0.0.28","@types/xml2js":"0.0.32","@types/cheerio":"^0.17.31","@types/commander":"^2.3.31","npm-scripts-info":"^0.3.6","standard-version":"^4.0.0","@types/handlebars":"^4.0.31","tslint-config-standard":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/linguist-0.1.0.tgz_1490365902342_0.7652018598746508","host":"packages-18-east.internal.npmjs.com"}}},"time":{"created":"2017-03-24T14:31:43.314Z","modified":"2026-09-03T13:40:48.837Z","0.1.0":"2017-03-24T14:31:43.314Z"},"bugs":{"url":"https://github.com/bullhorn/linguist/issues"},"author":{"name":"Brian Kimball","email":"bvkimball@gmail.com"},"license":"MIT","homepage":"https://github.com/bullhorn/linguist#readme","keywords":["i18n","l10n","Localization"],"repository":{"url":"git+https://github.com/bullhorn/linguist.git","type":"git"},"description":"A universal localization managment tool for web projects","maintainers":[{"email":"arajiv@bullhorn.com","name":"arajiv"},{"email":"devnpm@bullhorn.com","name":"bullhorn-dev"},{"email":"tgadre@bullhorn.com","name":"tgadre"},{"email":"haris.iqbal91@gmail.com","name":"hiqbal01"},{"email":"robslabarbera@gmail.com","name":"robslabarbera"},{"email":"tstorch@bullhorn.com","name":"trent-storch-bullhorn"},{"email":"aossi@bullhorn.com","name":"adrian.ossi"},{"email":"dvoegelin@bullhorn.com","name":"dvoegelin"},{"email":"bhavish.pulnah@bullhorn.com","name":"bhav15h-bh"},{"email":"ndickerson@bullhorn.com","name":"ndickerson"},{"email":"jeremy.dobler@bullhorn.com","name":"jdobler"}],"readme":"<img src=\"bully.png\" align=\"left\" width=\"130\" />\n\n# linguist [![Build Status](https://travis-ci.org/bullhorn/linguist.svg?branch=master)](https://travis-ci.org/bullhorn/linguist) [![Coverage Status](https://codecov.io/github/bullhorn/linguist/coverage.svg?branch=master)](https://codecov.io/gh/bullhorn/linguist)\n\nA CLI to help manage localization files developed and used by Bullhorn\n## Installation\n\n```npm install -g @bullhorn/linguist```\n\n## Configuration\n\nSetup you `.linguistrc` file\n\n```\n{\n    locale: 'en-US',          // default locale used for translations\n    sources: ['./src'],       // list of directories to search for KEYS.\n    dest: './l10n',           // where localization files are stored\n    patterns: [               // file patterns to look for keys in\n        '/**/*.html',\n        '/**/*.ts'\n    ],\n    prefix: 'messages.',      // file prefix for saving localization files\n    format: 'json',           // localization file format, ie. json, namespaced-json, pot, xliff, xliff2\n    verbose: false,           // display extra information in console\n    replace: false,           // replace existing translations when extraction keys\n    clean: false,             // removed unused keys when extracting new keys\n    keys: []                  // Extra regular expression to be used by the parser\n}\n```\n\n## Usage\n\n### Finding all the translations within your project files\n\n>  linguist check [lang]\n\n```\nUsage: check [options] [lang]\n\nCheck for missing translation keys\n\nOptions:\n    -h, --help               output usage information\n    -s, --sources [sources]  specify source directories.\n    -d, --dest <dest>        specify output directory.\n    -v, --verbose            list all keys found.\n```\n\n```\n$ linguist check en-US\n+ Custom keys found, adding regular expression parser\n✔︎ Extracted 109 strings from '/Projects/test/js'\n✔︎ Extracted 349 strings from '/Projects/test/partials'\n✔︎ Extracted 237 strings from '/Projects/test/node_modules/package'\n* Loaded Control file\n✔︎ 515 existing keys found\n✗ Missing 105 keys\n✗ Found 72 unused keys\n```\n\n### Updating you control language file with all keys\n\n> linguist extract [lang]\n\n```\nUsage: extract [options] [lang]\n\nUpdates translation file with missing keys\n\nOptions:\n    -h, --help               output usage information\n    -s, --sources [sources]  specify source directories.\n    -d, --dest <dest>        specify lang directory.\n    -f, --format <format>    specify output format. (json, xliff, pot)\n    -r, --replace            Replace the contents of output file if it exists (Merges by default).\n    -c, --clean              Remove obsolete strings when merging.\n```\n\n``` \n$ linguist extract en-US\n⠴ extracting...\n✔︎ Extracted 100 strings from '/Projects/test/src'\n✔︎ Saved to ./shared/i18n/de.json\n```\n\n### Translating you control language\n\n> linguist translate [lang]\n\n```\nUsage: translate [options] [lang]\n\nTranslate source file to new language\n\nOptions:\n    -h, --help             output usage information\n    -d, --dest <dest>      specify localization resources directory.\n    -f, --format <format>  specify output format. (json, xliff)\n```\n\n```\n$ linguist translate de-DE\n* Loaded Control file\n✔︎ 1026 existing keys found\n✗ Missing 352 translations\n⠧ translating...350 of 352\n✔︎ Saved to './shared/i18n/de-DE.json'\n```\n\n### Convert\n\n> linguist convert [lang] [to]\n\n```\nUsage: convert [options] [lang] [to]\n\nConvert translations to new format\n\nOptions:\n    -h, --help             output usage information\n    -d, --dest <dest>      specify localization resources directory.\n    -f, --format <format>  specify output format. (json, xliff)\n```\n\n```\n$ linguist convert -f xliff de-DE\n* Loaded Control file\n✔︎ Saved to './shared/i18n/de-DE.xlf'\n```\n\n### Testing\n\nTo run all the unit tests, simply run:\n\n> yarn test\n\n","readmeFilename":"README.md"}