diff --git a/.env.example b/.env.example index 495de819..f327e25e 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,5 @@ -VUE_APP_I18N_LOCALE=en -VUE_APP_I18N_FALLBACK_LOCALE=en +VUE_APP_I18N_LOCALE=en-US +VUE_APP_I18N_FALLBACK_LOCALE=en-US VUE_APP_CACHE_MAX_AGE=3600 VUE_APP_VIEW_SIZE=10 VUE_APP_JOB_FREQUENCY_TYPE={"JOB_IMP_PROD_THRSHLD":"default","JOB_EXP_PROD_THRSHLD":"default"} diff --git a/package-lock.json b/package-lock.json index 989aab09..7dfdb6c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,6 @@ "qs": "^6.11.0", "register-service-worker": "^1.7.1", "vue": "^3.2.26", - "vue-i18n": "~9.1.6", "vue-logger-plugin": "^2.2.3", "vue-router": "^4.0.12", "vuex": "^4.0.1", @@ -36,7 +35,6 @@ }, "devDependencies": { "@capacitor/cli": "^2.4.7", - "@intlify/vue-i18n-loader": "^2.1.0", "@types/luxon": "^2.3.1", "@typescript-eslint/eslint-plugin": "~5.26.0", "@typescript-eslint/parser": "~5.26.0", @@ -53,8 +51,7 @@ "cypress": "^8.3.0", "eslint": "^7.32.0", "eslint-plugin-vue": "^8.0.3", - "typescript": "~4.7.4", - "vue-cli-plugin-i18n": "^1.0.1" + "typescript": "~4.7.4" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -2941,39 +2938,6 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, - "node_modules/@intlify/bundle-utils": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@intlify/bundle-utils/-/bundle-utils-0.1.0.tgz", - "integrity": "sha512-v0aeQmjNWppSLpPcLh3E1JiQg8bQFY9uD4ZuZssGq2elXsqB3JDH0TZfhO8Y83x1Ejk0qxq5hv015mYS2qzfZQ==", - "dev": true, - "dependencies": { - "@intlify/core": "^9.1.6", - "@intlify/message-compiler": "^9.1.6", - "@intlify/shared": "^9.1.6", - "jsonc-eslint-parser": "^1.0.1", - "source-map": "^0.6.1", - "yaml-eslint-parser": "^0.3.2" - }, - "engines": { - "node": ">= 12" - } - }, - "node_modules/@intlify/core": { - "version": "9.8.0", - "resolved": "https://registry.npmjs.org/@intlify/core/-/core-9.8.0.tgz", - "integrity": "sha512-xd+3cxvMuasZh3b+cxsB98ZAC2SPfbSTuK8q0nJg2NfOuAcj62FKBkFG72lsvGz5MzppTlOQuLkacrCvltA8sA==", - "dev": true, - "dependencies": { - "@intlify/core-base": "9.8.0", - "@intlify/shared": "9.8.0" - }, - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://github.com/sponsors/kazupon" - } - }, "node_modules/@intlify/core-base": { "version": "9.8.0", "resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.8.0.tgz", @@ -2989,25 +2953,6 @@ "url": "https://github.com/sponsors/kazupon" } }, - "node_modules/@intlify/devtools-if": { - "version": "9.1.10", - "resolved": "https://registry.npmjs.org/@intlify/devtools-if/-/devtools-if-9.1.10.tgz", - "integrity": "sha512-SHaKoYu6sog3+Q8js1y3oXLywuogbH1sKuc7NSYkN3GElvXSBaMoCzW+we0ZSFqj/6c7vTNLg9nQ6rxhKqYwnQ==", - "dependencies": { - "@intlify/shared": "9.1.10" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/@intlify/devtools-if/node_modules/@intlify/shared": { - "version": "9.1.10", - "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.1.10.tgz", - "integrity": "sha512-Om54xJeo1Vw+K1+wHYyXngE8cAbrxZHpWjYzMR9wCkqbhGtRV5VLhVc214Ze2YatPrWlS2WSMOWXR8JktX/IgA==", - "engines": { - "node": ">= 10" - } - }, "node_modules/@intlify/message-compiler": { "version": "9.8.0", "resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.8.0.tgz", @@ -3023,48 +2968,6 @@ "url": "https://github.com/sponsors/kazupon" } }, - "node_modules/@intlify/message-resolver": { - "version": "9.1.10", - "resolved": "https://registry.npmjs.org/@intlify/message-resolver/-/message-resolver-9.1.10.tgz", - "integrity": "sha512-5YixMG/M05m0cn9+gOzd4EZQTFRUu8RGhzxJbR1DWN21x/Z3bJ8QpDYj6hC4FwBj5uKsRfKpJQ3Xqg98KWoA+w==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/@intlify/runtime": { - "version": "9.1.10", - "resolved": "https://registry.npmjs.org/@intlify/runtime/-/runtime-9.1.10.tgz", - "integrity": "sha512-7QsuByNzpe3Gfmhwq6hzgXcMPpxz8Zxb/XFI6s9lQdPLPe5Lgw4U1ovRPZTOs6Y2hwitR3j/HD8BJNGWpJnOFA==", - "dependencies": { - "@intlify/message-compiler": "9.1.10", - "@intlify/message-resolver": "9.1.10", - "@intlify/shared": "9.1.10" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/@intlify/runtime/node_modules/@intlify/message-compiler": { - "version": "9.1.10", - "resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.1.10.tgz", - "integrity": "sha512-+JiJpXff/XTb0EadYwdxOyRTB0hXNd4n1HaJ/a4yuV960uRmPXaklJsedW0LNdcptd/hYUZtCkI7Lc9J5C1gxg==", - "dependencies": { - "@intlify/message-resolver": "9.1.10", - "@intlify/shared": "9.1.10", - "source-map": "0.6.1" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/@intlify/runtime/node_modules/@intlify/shared": { - "version": "9.1.10", - "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.1.10.tgz", - "integrity": "sha512-Om54xJeo1Vw+K1+wHYyXngE8cAbrxZHpWjYzMR9wCkqbhGtRV5VLhVc214Ze2YatPrWlS2WSMOWXR8JktX/IgA==", - "engines": { - "node": ">= 10" - } - }, "node_modules/@intlify/shared": { "version": "9.8.0", "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.8.0.tgz", @@ -3076,44 +2979,6 @@ "url": "https://github.com/sponsors/kazupon" } }, - "node_modules/@intlify/vue-devtools": { - "version": "9.1.10", - "resolved": "https://registry.npmjs.org/@intlify/vue-devtools/-/vue-devtools-9.1.10.tgz", - "integrity": "sha512-5l3qYARVbkWAkagLu1XbDUWRJSL8br1Dj60wgMaKB0+HswVsrR6LloYZTg7ozyvM621V6+zsmwzbQxbVQyrytQ==", - "dependencies": { - "@intlify/message-resolver": "9.1.10", - "@intlify/runtime": "9.1.10", - "@intlify/shared": "9.1.10" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/@intlify/vue-devtools/node_modules/@intlify/shared": { - "version": "9.1.10", - "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.1.10.tgz", - "integrity": "sha512-Om54xJeo1Vw+K1+wHYyXngE8cAbrxZHpWjYzMR9wCkqbhGtRV5VLhVc214Ze2YatPrWlS2WSMOWXR8JktX/IgA==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/@intlify/vue-i18n-loader": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@intlify/vue-i18n-loader/-/vue-i18n-loader-2.1.2.tgz", - "integrity": "sha512-xGqjq9unsm6WFqcM3n8hQHE2f6yKYc8cT14PqNEBmiuR0v3PP0VqZcvKXHs9JL2BRPA8JulNugpZwuF3rob2cQ==", - "dev": true, - "dependencies": { - "@intlify/bundle-utils": "^0.1.0", - "@intlify/shared": "^9.1.6", - "loader-utils": "^2.0.0" - }, - "engines": { - "node": ">= 12" - }, - "peerDependencies": { - "vue": "^3.0.0" - } - }, "node_modules/@ionic/core": { "version": "6.7.5", "resolved": "https://registry.npmjs.org/@ionic/core/-/core-6.7.5.tgz", @@ -6620,16 +6485,6 @@ "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", "dev": true }, - "node_modules/colors": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", - "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.1.90" - } - }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -7540,15 +7395,6 @@ } } }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -7850,25 +7696,6 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true }, - "node_modules/dot-object": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/dot-object/-/dot-object-1.9.0.tgz", - "integrity": "sha512-7MPN6y7XhAO4vM4eguj5+5HNKLjJYfkVG1ZR1Aput4Q4TR6SYeSjhpVQ77IzJHoSHffKbDxBC+48aCiiRurDPw==", - "dev": true, - "dependencies": { - "commander": "^2.20.0", - "glob": "^7.1.4" - }, - "bin": { - "dot-object": "bin/dot-object" - } - }, - "node_modules/dot-object/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, "node_modules/dotenv": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", @@ -8754,15 +8581,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/esm": { - "version": "3.2.25", - "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", - "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/espree": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", @@ -11057,15 +10875,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-valid-glob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", - "integrity": "sha512-AhiROmoEFDSsjx8hW+5sGwgKVIORcXnrlAx/R0ZSeaPw70Vw0CqkGBBhHGL58Uox2eXnU1AnvXJl1XlyedO5bA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", @@ -11455,81 +11264,6 @@ "node": ">=6" } }, - "node_modules/jsonc-eslint-parser": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsonc-eslint-parser/-/jsonc-eslint-parser-1.4.1.tgz", - "integrity": "sha512-hXBrvsR1rdjmB2kQmUjf1rEIa+TqHBGMge8pwi++C+Si1ad7EjZrJcpgwym+QGK/pqTx+K7keFAtLlVNdLRJOg==", - "dev": true, - "dependencies": { - "acorn": "^7.4.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^1.3.0", - "espree": "^6.0.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/jsonc-eslint-parser/node_modules/acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/jsonc-eslint-parser/node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/jsonc-eslint-parser/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/jsonc-eslint-parser/node_modules/espree": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", - "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", - "dev": true, - "dependencies": { - "acorn": "^7.1.1", - "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/jsonc-eslint-parser/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -14393,12 +14127,6 @@ "node": ">=0.10.0" } }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, "node_modules/requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -14859,12 +14587,6 @@ "node": ">= 0.8.0" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true - }, "node_modules/set-function-length": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", @@ -15057,6 +14779,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -16422,58 +16145,6 @@ } } }, - "node_modules/vue-cli-plugin-i18n": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/vue-cli-plugin-i18n/-/vue-cli-plugin-i18n-1.0.1.tgz", - "integrity": "sha512-sLo6YzudaWgn5dOMvrKixE5bb/onYGxcxm+0YexqoOx0QtR+7hZ/P5WPFBMM9v/2i1ec2YYe2PvKTBel7KE+tA==", - "dev": true, - "dependencies": { - "debug": "^4.1.0", - "deepmerge": "^4.2.0", - "dotenv": "^8.2.0", - "flat": "^5.0.0", - "rimraf": "^3.0.0", - "vue": "^2.6.11", - "vue-i18n": "^8.17.0", - "vue-i18n-extract": "1.0.2" - } - }, - "node_modules/vue-cli-plugin-i18n/node_modules/@vue/compiler-sfc": { - "version": "2.7.15", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.15.tgz", - "integrity": "sha512-FCvIEevPmgCgqFBH7wD+3B97y7u7oj/Wr69zADBf403Tui377bThTjBvekaZvlRr4IwUAu3M6hYZeULZFJbdYg==", - "dev": true, - "dependencies": { - "@babel/parser": "^7.18.4", - "postcss": "^8.4.14", - "source-map": "^0.6.1" - } - }, - "node_modules/vue-cli-plugin-i18n/node_modules/dotenv": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", - "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/vue-cli-plugin-i18n/node_modules/vue": { - "version": "2.7.15", - "resolved": "https://registry.npmjs.org/vue/-/vue-2.7.15.tgz", - "integrity": "sha512-a29fsXd2G0KMRqIFTpRgpSbWaNBK3lpCTOLuGLEDnlHWdjB8fwl6zyYZ8xCrqkJdatwZb4mGHiEfJjnw0Q6AwQ==", - "dev": true, - "dependencies": { - "@vue/compiler-sfc": "2.7.15", - "csstype": "^3.1.0" - } - }, - "node_modules/vue-cli-plugin-i18n/node_modules/vue-i18n": { - "version": "8.28.2", - "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.28.2.tgz", - "integrity": "sha512-C5GZjs1tYlAqjwymaaCPDjCyGo10ajUphiwA922jKt9n7KPpqR7oM1PCwYzhB/E7+nT3wfdG3oRre5raIT1rKA==", - "dev": true - }, "node_modules/vue-component-type-helpers": { "version": "1.8.25", "resolved": "https://registry.npmjs.org/vue-component-type-helpers/-/vue-component-type-helpers-1.8.25.tgz", @@ -16585,361 +16256,6 @@ "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==", "dev": true }, - "node_modules/vue-i18n": { - "version": "9.1.10", - "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.1.10.tgz", - "integrity": "sha512-jpr7gV5KPk4n+sSPdpZT8Qx3XzTcNDWffRlHV/cT2NUyEf+sEgTTmLvnBAibjOFJ0zsUyZlVTAWH5DDnYep+1g==", - "dependencies": { - "@intlify/core-base": "9.1.10", - "@intlify/shared": "9.1.10", - "@intlify/vue-devtools": "9.1.10", - "@vue/devtools-api": "^6.0.0-beta.7" - }, - "engines": { - "node": ">= 10" - }, - "peerDependencies": { - "vue": "^3.0.0" - } - }, - "node_modules/vue-i18n-extract": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/vue-i18n-extract/-/vue-i18n-extract-1.0.2.tgz", - "integrity": "sha512-+zwDKvle4KcfloXZnj5hF01ViKDiFr5RMx5507D7oyDXpSleRpekF5YHgZa/+Ra6Go68//z0Nya58J9tKFsCjw==", - "dev": true, - "dependencies": { - "cli-table3": "^0.5.1", - "dot-object": "^1.7.1", - "esm": "^3.2.13", - "glob": "^7.1.3", - "is-valid-glob": "^1.0.0", - "yargs": "^13.2.2" - }, - "bin": { - "vue-i18n-extract": "dist-node/index.bin.js" - } - }, - "node_modules/vue-i18n-extract/node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/vue-i18n-extract/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/vue-i18n-extract/node_modules/cli-table3": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", - "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", - "dev": true, - "dependencies": { - "object-assign": "^4.1.0", - "string-width": "^2.1.1" - }, - "engines": { - "node": ">=6" - }, - "optionalDependencies": { - "colors": "^1.1.2" - } - }, - "node_modules/vue-i18n-extract/node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, - "node_modules/vue-i18n-extract/node_modules/cliui/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/vue-i18n-extract/node_modules/cliui/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/vue-i18n-extract/node_modules/cliui/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/vue-i18n-extract/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "node_modules/vue-i18n-extract/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/vue-i18n-extract/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/vue-i18n-extract/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/vue-i18n-extract/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/vue-i18n-extract/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/vue-i18n-extract/node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/vue-i18n-extract/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/vue-i18n-extract/node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/vue-i18n-extract/node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/vue-i18n-extract/node_modules/wrap-ansi/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/vue-i18n-extract/node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/vue-i18n-extract/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "node_modules/vue-i18n-extract/node_modules/yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "dependencies": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "node_modules/vue-i18n-extract/node_modules/yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "node_modules/vue-i18n-extract/node_modules/yargs/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/vue-i18n-extract/node_modules/yargs/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/vue-i18n-extract/node_modules/yargs/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/vue-i18n/node_modules/@intlify/core-base": { - "version": "9.1.10", - "resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.1.10.tgz", - "integrity": "sha512-So9CNUavB/IsZ+zBmk2Cv6McQp6vc2wbGi1S0XQmJ8Vz+UFcNn9MFXAe9gY67PreIHrbLsLxDD0cwo1qsxM1Nw==", - "dependencies": { - "@intlify/devtools-if": "9.1.10", - "@intlify/message-compiler": "9.1.10", - "@intlify/message-resolver": "9.1.10", - "@intlify/runtime": "9.1.10", - "@intlify/shared": "9.1.10", - "@intlify/vue-devtools": "9.1.10" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/vue-i18n/node_modules/@intlify/message-compiler": { - "version": "9.1.10", - "resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.1.10.tgz", - "integrity": "sha512-+JiJpXff/XTb0EadYwdxOyRTB0hXNd4n1HaJ/a4yuV960uRmPXaklJsedW0LNdcptd/hYUZtCkI7Lc9J5C1gxg==", - "dependencies": { - "@intlify/message-resolver": "9.1.10", - "@intlify/shared": "9.1.10", - "source-map": "0.6.1" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/vue-i18n/node_modules/@intlify/shared": { - "version": "9.1.10", - "resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.1.10.tgz", - "integrity": "sha512-Om54xJeo1Vw+K1+wHYyXngE8cAbrxZHpWjYzMR9wCkqbhGtRV5VLhVc214Ze2YatPrWlS2WSMOWXR8JktX/IgA==", - "engines": { - "node": ">= 10" - } - }, "node_modules/vue-loader": { "version": "17.3.1", "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-17.3.1.tgz", @@ -17624,12 +16940,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", - "dev": true - }, "node_modules/which-typed-array": { "version": "1.1.13", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", @@ -18167,26 +17477,6 @@ "node": ">= 6" } }, - "node_modules/yaml-eslint-parser": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/yaml-eslint-parser/-/yaml-eslint-parser-0.3.2.tgz", - "integrity": "sha512-32kYO6kJUuZzqte82t4M/gB6/+11WAuHiEnK7FreMo20xsCKPeFH5tDBU7iWxR7zeJpNnMXfJyXwne48D0hGrg==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^1.3.0", - "lodash": "^4.17.20", - "yaml": "^1.10.0" - } - }, - "node_modules/yaml-eslint-parser/node_modules/eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", diff --git a/package.json b/package.json index 1cda8406..1763d31e 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,7 @@ "build": "vue-cli-service build", "test:unit": "vue-cli-service test:unit", "test:e2e": "vue-cli-service test:e2e", - "lint": "vue-cli-service lint", - "i18n:report": "vue-cli-service i18n:report --src \"./src/**/*.?(js|vue)\" --locales \"./src/locales/**/*.json\"" + "lint": "vue-cli-service lint" }, "dependencies": { "@capacitor/android": "^2.4.7", @@ -32,7 +31,6 @@ "qs": "^6.11.0", "register-service-worker": "^1.7.1", "vue": "^3.2.26", - "vue-i18n": "~9.1.6", "vue-logger-plugin": "^2.2.3", "vue-router": "^4.0.12", "vuex": "^4.0.1", @@ -40,7 +38,6 @@ }, "devDependencies": { "@capacitor/cli": "^2.4.7", - "@intlify/vue-i18n-loader": "^2.1.0", "@types/luxon": "^2.3.1", "@typescript-eslint/eslint-plugin": "~5.26.0", "@typescript-eslint/parser": "~5.26.0", @@ -57,7 +54,6 @@ "cypress": "^8.3.0", "eslint": "^7.32.0", "eslint-plugin-vue": "^8.0.3", - "typescript": "~4.7.4", - "vue-cli-plugin-i18n": "^1.0.1" + "typescript": "~4.7.4" } } diff --git a/src/App.vue b/src/App.vue index a7e43f2f..2d82e6d3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -16,6 +16,7 @@ import { mapGetters, useStore } from 'vuex'; import { Settings } from 'luxon' import Menu from '@/components/Menu.vue'; import { initialise, resetConfig } from '@/adapter' +import { translate } from '@hotwax/dxp-components'; export default defineComponent({ name: 'App', @@ -49,7 +50,7 @@ export default defineComponent({ if (!this.loader) { this.loader = await loadingController .create({ - message: options.message ? this.$t(options.message) : this.$t("Click the backdrop to dismiss."), + message: options.message ? translate(options.message) : translate("Click the backdrop to dismiss."), translucent: true, backdropDismiss: options.backdropDismiss }); @@ -88,7 +89,7 @@ export default defineComponent({ async mounted() { this.loader = await loadingController .create({ - message: this.$t("Click the backdrop to dismiss."), + message: translate("Click the backdrop to dismiss."), translucent: true, backdropDismiss: true }); diff --git a/src/components/JobConfiguration.vue b/src/components/JobConfiguration.vue index 3584b8e7..4933f625 100644 --- a/src/components/JobConfiguration.vue +++ b/src/components/JobConfiguration.vue @@ -2,25 +2,25 @@

{{ title }}

- {{ $t("running") }} {{ timeTillJob(runTime ? runTime : job.runTime) }} + {{ translate("running") }} {{ timeTillJob(runTime ? runTime : job.runTime) }}
- {{ $t("Last run") }} - {{ job?.lastUpdatedStamp ? getTime(job.lastUpdatedStamp) : $t('No previous occurrence') }} + {{ translate("Last run") }} + {{ job?.lastUpdatedStamp ? getTime(job.lastUpdatedStamp) : translate('No previous occurrence') }} - {{ $t("Run time") }} - {{ job?.runTime ? getTime(runTime ? runTime : job.runTime) : $t('Select run time') }} + {{ translate("Run time") }} + {{ job?.runTime ? getTime(runTime ? runTime : job.runTime) : translate('Select run time') }} - + - {{ $t("Schedule") }} - - {{ $t(freq.label) }} + {{ translate("Schedule") }} + + {{ translate(freq.label) }} - {{ $t("Name") }} + {{ translate("Name") }} - {{ $t("Edit threshold rule") }} + {{ translate("Edit threshold rule") }} - {{ productCount }} {{ $t("products selected")}} + {{ productCount }} {{ translate("products selected")}}
- {{ $t("Skip once") }} - {{ $t("Disable") }} + {{ translate("Skip once") }} + {{ translate("Disable") }}
- {{ $t("Save changes") }} + {{ translate("Save changes") }}
- {{ $t("Skip once") }} - {{ $t("Disable") }} - {{ $t("Save changes") }} + {{ translate("Skip once") }} + {{ translate("Disable") }} + {{ translate("Save changes") }}
@@ -117,7 +117,7 @@ import { mapGetters, useStore } from "vuex"; import { handleDateTimeInput, hasError, showToast } from "@/utils"; import { JobService } from "@/services/JobService"; import { DateTime } from 'luxon'; -import { translate } from "@/i18n"; +import { translate } from "@hotwax/dxp-components"; import logger from "@/logger"; import { Actions, hasPermission } from '@/authorization' @@ -198,13 +198,13 @@ export default defineComponent({ async skipJob(job: any) { const alert = await alertController .create({ - header: this.$t('Skip job'), - message: this.$t('Skipping will run this job at the next occurrence based on the temporal expression.'), + header: translate('Skip job'), + message: translate('Skipping will run this job at the next occurrence based on the temporal expression.'), buttons: [{ - text: this.$t("Don't skip"), + text: translate("Don't skip"), role: 'cancel' }, { - text: this.$t('Skip'), + text: translate('Skip'), handler: async () => { if (job) { // TODO: using updatedRunTime value to update the runTime in the configuration component as currently currentJob state is not maintained @@ -222,13 +222,13 @@ export default defineComponent({ async cancelJob(job: any) { const alert = await alertController .create({ - header: this.$t('Cancel job'), - message: this.$t('Canceling this job will cancel this occurrence and all following occurrences. This job will have to be re-enabled manually to run it again.'), + header: translate('Cancel job'), + message: translate('Canceling this job will cancel this occurrence and all following occurrences. This job will have to be re-enabled manually to run it again.'), buttons: [{ - text: this.$t("Don't cancel"), + text: translate("Don't cancel"), role: 'cancel' }, { - text: this.$t('Cancel'), + text: translate('Cancel'), handler: async () => { const resp = await this.store.dispatch('job/cancelJob', job); if(resp.status == 200 && !hasError(resp) && resp.data.successMessage) { @@ -242,13 +242,13 @@ export default defineComponent({ async saveChanges() { const alert = await alertController .create({ - header: this.$t('Save changes'), - message: this.$t('Are you sure you want to save these changes?'), + header: translate('Save changes'), + message: translate('Are you sure you want to save these changes?'), buttons: [{ - text: this.$t('Cancel'), + text: translate('Cancel'), role: 'cancel' }, { - text: this.$t('Save'), + text: translate('Save'), handler: () => { this.updateJob(); } @@ -259,9 +259,9 @@ export default defineComponent({ async discardChanges() { const alert = await alertController .create({ - header: this.$t('Discard changes'), - message: this.$t('All unsaved changes will be lost. Are you sure you want to leave this page.'), - buttons: [this.$t('Cancel'), this.$t('Save')], + header: translate('Discard changes'), + message: translate('All unsaved changes will be lost. Are you sure you want to leave this page.'), + buttons: [translate('Cancel'), translate('Save')], }); return alert.present(); }, @@ -334,7 +334,8 @@ export default defineComponent({ store, syncOutline, pencilOutline, - personCircleOutline + personCircleOutline, + translate }; } }); diff --git a/src/components/JobHistoryModal.vue b/src/components/JobHistoryModal.vue index 48dc5f66..650f7239 100644 --- a/src/components/JobHistoryModal.vue +++ b/src/components/JobHistoryModal.vue @@ -12,7 +12,7 @@
-

{{ $t("No jobs have run yet")}}

+

{{ translate("No jobs have run yet")}}

@@ -50,6 +50,7 @@ import { mapGetters, useStore } from 'vuex'; import { DateTime } from 'luxon'; import { JobService } from '@/services/JobService' import { hasError } from '@/utils'; +import { translate } from '@hotwax/dxp-components'; export default defineComponent({ name: 'JobHistoryModal', @@ -124,7 +125,8 @@ export default defineComponent({ return { closeOutline, - store + store, + translate }; }, }); diff --git a/src/components/JobReorderModal.vue b/src/components/JobReorderModal.vue index 7cb80517..a202cb43 100644 --- a/src/components/JobReorderModal.vue +++ b/src/components/JobReorderModal.vue @@ -6,7 +6,7 @@ - {{ $t('Export product threshold jobs') }} + {{ translate('Export product threshold jobs') }} @@ -54,7 +54,7 @@ import { DateTime } from 'luxon'; import { JobService } from '@/services/JobService'; import { hasError, showToast } from '@/utils'; import logger from '@/logger'; -import { translate } from '@/i18n'; +import { translate } from '@hotwax/dxp-components'; import { Actions, hasPermission } from '@/authorization' export default defineComponent({ @@ -178,7 +178,8 @@ export default defineComponent({ closeOutline, hasPermission, saveOutline, - store + store, + translate }; }, }); diff --git a/src/components/Menu.vue b/src/components/Menu.vue index 7390808d..77755100 100644 --- a/src/components/Menu.vue +++ b/src/components/Menu.vue @@ -2,7 +2,7 @@ - {{ $t("Menu") }} + {{ translate("Menu") }} @@ -67,6 +67,7 @@ import { useRouter } from "vue-router"; import { optionsOutline, settingsOutline, pulseOutline } from 'ionicons/icons'; import emitter from "@/event-bus"; + import { translate } from "@hotwax/dxp-components"; export default defineComponent({ name: "Menu", @@ -150,6 +151,7 @@ settingsOutline, selectedIndex, store, + translate }; }, }); diff --git a/src/components/ProductFilterModal.vue b/src/components/ProductFilterModal.vue index 0ccf08d5..69c2f76a 100644 --- a/src/components/ProductFilterModal.vue +++ b/src/components/ProductFilterModal.vue @@ -6,21 +6,21 @@ - {{ $t(`${ type === 'included' ? `Include ${label}` : `Exclude ${label}` }`) }} + {{ translate(`${ type === 'included' ? `Include ${label}` : `Exclude ${label}` }`) }} - {{ $t("Clear All") }} + {{ translate("Clear All") }} - + {{ option.label }} - {{ type === 'included' ? $t("excluded") : $t("included") }} + {{ type === 'included' ? translate("excluded") : translate("included") }} @@ -30,7 +30,7 @@ - + @@ -60,6 +60,7 @@ import { import { arrowBackOutline, checkmarkOutline } from 'ionicons/icons' import { ProductService } from "@/services/ProductService"; import { mapGetters, useStore } from "vuex"; +import { translate } from "@hotwax/dxp-components"; export default defineComponent({ name: "ProductFilterModal", @@ -193,7 +194,8 @@ export default defineComponent({ return { arrowBackOutline, checkmarkOutline, - store + store, + translate } } }) diff --git a/src/components/SafetyStockModal.vue b/src/components/SafetyStockModal.vue index 53d3d78f..8ad0d092 100644 --- a/src/components/SafetyStockModal.vue +++ b/src/components/SafetyStockModal.vue @@ -6,18 +6,18 @@ - {{ $t("Set safety stock") }} + {{ translate("Set safety stock") }} - {{ $t("Safety stock") }} + {{ translate("Safety stock") }} - {{ $t("Info") }} + {{ translate("Info") }} @@ -29,11 +29,11 @@ - {{ $t("You can also download the products, locations and safety stock you selected in a CSV to upload in other systems") }} + {{ translate("You can also download the products, locations and safety stock you selected in a CSV to upload in other systems") }} - {{ $t("Download data in csv") }} + {{ translate("Download data in csv") }} @@ -68,6 +68,7 @@ import { businessOutline, cloudUploadOutline } from 'ionicons/icons'; +import { translate } from '@hotwax/dxp-components'; export default defineComponent({ name: 'SatetyStockModal', @@ -98,6 +99,7 @@ export default defineComponent({ cloudUploadOutline, shirtOutline, businessOutline, + translate }; }, }); diff --git a/src/i18n.ts b/src/i18n.ts deleted file mode 100644 index 39d62622..00000000 --- a/src/i18n.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { createI18n, LocaleMessages, VueMessageType } from 'vue-i18n' - -/** - * Load locale messages - * - * The loaded `JSON` locale messages is pre-compiled by `@intlify/vue-i18n-loader`, which is integrated into `vue-cli-plugin-i18n`. - * See: https://github.com/intlify/vue-i18n-loader#rocket-i18n-resource-pre-compilation - */ -function loadLocaleMessages(): LocaleMessages { - const locales = require.context('./locales', true, /[A-Za-z0-9-_,\s]+\.json$/i) - const messages: LocaleMessages = {} - locales.keys().forEach(key => { - const matched = key.match(/([A-Za-z0-9-_]+)\./i) - if (matched && matched.length > 1) { - const locale = matched[1] - messages[locale] = locales(key) - } - }) - return messages -} - -const i18n = createI18n({ - locale: process.env.VUE_APP_I18N_LOCALE || 'en', - fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en', - messages: loadLocaleMessages() -}) - -// TODO Check if this is needed in updated versions -// Currently this method is added to be used in ts files -const translate = (key: string) => { - if (!key) { - return ''; - } - return i18n.global.t(key); -}; - -export { i18n as default, translate } \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index a1c97d4c..3dc130a6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -27,7 +27,6 @@ import '@ionic/vue/css/display.css'; /* Theme variables */ import './theme/variables.css'; -import i18n from './i18n' import store from './store' import permissionPlugin from '@/authorization'; import permissionRules from '@/authorization/Rules'; @@ -46,7 +45,6 @@ const app = createApp(App) level: process.env.VUE_APP_DEFAULT_LOG_LEVEL }) .use(router) - .use(i18n) .use(store) .use(permissionPlugin, { rules: permissionRules, diff --git a/src/router/index.ts b/src/router/index.ts index 6b8910cc..60fed641 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -11,7 +11,7 @@ import ScheduleThreshold from '@/views/ScheduleThreshold.vue' import { hasPermission } from '@/authorization'; import { showToast } from '@/utils' -import { translate } from '@/i18n' +import { translate } from '@hotwax/dxp-components' import 'vue-router' import { DxpLogin, useAuthStore } from '@hotwax/dxp-components'; diff --git a/src/store/modules/job/actions.ts b/src/store/modules/job/actions.ts index 7c6bce6a..fa76c462 100644 --- a/src/store/modules/job/actions.ts +++ b/src/store/modules/job/actions.ts @@ -4,7 +4,7 @@ import JobState from './JobState' import * as types from './mutation-types' import { getResponseError, hasError, showToast } from '@/utils' import { JobService } from '@/services/JobService' -import { translate } from '@/i18n' +import { translate } from '@hotwax/dxp-components' import { DateTime } from 'luxon'; import logger from "@/logger"; diff --git a/src/store/modules/product/actions.ts b/src/store/modules/product/actions.ts index daa11bdc..0ec37148 100644 --- a/src/store/modules/product/actions.ts +++ b/src/store/modules/product/actions.ts @@ -4,7 +4,7 @@ import RootState from '@/store/RootState' import ProductState from './ProductState' import * as types from './mutation-types' import { hasError, showToast, getFeature } from '@/utils' -import { translate } from '@/i18n' +import { translate } from '@hotwax/dxp-components' import logger from "@/logger"; const actions: ActionTree = { diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts index a12e9609..b032c82f 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -4,7 +4,7 @@ import RootState from '@/store/RootState' import UserState from './UserState' import * as types from './mutation-types' import { hasError, showToast } from '@/utils' -import { translate } from '@/i18n' +import { translate } from '@hotwax/dxp-components' import { Settings } from 'luxon'; import logger from "@/logger"; import { diff --git a/src/user-utils/index.ts b/src/user-utils/index.ts index 44c37aba..48096522 100644 --- a/src/user-utils/index.ts +++ b/src/user-utils/index.ts @@ -1,4 +1,4 @@ -import { translate } from '@/i18n' +import { translate } from '@hotwax/dxp-components' import store from '@/store' import { loadingController } from '@ionic/vue' diff --git a/src/views/ScheduleThreshold.vue b/src/views/ScheduleThreshold.vue index 9e0edc48..c11f62ef 100644 --- a/src/views/ScheduleThreshold.vue +++ b/src/views/ScheduleThreshold.vue @@ -3,7 +3,7 @@ - {{ $t("Schedule new threshold") }} + {{ translate("Schedule new threshold") }} @@ -11,24 +11,24 @@
-

{{ $t("Threshold pipeline") }}

+

{{ translate("Threshold pipeline") }}

@@ -91,7 +91,7 @@ - {{ $t("Schedule Job") }} + {{ translate("Schedule Job") }}
@@ -135,7 +135,7 @@ import { } from '@ionic/vue'; import { defineComponent } from 'vue'; import { getResponseError, handleDateTimeInput, hasError, showToast } from '@/utils'; -import { translate } from '@/i18n'; +import { translate } from '@hotwax/dxp-components'; import { JobService } from '@/services/JobService'; import { DateTime } from 'luxon'; import { mapGetters, useStore } from 'vuex'; @@ -664,7 +664,8 @@ export default defineComponent({ shirtOutline, store, timerOutline, - timeOutline + timeOutline, + translate } } }); diff --git a/src/views/SelectFacility.vue b/src/views/SelectFacility.vue index 664f83bd..3aba0f5a 100644 --- a/src/views/SelectFacility.vue +++ b/src/views/SelectFacility.vue @@ -3,7 +3,7 @@ - {{ $t("Select facility") }} + {{ translate("Select facility") }} @@ -11,7 +11,7 @@ - {{ $t("Upload CSV") }} + {{ translate("Upload CSV") }} @@ -19,20 +19,20 @@
@@ -124,8 +124,8 @@ {{ variant.productName }} -

{{ $t("Color") }}: {{ variant.color }}

-

{{ $t("Size") }}: {{ variant.size }}

+

{{ translate("Color") }}: {{ variant.color }}

+

{{ translate("Size") }}: {{ variant.size }}

@@ -134,7 +134,7 @@
- +
@@ -142,11 +142,11 @@
- {{ $t("Update threshold rule") }} + {{ translate("Update threshold rule") }} - {{ $t("Save threshold rule") }} + {{ translate("Save threshold rule") }}
@@ -199,7 +199,7 @@ import { useRouter } from 'vue-router'; import { mapGetters, useStore } from 'vuex'; import ProductFilterModal from '@/components/ProductFilterModal.vue'; import { hasError, showToast } from '@/utils'; -import { translate } from '@/i18n'; +import { translate } from '@hotwax/dxp-components'; import { ProductService } from '@/services/ProductService'; import { JobService } from '@/services/JobService'; import { DateTime } from 'luxon'; @@ -301,15 +301,15 @@ export default defineComponent({ async navigateBack(){ if(this.isFilterChanged || this.threshold != this.job?.runtimeData?.threshold){ const alert = await alertController.create({ - header: this.$t("Save changes"), - message: this.$t("Make sure you have saved your changes. All unsaved changes to this rule will be lost."), + header: translate("Save changes"), + message: translate("Make sure you have saved your changes. All unsaved changes to this rule will be lost."), buttons: [ { - text: this.$t("Keep editing"), + text: translate("Keep editing"), role: 'cancel', }, { - text: this.$t("Discard"), + text: translate("Discard"), handler: () => { this.isFilterChanged = false; this.store.dispatch('product/clearAllFilters'); @@ -444,10 +444,10 @@ export default defineComponent({ if (!this.threshold) { const alert = await alertController .create({ - header: this.$t('Enter threshold value'), - message: this.$t('Please enter a threshold value to set for these products before proceeding.'), + header: translate('Enter threshold value'), + message: translate('Please enter a threshold value to set for these products before proceeding.'), buttons: [{ - text: this.$t("Ok"), + text: translate("Ok"), role: 'cancel' }], }); @@ -546,7 +546,8 @@ export default defineComponent({ closeCircle, addCircleOutline, albumsOutline, - warningOutline + warningOutline, + translate }; }, }); diff --git a/src/views/SelectProductCSVUpload.vue b/src/views/SelectProductCSVUpload.vue index 3bd6ef40..8e9b9f57 100644 --- a/src/views/SelectProductCSVUpload.vue +++ b/src/views/SelectProductCSVUpload.vue @@ -3,37 +3,37 @@ - {{ $t("Upload CSV") }} + {{ translate("Upload CSV") }}
- {{ $t("Product list") }} - - {{ $t("Upload") }} + {{ translate("Product list") }} + + {{ translate("Upload") }} - {{ $t("Select the column index for the following information in the uploaded CSV") }} + {{ translate("Select the column index for the following information in the uploaded CSV") }} - {{ $t("Product SKU column") }} - + {{ translate("Product SKU column") }} + 1234 5678 9012 - {{ $t("Save") }} + {{ translate("Save") }} - 50 {{ $t("products selected") }} + 50 {{ translate("products selected") }} - {{ $t("Download") }} + {{ translate("Download") }}
@@ -59,6 +59,7 @@ import { } from '@ionic/vue'; import { defineComponent } from 'vue'; import { downloadOutline } from 'ionicons/icons'; +import { translate } from '@hotwax/dxp-components'; export default defineComponent({ name: 'SelectProductCSVUpload', @@ -80,6 +81,7 @@ export default defineComponent({ setup() { return { downloadOutline, + translate }; }, }); diff --git a/src/views/Settings.vue b/src/views/Settings.vue index 24eb5ba4..a7acd692 100644 --- a/src/views/Settings.vue +++ b/src/views/Settings.vue @@ -3,7 +3,7 @@ - {{ $t("Settings") }} + {{ translate("Settings") }} @@ -22,17 +22,17 @@ {{ userProfile?.partyName }} - {{ $t("Logout") }} + {{ translate("Logout") }} - {{ $t("Go to Launchpad") }} + {{ translate("Go to Launchpad") }} - +
-

{{ $t('OMS') }}

+

{{ translate('OMS') }}

@@ -40,17 +40,17 @@ - {{ $t("Product Store") }} + {{ translate("Product Store") }} - {{ $t("Store") }} + {{ translate("Store") }} - {{ $t('A store repesents a company or a unique catalog of products. If your OMS is connected to multiple eCommerce stores sellling different collections of products, you may have multiple Product Stores set up in HotWax Commerce.') }} + {{ translate('A store repesents a company or a unique catalog of products. If your OMS is connected to multiple eCommerce stores sellling different collections of products, you may have multiple Product Stores set up in HotWax Commerce.') }} - {{ $t("Select store") }} + {{ translate("Select store") }} {{ store.storeName }} @@ -65,15 +65,15 @@ - {{ $t('Timezone') }} + {{ translate('Timezone') }} - {{ $t('The timezone you select is used to ensure automations you schedule are always accurate to the time you select.') }} + {{ translate('The timezone you select is used to ensure automations you schedule are always accurate to the time you select.') }} {{ userProfile && userProfile.userTimeZone ? userProfile.userTimeZone : '-' }} - {{ $t("Change") }} + {{ translate("Change") }}
@@ -88,7 +88,8 @@ import { codeWorkingOutline, ellipsisVertical, globeOutline, openOutline, person import { mapGetters, useStore } from 'vuex'; import { useRouter } from 'vue-router'; import TimeZoneModal from '@/views/TimezoneModal.vue'; -import Image from '@/components/Image.vue' +import Image from '@/components/Image.vue'; +import { translate } from '@hotwax/dxp-components'; export default defineComponent({ name: 'Settings', @@ -169,7 +170,8 @@ export default defineComponent({ store, router, timeOutline, - openOutline + openOutline, + translate } } }); diff --git a/src/views/ThresholdUpdates.vue b/src/views/ThresholdUpdates.vue index c440a784..2dfd6f00 100644 --- a/src/views/ThresholdUpdates.vue +++ b/src/views/ThresholdUpdates.vue @@ -3,19 +3,19 @@ - {{ $t("Rule pipeline") }} + {{ translate("Rule pipeline") }} - {{ $t("Pending") }} + {{ translate("Pending") }} - {{ $t("Running") }} + {{ translate("Running") }} - {{ $t("History") }} + {{ translate("History") }} @@ -26,10 +26,10 @@
-

{{ $t("There are no jobs pending right now")}}

+

{{ translate("There are no jobs pending right now")}}

- {{ $t('retry') }} + {{ translate('retry') }}
@@ -51,7 +51,7 @@ - {{ job.runtimeData.threshold }} {{ $t('threshold') }} + {{ job.runtimeData.threshold }} {{ translate('threshold') }} @@ -76,8 +76,8 @@
- {{ $t("Skip") }} - {{ $t("Cancel") }} + {{ translate("Skip") }} + {{ translate("Cancel") }}
@@ -93,7 +93,7 @@ - +
@@ -101,10 +101,10 @@
-

{{ $t("There are no jobs running right now")}}

+

{{ translate("There are no jobs running right now")}}

- {{ $t('retry') }} + {{ translate('retry') }}
@@ -128,7 +128,7 @@ - {{ job.runtimeData.threshold }} {{ $t('threshold') }} + {{ job.runtimeData.threshold }} {{ translate('threshold') }} @@ -168,7 +168,7 @@ - +
@@ -176,10 +176,10 @@
-

{{ $t("No jobs have run yet")}}

+

{{ translate("No jobs have run yet")}}

- {{ $t('retry') }} + {{ translate('retry') }}
@@ -206,7 +206,7 @@ - {{ job.runtimeData.threshold }} {{ $t('threshold') }} + {{ job.runtimeData.threshold }} {{ translate('threshold') }} @@ -247,7 +247,7 @@ - +
@@ -311,6 +311,7 @@ import { ProductService } from '@/services/ProductService'; import { Actions, hasPermission } from '@/authorization' import JobReorderModal from '@/components/JobReorderModal.vue'; import emitter from '@/event-bus'; +import { translate } from '@hotwax/dxp-components'; export default defineComponent({ name: "ThresholdUpdates", @@ -403,7 +404,7 @@ export default defineComponent({ await Clipboard.write({ string: jobDetails }).then(() => { - showToast(this.$t("Copied job details to clipboard")); + showToast(translate("Copied job details to clipboard")); }) }, async viewJobHistory(job: any) { @@ -472,15 +473,15 @@ export default defineComponent({ async skipJob (job: any) { const alert = await alertController .create({ - header: this.$t('Skip job'), - message: this.$t('Skipping will run this job at the next occurrence based on the temporal expression.'), + header: translate('Skip job'), + message: translate('Skipping will run this job at the next occurrence based on the temporal expression.'), buttons: [ { - text: this.$t("Don't skip"), + text: translate("Don't skip"), role: 'cancel', }, { - text: this.$t('Skip'), + text: translate('Skip'), handler: async () => { await this.store.dispatch('job/skipJob', job); await this.store.dispatch('job/fetchPendingJobs', {viewIndex: 0, jobEnums: this.jobEnums}) @@ -508,15 +509,15 @@ export default defineComponent({ async cancelJob(job: any){ const alert = await alertController .create({ - header: this.$t('Cancel job'), - message: this.$t('Canceling this job will cancel this occurrence and all following occurrences. This job will have to be re-enabled manually to run it again.'), + header: translate('Cancel job'), + message: translate('Canceling this job will cancel this occurrence and all following occurrences. This job will have to be re-enabled manually to run it again.'), buttons: [ { - text: this.$t("DON'T CANCEL"), + text: translate("DON'T CANCEL"), role: 'cancel', }, { - text: this.$t("CANCEL"), + text: translate("CANCEL"), handler: async () => { const resp = await this.store.dispatch('job/cancelJob', job); if(resp.status == 200 && !hasError(resp) && resp.data.successMessage) { @@ -627,7 +628,8 @@ export default defineComponent({ optionsOutline, timeOutline, timerOutline, - segmentSelected + segmentSelected, + translate }; } }); diff --git a/src/views/TimezoneModal.vue b/src/views/TimezoneModal.vue index 0e8918a1..28dfa3a7 100644 --- a/src/views/TimezoneModal.vue +++ b/src/views/TimezoneModal.vue @@ -6,17 +6,17 @@ - {{ $t("Select time zone") }} + {{ translate("Select time zone") }} - +
-

{{ $t("No time zone found")}}

+

{{ translate("No time zone found")}}

@@ -64,6 +64,7 @@ import { useStore } from "@/store"; import { UserService } from "@/services/UserService"; import { hasError } from '@/utils' import { DateTime } from 'luxon'; +import { translate } from "@hotwax/dxp-components"; export default defineComponent({ name: "TimeZoneModal", @@ -97,16 +98,16 @@ export default defineComponent({ modalController.dismiss({ dismissed: true }); }, async saveAlert() { - const message = this.$t("Are you sure you want to change the time zone to?", { timeZoneId: this.timeZoneId }); + const message = translate("Are you sure you want to change the time zone to?", { timeZoneId: this.timeZoneId }); const alert = await alertController.create({ - header: this.$t("Update time zone"), + header: translate("Update time zone"), message, buttons: [ { - text: this.$t("Cancel"), + text: translate("Cancel"), }, { - text: this.$t("Confirm"), + text: translate("Confirm"), handler: () => { this.setUserTimeZone(); } @@ -160,7 +161,8 @@ export default defineComponent({ return { close, save, - store + store, + translate }; } }); diff --git a/vue.config.js b/vue.config.js index d6c807fd..7e26e710 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,18 +1,6 @@ const path = require('path') require("@hotwax/app-version-info") module.exports = { - pluginOptions: { - i18n: { - locale: 'en', - fallbackLocale: 'en', - localeDir: 'locales', - enableLegacy: true, - runtimeOnly: true, - compositionOnly: false, - fullInstall: true, - enableInSFC: true - } - }, configureWebpack: { resolve: { alias: {