# karma-ng-i18n-preprocessor

> A Karma plugin. Use any valid i18n config from JADE file to AngularJS templates

Latest version **0.0.2** (published 2015-02-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install karma-ng-i18n-preprocessor
pnpm add karma-ng-i18n-preprocessor
yarn add karma-ng-i18n-preprocessor
bun add karma-ng-i18n-preprocessor
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2015-02-03 |
| First published | 2015-02-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Keith McCanless and Leandro de Souza |
| Maintainers | lsdev14 |
| Keywords | karma-plugin, karma-preprocessor, angularjs, angular, html2js, jade2js, jade |

## Links

- npm: https://www.npmjs.com/package/karma-ng-i18n-preprocessor
- Repository: https://github.com/lsdev14/karma-ng-i18n-preprocessor
- Issues: https://github.com/lsdev14/karma-ng-i18n-preprocessor/issues
- npm.io page: https://npm.io/package/karma-ng-i18n-preprocessor

## Dependencies (1)

- [i18n](https://npm.io/package/i18n.md) ~0.5.0

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2015-02-03
- 0.0.1 — 2015-02-02

## README

# karma-ng-i18n-preprocessor

> Preprocessor to use any valid i18n config from JADE file to [AngularJS](http://angularjs.org/) templates.

[![Build Status](https://api.travis-ci.org/lsdev14/karma-ng-i18n-preprocessor.svg?branch=master)](https://travis-ci.org/lsdev14/karma-ng-i18n-preprocessor)

## Installation

Installation is simple using the following:
```bash
npm install karma-ng-i18n-preprocessor --save-dev
```

## Configuration
```js
// karma.conf.js
module.exports = function(config) {
  config.set({
    
    files: [
            'content/shared/views/**/*.jade'
    ],
    
    preprocessors: {
            'content/shared/views/**/*.jade': 'ng-i18n'
    },
    
    ngi18nPreprocessor: {
            i18n : {
                "directory" : "./test/mocks/content"
            }
    }
  });
};
```

## Example
##### Locales file
```js
// en.json
{
    "lblTest": "Hello"
}
```

##### Before
```jade
span(id="lblTest") #{__("lblTest")}
```

##### After
```jade
span(id="lblTest") Hello
```

### You can use other preprocessors together with ng-stripScript

```bash
npm install karma-ng-jade2js-preprocessor --save-dev
npm install karma-ng-stripscript-preprocessor --save-dev
```

```js
// karma.conf.js
preprocessors: {
       'content/shared/views/**/*.jade': ['ng-i18n','ng-jade2js','ng-stripScript']
}
```

----

For more information on Karma see the [homepage].

[homepage]: http://karma-runner.github.com

---
_Source: https://npm.io/package/karma-ng-i18n-preprocessor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
