Skip to content

Commit

Permalink
CPS-432: Add gulp task to generate translation file
Browse files Browse the repository at this point in the history
  • Loading branch information
deb1990 committed Jul 30, 2021
1 parent 1c32d38 commit f4b101f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions gulp-tasks/generate-translations.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* @file
* Exports Gulp task to generate translation files.
*/

'use strict';

var execSync = require('child_process').execSync;

module.exports = function (done) {
execSync('civistrings -o "l10n/civicase.pot" ./ang/ ./api/ ./Civi/ ./CRM/ ./settings/');

done();
};
3 changes: 3 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ var sassTask = require('./gulp-tasks/sass.js');
var sassSyncTask = require('./gulp-tasks/sass-sync.js');
var testTask = require('./gulp-tasks/karma-unit-test.js');
var watchTask = require('./gulp-tasks/watch.js');
var generateTranslationsTask = require('./gulp-tasks/generate-translations.js');

/**
* Updates and sync the scssRoot paths
Expand All @@ -44,3 +45,5 @@ gulp.task('watch', watchTask);
* Runs sass and test task
*/
gulp.task('default', gulp.series('sass', 'test'));

gulp.task('generate-translations', generateTranslationsTask);

0 comments on commit f4b101f

Please sign in to comment.