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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -