Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zaach/jsxgettext-recursive

Recursively extract strings for localization.
https://github.com/zaach/jsxgettext-recursive

Last synced: about 1 month ago
JSON representation

Recursively extract strings for localization.

Awesome Lists containing this project

README

        

# jsxgettext-recursive

Recursively search and extract gettext strings.

## Install

npm install jsxgettext-recursive

## Example

```
var extract = require('jsxgettext-recursive');

var walker = extract({
'input-dir': './app/scripts',
outputDir: './locales',
output: 'client.pot',
exclude: /dist/,
joinExisting: false,
keyword: 't',
parsers: {
'.js': 'javascript',
'.mustache': 'handlebars'
}
});

walker.on('end', function() {
console.log('done!');
});
```

Possible parsers include: `javascript`, `handlebars`, `jade`, `ejs`, `jinja`.