gulp: translations (gettext) only takes last .po file -
i'm using gulp , gettext, works except when 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 3 .po files: lang1.po
, lang2.po
, lang3.po
, , lang3.po
in translations.js
. guess task overwriting things. suggestions how can cat translations.js
?
what doing here is:
- step 1: compile lang1.po, compile lang2.po, compile lang3.po
- step 2: rename lang1.po translations.js, rename lang2.po translations.js, rename lang3.po translations.js
get idea?
you want 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 helps.
Comments
Post a Comment