Skip to content

Instantly share code, notes, and snippets.

@stephane
Created May 14, 2014 14:20
Show Gist options
  • Save stephane/b4d618f7acb6a58a2e5d to your computer and use it in GitHub Desktop.
Save stephane/b4d618f7acb6a58a2e5d to your computer and use it in GitHub Desktop.
Grunt task to extract and compile PO files
/* global module */
module.exports = function(grunt) {
'use strict';
grunt.loadNpmTasks('grunt-angular-gettext');
grunt.initConfig({
nggettext_extract: {
ops: {
files: {
'locale/fr/LC_MESSAGES/angular.pot': [
'your/path/app/partials/*.html',
]
}
}
},
nggettext_compile: {
ops: {
files: {
'your/path/angular/fr.js': [
'locale/fr/LC_MESSAGES/angular.po'
]
}
}
}
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment