diff --git a/gulpfile.js b/gulpfile.js index af6a6980b..8b13a8a8b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -289,6 +289,7 @@ let localeFiles = [ */ function locales() { const mergeJson = require('gulp-merge-json'); + const gulpFile = require('gulp-file'); const yaml = require('gulp-yaml'); const merge = require('merge-stream'); const fs = require('fs-extra'); @@ -315,6 +316,15 @@ function locales() { } } + for (let mod in localePaths) { + for (let lang of langs) { + let file = `${buildDir}/locale/${mod}/${lang}.json`; + if (fs.existsSync(file)) continue; + streams.push(gulpFile('en.json', '{}', {src: true}) + .pipe(gulp.dest(`${buildDir}/locale/${mod}`))); + } + } + return merge(streams); } locales.description = `Generates client locale files`; diff --git a/modules/agency/front/locale/en.yml b/modules/agency/front/locale/en.yml deleted file mode 100644 index 0a3813413..000000000 --- a/modules/agency/front/locale/en.yml +++ /dev/null @@ -1 +0,0 @@ -Agencies: Agencies \ No newline at end of file diff --git a/modules/client/front/locale/en.yml b/modules/client/front/locale/en.yml deleted file mode 100644 index 3dec4a7ed..000000000 --- a/modules/client/front/locale/en.yml +++ /dev/null @@ -1,2 +0,0 @@ -Client: Client -Clients: Clients \ No newline at end of file diff --git a/modules/invoiceOut/front/locale/es.yml b/modules/invoiceOut/front/locale/es.yml new file mode 100644 index 000000000..8fd7e8ee6 --- /dev/null +++ b/modules/invoiceOut/front/locale/es.yml @@ -0,0 +1 @@ +Invoices: Facturas \ No newline at end of file diff --git a/modules/item/front/locale/en.yml b/modules/item/front/locale/en.yml deleted file mode 100644 index 03f1b1f7f..000000000 --- a/modules/item/front/locale/en.yml +++ /dev/null @@ -1 +0,0 @@ -Artículo: Items \ No newline at end of file diff --git a/modules/order/front/locale/en.yml b/modules/order/front/locale/en.yml deleted file mode 100644 index 180c09dd6..000000000 --- a/modules/order/front/locale/en.yml +++ /dev/null @@ -1 +0,0 @@ -Order: Order \ No newline at end of file diff --git a/modules/route/front/locale/es.yml b/modules/route/front/locale/es.yml new file mode 100644 index 000000000..5c60e1724 --- /dev/null +++ b/modules/route/front/locale/es.yml @@ -0,0 +1 @@ +Routes: Rutas \ No newline at end of file diff --git a/modules/ticket/front/locale/en.yml b/modules/ticket/front/locale/en.yml deleted file mode 100644 index 1f272d420..000000000 --- a/modules/ticket/front/locale/en.yml +++ /dev/null @@ -1 +0,0 @@ -Tickets: Tickets \ No newline at end of file diff --git a/modules/worker/front/locale/en.yml b/modules/worker/front/locale/en.yml deleted file mode 100644 index 0d0641a66..000000000 --- a/modules/worker/front/locale/en.yml +++ /dev/null @@ -1 +0,0 @@ -Workers: Workers \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index e774036c7..7c6549a1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5180,8 +5180,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -5202,14 +5201,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5224,20 +5221,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -5354,8 +5348,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -5367,7 +5360,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5382,7 +5374,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -5390,14 +5381,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -5416,7 +5405,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -5497,8 +5485,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -5510,7 +5497,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -5596,8 +5582,7 @@ "safe-buffer": { "version": "5.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -5633,7 +5618,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -5653,7 +5637,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -5697,14 +5680,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, @@ -6105,6 +6086,99 @@ "through2": "^2.0.0" } }, + "gulp-file": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/gulp-file/-/gulp-file-0.4.0.tgz", + "integrity": "sha1-RRNWoqxQicbbkaBEQlKgVDZXAGs=", + "dev": true, + "requires": { + "through2": "^0.4.1", + "vinyl": "^2.1.0" + }, + "dependencies": { + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", + "dev": true + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "replace-ext": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz", + "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=", + "dev": true + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + }, + "through2": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz", + "integrity": "sha1-2/WGYDEVHsg1K7bE22SiKSqEC5s=", + "dev": true, + "requires": { + "readable-stream": "~1.0.17", + "xtend": "~2.1.1" + } + }, + "vinyl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", + "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + }, + "xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", + "dev": true, + "requires": { + "object-keys": "~0.4.0" + } + } + } + }, "gulp-install": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/gulp-install/-/gulp-install-1.1.0.tgz", @@ -10674,8 +10748,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -10718,8 +10791,7 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", @@ -10730,8 +10802,7 @@ "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -10848,8 +10919,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -10861,7 +10931,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -10884,14 +10953,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -10910,7 +10977,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -10991,8 +11057,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -11004,7 +11069,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -11090,8 +11154,7 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -11127,7 +11190,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -11147,7 +11209,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -11191,14 +11252,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, diff --git a/package.json b/package.json index a6ca2f697..5a2ae2a94 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "gulp": "^4.0.0", "gulp-concat": "^2.6.1", "gulp-env": "^0.4.0", + "gulp-file": "^0.4.0", "gulp-install": "^1.1.0", "gulp-jasmine": "^3.0.0", "gulp-merge-json": "^1.3.1",