From 6a6189ec7892c0c4307f089965a8850bb021e0fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Mon, 6 Nov 2023 11:07:18 +0100 Subject: [PATCH] MOBILE-4368 lang: Fix missing lang files on gulp lang override --- gulp/task-override-lang.js | 8 ++++---- src/addons/mod/assign/feedback/comments/lang.json | 2 +- src/addons/mod/assign/feedback/editpdf/lang.json | 2 +- src/addons/mod/assign/feedback/file/lang.json | 2 +- src/addons/mod/assign/submission/comments/lang.json | 2 +- src/addons/mod/assign/submission/file/lang.json | 2 +- src/addons/mod/assign/submission/onlinetext/lang.json | 2 +- src/addons/mod/workshop/assessment/rubric/lang.json | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gulp/task-override-lang.js b/gulp/task-override-lang.js index cdb5e4aa3..0f8b2f1a4 100644 --- a/gulp/task-override-lang.js +++ b/gulp/task-override-lang.js @@ -52,7 +52,7 @@ class OverrideLangTask { plainid = exp.join('.'); } - const component_slashes = component.replace('_', '/'); + const component_slashes = component.replace(/_/g, '/'); switch (type) { case 'core': @@ -82,15 +82,15 @@ class OverrideLangTask { } const paths = Object.keys(files); - gulp.src(paths, { allowEmpty: true }) + gulp.src(paths) .pipe(slash()) - .pipe(through(function(destFile) { + .pipe(through(function (destFile) { const oldContents = self.readFile(destFile); destFile.contents = self.jsonFile(oldContents, files[destFile.path]); this.emit('data', destFile); })) - .pipe(gulp.dest((data) => data.base, { overwrite: true})) + .pipe(gulp.dest((data) => data.base, { overwrite: true })) .on('end', done); } diff --git a/src/addons/mod/assign/feedback/comments/lang.json b/src/addons/mod/assign/feedback/comments/lang.json index 637363859..12709aaff 100644 --- a/src/addons/mod/assign/feedback/comments/lang.json +++ b/src/addons/mod/assign/feedback/comments/lang.json @@ -1,3 +1,3 @@ { "pluginname": "Feedback comments" -} \ No newline at end of file +} diff --git a/src/addons/mod/assign/feedback/editpdf/lang.json b/src/addons/mod/assign/feedback/editpdf/lang.json index a98c70fd9..0503bcf0a 100644 --- a/src/addons/mod/assign/feedback/editpdf/lang.json +++ b/src/addons/mod/assign/feedback/editpdf/lang.json @@ -1,3 +1,3 @@ { "pluginname": "Annotate PDF" -} \ No newline at end of file +} diff --git a/src/addons/mod/assign/feedback/file/lang.json b/src/addons/mod/assign/feedback/file/lang.json index e5e6aeb98..6c06c98eb 100644 --- a/src/addons/mod/assign/feedback/file/lang.json +++ b/src/addons/mod/assign/feedback/file/lang.json @@ -1,3 +1,3 @@ { "pluginname": "File feedback" -} \ No newline at end of file +} diff --git a/src/addons/mod/assign/submission/comments/lang.json b/src/addons/mod/assign/submission/comments/lang.json index c69c732aa..e74f2cffb 100644 --- a/src/addons/mod/assign/submission/comments/lang.json +++ b/src/addons/mod/assign/submission/comments/lang.json @@ -1,3 +1,3 @@ { "pluginname": "Submission comments" -} \ No newline at end of file +} diff --git a/src/addons/mod/assign/submission/file/lang.json b/src/addons/mod/assign/submission/file/lang.json index 7262ba217..d0bfe2cb1 100644 --- a/src/addons/mod/assign/submission/file/lang.json +++ b/src/addons/mod/assign/submission/file/lang.json @@ -1,3 +1,3 @@ { "pluginname": "File submissions" -} \ No newline at end of file +} diff --git a/src/addons/mod/assign/submission/onlinetext/lang.json b/src/addons/mod/assign/submission/onlinetext/lang.json index e49362133..3714d1aa5 100644 --- a/src/addons/mod/assign/submission/onlinetext/lang.json +++ b/src/addons/mod/assign/submission/onlinetext/lang.json @@ -1,4 +1,4 @@ { "pluginname": "Online text submissions", "wordlimitexceeded": "The word limit for this assignment is {{$a.limit}} words and you are attempting to submit {{$a.count}} words. Please review your submission and try again." -} \ No newline at end of file +} diff --git a/src/addons/mod/workshop/assessment/rubric/lang.json b/src/addons/mod/workshop/assessment/rubric/lang.json index 8b0b20c4a..1f6e7167e 100644 --- a/src/addons/mod/workshop/assessment/rubric/lang.json +++ b/src/addons/mod/workshop/assessment/rubric/lang.json @@ -1,4 +1,4 @@ { "dimensionnumber": "Criterion {{$a}}", "mustchooseone": "You have to select one of these items" -} \ No newline at end of file +}