Skip to content

Cach/ngx-search-translations-zombies

Repository files navigation

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

Key Value Required Description
translationFile string yes path to file with translations
searchDir string yes path to dir for search keys of translation
searchExtensions string[] yes files extensions in which should be searched keys of translation
showEmptyKeys boolean no show zombies keys in console
showTotalCount boolean no show total of searched zombies keys
outputFile string no path to file where result should be written
excludeKeys string[] no keys for skipping
excludeKeysStarts string[] no keys beginning with these lines will be skipped
excludeKeysEnds string[] no keys, 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"
  ]
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published