mirror of
https://github.com/openstf/stf
synced 2025-10-04 10:19:30 +02:00
Fixed gulp translate not being called in sequence.
This commit is contained in:
parent
e5d90dc30f
commit
4ece69bf5c
2 changed files with 56 additions and 24 deletions
|
@ -169,7 +169,7 @@ gulp.task("webpack:others", function (callback) {
|
|||
gulp.task('translate', ['jade', 'translate:extract', 'translate:compile'])
|
||||
|
||||
gulp.task('jade', function (cb) {
|
||||
gulp.src([
|
||||
return gulp.src([
|
||||
'./res/**/*.jade', '!./res/bower_components/**'
|
||||
])
|
||||
.pipe(jade({
|
||||
|
@ -182,26 +182,23 @@ gulp.task('jade', function (cb) {
|
|||
}
|
||||
}))
|
||||
.pipe(gulp.dest('./tmp/html/'))
|
||||
cb()
|
||||
})
|
||||
|
||||
gulp.task('translate:extract', ['jade'], function (cb) {
|
||||
gulp.src([
|
||||
return gulp.src([
|
||||
'./tmp/html/**/*.html', './res/**/*.js', '!./res/bower_components/**',
|
||||
'!./res/build/**'
|
||||
])
|
||||
.pipe(gettext.extract('stf.pot'))
|
||||
.pipe(gulp.dest('./res/common/lang/po/'))
|
||||
cb()
|
||||
})
|
||||
|
||||
gulp.task('translate:compile', ['translate:extract'], function (cb) {
|
||||
gulp.src('./res/common/lang/po/**/*.po')
|
||||
return gulp.src('./res/common/lang/po/**/*.po')
|
||||
.pipe(gettext.compile({
|
||||
format: 'json'
|
||||
}))
|
||||
.pipe(gulp.dest('./res/common/lang/translations/'))
|
||||
cb()
|
||||
})
|
||||
|
||||
gulp.task('clean', function (cb) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue