I'm using gulp and gettext, all works well except when I have multiple .po files.
gulp.task('translations', function () {
return gulp.src('app/po/*.po')
.pipe($.gettext.compile())
.pipe($.rename('translations.js'))
.pipe(gulp.dest(dest));
});
I have three .po files: lang1.po
, lang2.po
and lang3.po
, and I only get lang3.po
in translations.js
. I guess this task is overwriting things. Any suggestions how I can cat everything together into translations.js
?
What you are doing here is:
Get the idea?
You probably want to concat
instead (using gulp-concat).
gulp.task('translations', function () {
return gulp.src('app/po/*.po')
.pipe($.gettext.compile())
.pipe(concat('translations.js')))
.pipe(gulp.dest(dest));
});
Hope that helps.