Grunt tasks to automatically extract translations from your djangularjs project
Status
Stable
Getting Started
npm install grunt-djangularjs-translate
NOTE: This extraction tool is made to work with the djangularjs framework.
Example
The configuration below generates 2 translation files:
public/i18n/en.js
public/i18n/fr.js
file
// gruntfile.js module { grunt; grunt;}
// public/i18n/en.jsangular ;
// public/i18n/fr.jsangular ;
Options
src
List files containing the translations.
Type: Array
Default:
[
"public/*[!_]*/*.js",
"public/*[!_]*/*[!tests]*/*.js",
"public/*[!_]*/*[!tests]*/*.html
]
lang
Define used languages.
Type: Array
Default: ['en']
dest
Name of the translations folder.
Type: String
Default: 'i18n'
moduleName
Name of the angular module mainModule
.
Type: String
Default: 'core'
Test
You will find the tests files into test
directory.
To run test use grunt test
Credits
Inspired from grunt-angular-translate.
License
The MIT License (MIT)
Copyright (c) 2015-2016 Nicolas Panel