1.0.6 • Published 3 years ago

ngx-search-translations-zombies v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

NgxSearchTranslationsZombies

The library for searching a zombies translations

NPM Version NPM Size

Install

$ npm install ngx-search-translations-zombies --save-dev
  • create config file (JSON format):
$ touch .zombiesconfig

Usage

  • add command to package.json:
"scripts": {
    "zombies": "npx ngx-search-translations-zombies"
}
npm run zombies
  • or just
npx ngx-search-translations-zombies

Configuration

KeyValueRequiredDescription
translationFilestringyespath to file with translations
searchDirstringyespath to dir for search keys of translation
searchExtensionsstring[]yesfiles extensions in which should be searched keys of translation
showEmptyKeysbooleannoshow zombies keys in console
showTotalCountbooleannoshow total of searched zombies keys
outputFilestringnopath to file where result should be written
excludeKeysstring[]nokeys for skipping
excludeKeysStartsstring[]nokeys beginning with these lines will be skipped
excludeKeysEndsstring[]nokeys, ends ending with these lines will be skipped

Example

{
  "translationFile": "./src/assets/translations/en.json",
  "searchDir": "./src",
  "searchExtensions": [".ts", ".html"],
  "showEmptyKeys": true,
  "showTotalCount": true,
  "outputFile": "./zombies_translations.txt",
  "excludeKeys": [
    "user.gender.other"
  ],
  "excludeKeysStarts": [
    "user.types."
  ],
  "excludeKeysEnds": [
    ".notices.save"
  ]
}