From bfc5ac943583c29790079adcd52e015c3e7b3286 Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Sat, 8 Aug 2015 22:47:26 -0500 Subject: [PATCH] Add task to check for missing files --- tasks/gulp-transifex-test.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tasks/gulp-transifex-test.js b/tasks/gulp-transifex-test.js index ef91ecf3c1..2094f06c10 100644 --- a/tasks/gulp-transifex-test.js +++ b/tasks/gulp-transifex-test.js @@ -15,6 +15,21 @@ const SLACK_CHANNEL = '#' + nconf.get('TRANSIFEX_SLACK:channel'); const SLACK_USERNAME = 'Transifex'; const SLACK_EMOJI = ':transifex:'; +gulp.task('transifex:missingFiles', () => { + let missingStrings = []; + let languages = getArrayOfLanguages(); + eachTranslationFile(languages, (error) => { + if(error) { + missingStrings.push(error.path); + } + }); + + if (!_.isEmpty(missingStrings)) { + let message = 'the following files were missing from the translations folder'; + post(message, missingStrings); + } +}); + gulp.task('transifex:missingStrings', () => { let missingStrings = [];