gulp-angular-gettext
Extract/compile translatable strings using angular-gettext
Install with npm
npm install --save-dev gulp-angular-gettext
var gulp = require('gulp');
var gettext = require('gulp-angular-gettext');
gulp.task('pot', function () {
return gulp.src(['src/partials/**/*.html', 'src/scripts/**/*.js'])
.pipe(gettext.extract())
.pipe(gulp.dest('po/'));
});
gulp.task('translations', function () {
return gulp.src('po/**/*.po')
.pipe(gettext.compile({
format: 'json'
}))
.pipe(gulp.dest('dist/translations/'));
});