/gulp-angular-gettext

Gulp plugin for extracting/compiling angular-gettext strings. http://angular-gettext.rocketeer.be/

Primary LanguageJavaScriptMIT LicenseMIT

gulp-angular-gettext

Extract/compile translatable strings using angular-gettext

Install

Install with npm

npm install --save-dev gulp-angular-gettext

Examples

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/'));
});