karma-ng-i18n-preprocessor
Preprocessor to use any valid i18n config from JADE file to AngularJS templates.
Installation
Installation is simple using the following:
npm install karma-ng-i18n-preprocessor --save-dev
Configuration
// karma.conf.jsmodule { config;};
Example
Locales file
// en.json "lblTest": "Hello"
Before
span(id="lblTest") #{__("lblTest")}
After
span(id="lblTest") Hello
You can use other preprocessors together with ng-stripScript
npm install karma-ng-jade2js-preprocessor --save-devnpm install karma-ng-stripscript-preprocessor --save-dev
// karma.conf.jspreprocessors: 'content/shared/views/**/*.jade': 'ng-i18n''ng-jade2js''ng-stripScript'
For more information on Karma see the homepage.