View | Details | Raw Unified | Return to bug 35079
Collapse All | Expand All

(-)a/gulpfile.js (-4 / +11 lines)
Lines 19-25 const exec = require('gulp-exec'); Link Here
19
const merge = require('merge-stream');
19
const merge = require('merge-stream');
20
const through2 = require('through2');
20
const through2 = require('through2');
21
const Vinyl = require('vinyl');
21
const Vinyl = require('vinyl');
22
const args = require('minimist')(process.argv.slice(2));
22
const args = require('minimist')(process.argv.slice(2), { default: { 'generate-pot': 'always' } });
23
const rename = require('gulp-rename');
23
const rename = require('gulp-rename');
24
24
25
const STAFF_CSS_BASE = "koha-tmpl/intranet-tmpl/prog/css";
25
const STAFF_CSS_BASE = "koha-tmpl/intranet-tmpl/prog/css";
Lines 262-268 function po_create_type (type) { Link Here
262
262
263
    // Generate .pot only if it doesn't exist or --force-extract is given
263
    // Generate .pot only if it doesn't exist or --force-extract is given
264
    const extract = () => stream.finished(poTasks[type].extract());
264
    const extract = () => stream.finished(poTasks[type].extract());
265
    const p = args['force-extract'] ? extract() : access(pot).catch(extract);
265
    const p =
266
        args['generate-pot'] === 'always' ? extract() :
267
        args['generate-pot'] === 'auto' ? access(pot).catch(extract) :
268
        args['generate-pot'] === 'never' ? Promise.resolve(0) :
269
        Promise.reject(new Error('Invalid value for option --generate-pot: ' + args['generate-pot']))
266
270
267
    return p.then(function () {
271
    return p.then(function () {
268
        const languages = getLanguages();
272
        const languages = getLanguages();
Lines 299-305 function po_update_type (type) { Link Here
299
303
300
    // Generate .pot only if it doesn't exist or --force-extract is given
304
    // Generate .pot only if it doesn't exist or --force-extract is given
301
    const extract = () => stream.finished(poTasks[type].extract());
305
    const extract = () => stream.finished(poTasks[type].extract());
302
    const p = args['force-extract'] ? extract() : access(pot).catch(extract);
306
    const p =
307
        args['generate-pot'] === 'always' ? extract() :
308
        args['generate-pot'] === 'auto' ? access(pot).catch(extract) :
309
        args['generate-pot'] === 'never' ? Promise.resolve(0) :
310
        Promise.reject(new Error('Invalid value for option --generate-pot: ' + args['generate-pot']))
303
311
304
    return p.then(function () {
312
    return p.then(function () {
305
        const languages = getLanguages();
313
        const languages = getLanguages();
306
- 

Return to bug 35079