MOBILE-4368 lang: Fix missing lang files on gulp lang override

main
Pau Ferrer Ocaña 2023-11-06 11:07:18 +01:00
parent dafce79355
commit 6a6189ec78
8 changed files with 11 additions and 11 deletions

View File

@ -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);
}