<commit_before># grunt-angular-gettext

> Tasks for extracting/compiling angular-gettext strings.

Used in combination with [`angular-gettext`](https://github.com/rubenv/angular-gettext).

[![Build Status](https://travis-ci.org/rubenv/grunt-angular-gettext.png?branch=master)](https://travis-ci.org/rubenv/grunt-angular-gettext)

## Getting Started
This plugin requires Grunt `~0.4.1`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-angular-gettext --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-angular-gettext');
```

## The "nggettext_extract" task

Extracts translations from your Angular.JS templates and generates a gettext-compatible `.pot` file.

In your project's Gruntfile, add a section named `nggettext_extract` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
  nggettext_extract: {
    pot: {
      'po/myApp.pot': ['src/views/*.html', 'src/js/*.js']
    },
  },
})
```

## The "nggettext_compile" task

Compiles a `.po` file into a angular-gettext JavaScript definition.

In your project's Gruntfile, add a section named `nggettext_compile` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
  nggettext_compile: {
    all: {
      'src/js/translations.js': ['po/*.po']
    },
  },
})
```

Optionally, you can specify a `module` parameter, which defines the Angular.JS module for which the translations JavaScript is generated:

```js
grunt.initConfig({
  nggettext_compile: {
    all: {
      options: {
        module: 'myApp'
      },
      files: {
        'src/js/translations.js': ['po/*.po']
      }
    },
  },
})
```


## Contributing
All code lives in the `src` folder and is written in CoffeeScript. Try to stick to the style conventions used in existing code.

Tests can be run using `grunt test`. A convenience command to automatically run the tests is also available: `grunt watch`. Please add test cases when adding new functionality: this will prove that it works and ensure that it will keep working in the future.
    
## License 

    (The MIT License)

    Copyright (C) 2013 by <NAME> <<EMAIL>>

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell<commit_msg>Refer to the website for documentation.<commit_after># grunt-angular-gettext

> Tasks for extracting/compiling angular-gettext strings.

Used in combination with [`angular-gettext`](https://github.com/rubenv/angular-gettext).

[![Build Status](https://travis-ci.org/rubenv/grunt-angular-gettext.png?branch=master)](https://travis-ci.org/rubenv/grunt-angular-gettext)

Check the website for usage instructions: [http://angular-gettext.rocketeer.be/](http://angular-gettext.rocketeer.be/).

## License 

    (The MIT License)

    Copyright (C) 2013 by <NAME> <<EMAIL>>

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
{'fraction_non_alphanumeric': 0.11454448588172615, 'fraction_numerical': 0.002930207778369739, 'mean_word_length': 4.081190798376184, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2027061', 'n_tokens_mistral': 1142, 'n_tokens_neox': 1094, 'n_words': 393}