feat: add @intlify/unplugin-vue-i18n #2772

Merged
konrad merged 1 commits from dpschen/frontend:feature/add-unplugin-vue-i18n into main 2022-12-02 15:16:16 +00:00
8 changed files with 227 additions and 97 deletions

View File

@ -24,6 +24,7 @@
"@fortawesome/vue-fontawesome": "3.0.2",
"@github/hotkey": "2.0.1",
"@infectoone/vue-ganttastic": "2.1.3",
"@intlify/unplugin-vue-i18n": "0.8.0",
"@kyvg/vue3-notification": "2.7.0",
"@sentry/tracing": "7.22.0",
"@sentry/vue": "7.22.0",

View File

@ -11,6 +11,7 @@ specifiers:
'@fortawesome/vue-fontawesome': 3.0.2
'@github/hotkey': 2.0.1
'@infectoone/vue-ganttastic': 2.1.3
'@intlify/unplugin-vue-i18n': 0.8.0
'@kyvg/vue3-notification': 2.7.0
'@rushstack/eslint-patch': 1.2.0
'@sentry/tracing': 7.22.0
@ -96,6 +97,7 @@ dependencies:
'@fortawesome/vue-fontawesome': 3.0.2_bd5ipvhrqmkjz6wvo6sgrei224
'@github/hotkey': 2.0.1
'@infectoone/vue-ganttastic': 2.1.3_dayjs@1.11.6+vue@3.2.45
'@intlify/unplugin-vue-i18n': 0.8.0_vue-i18n@9.2.2
'@kyvg/vue3-notification': 2.7.0_vue@3.2.45
'@sentry/tracing': 7.22.0
'@sentry/vue': 7.22.0_vue@3.2.45
@ -178,7 +180,7 @@ devDependencies:
vitest: 0.25.3_7makii6cvtw7snp5sepz3pxfcq
vue-tsc: 1.0.10_typescript@4.9.3
wait-on: 6.0.1
workbox-cli: 6.5.4_acorn@8.8.0
workbox-cli: 6.5.4_acorn@7.4.1
packages:
@ -1767,6 +1769,26 @@ packages:
- '@vue/composition-api'
dev: false
/@intlify/bundle-utils/3.4.0_vue-i18n@9.2.2:
resolution: {integrity: sha512-2UQkqiSAOSPEHMGWlybqWm4G2K0X+FyYho5AwXz6QklSX1EY5EDmOSxZmwscn2qmKBnp6OYsme5kUrnN9xrWzQ==}
engines: {node: '>= 12'}
peerDependencies:
petite-vue-i18n: '*'
vue-i18n: '*'
peerDependenciesMeta:
petite-vue-i18n:
optional: true
vue-i18n:
optional: true
dependencies:
'@intlify/message-compiler': 9.3.0-beta.10
'@intlify/shared': 9.3.0-beta.10
jsonc-eslint-parser: 1.4.1
source-map: 0.6.1
vue-i18n: 9.2.2_vue@3.2.45
yaml-eslint-parser: 0.3.2
dev: false
/@intlify/core-base/9.2.2:
resolution: {integrity: sha512-JjUpQtNfn+joMbrXvpR4hTF8iJQ2sEFzzK3KIESOx+f+uwIjgw20igOyaIdhfsVVBCds8ZM64MoeNSx+PHQMkA==}
engines: {node: '>= 14'}
@ -1792,11 +1814,56 @@ packages:
source-map: 0.6.1
dev: false
/@intlify/message-compiler/9.3.0-beta.10:
resolution: {integrity: sha512-RoOC6yceOykLRhN0NlbkNOBUx1el6iphx3W8NfOx3jHVNtfT1FYokx14/5sU3F1F0uxeG4sp6q+ppKvaF8o+ww==}
engines: {node: '>= 14'}
dependencies:
'@intlify/shared': 9.3.0-beta.10
source-map: 0.6.1
dev: false
/@intlify/shared/9.2.2:
resolution: {integrity: sha512-wRwTpsslgZS5HNyM7uDQYZtxnbI12aGiBZURX3BTR9RFIKKRWpllTsgzHWvj3HKm3Y2Sh5LPC1r0PDCKEhVn9Q==}
engines: {node: '>= 14'}
dev: false
/@intlify/shared/9.3.0-beta.10:
resolution: {integrity: sha512-h93uAanbAt/XgjDHclrVB7xix6r7Uz11wx0iGNOCdHP7aA2LCJjUT3uNbekJjjbo+Fl5jzTSJZdm2SexzoqhRA==}
engines: {node: '>= 14'}
dev: false
/@intlify/unplugin-vue-i18n/0.8.0_vue-i18n@9.2.2:
resolution: {integrity: sha512-bqMDYrbmV0oMLGHTdYMUXfcEsy2rPwQnGrQAg4gvw5FimvJfTQt3RliLVayT5ldOfeT2g0IUc/0t7LPeGrFUag==}
engines: {node: '>= 14.16'}
peerDependencies:
petite-vue-i18n: '*'
vue-i18n: '*'
vue-i18n-bridge: '*'
peerDependenciesMeta:
petite-vue-i18n:
optional: true
vue-i18n:
optional: true
vue-i18n-bridge:
optional: true
dependencies:
'@intlify/bundle-utils': 3.4.0_vue-i18n@9.2.2
'@intlify/shared': 9.3.0-beta.10
'@rollup/pluginutils': 4.2.1
'@vue/compiler-sfc': 3.2.45
debug: 4.3.4
fast-glob: 3.2.11
js-yaml: 4.1.0
json5: 2.2.0
pathe: 1.0.0
picocolors: 1.0.0
source-map: 0.6.1
unplugin: 1.0.0
vue-i18n: 9.2.2_vue@3.2.45
transitivePeerDependencies:
- supports-color
dev: false
/@intlify/vue-devtools/9.2.2:
resolution: {integrity: sha512-+dUyqyCHWHb/UcvY1MlIpO87munedm3Gn6E9WWYdWrMuYLcoIoOEVDWSS8xSwtlPU+kA+MEQTP6Q1iI/ocusJg==}
engines: {node: '>= 14'}
@ -1898,20 +1965,20 @@ packages:
resolution: {integrity: sha512-4wMPu9iN3/HL97QblBsBay3E1etIciR84izI3U+4iALY+JHCrI+a2jO0qbAZ/nxKoegypYEaiiqWXylm+/zfrw==}
dev: true
/@netlify/build/28.4.2_@types+node@18.11.10:
resolution: {integrity: sha512-dGR1yxuo1UmxMKgBPQUW7xGwCRa884LKnVnwLVp7WhTxQwb8uhu+stKQ7+15Su/Pw+Eqgt9b6lSTID6w0KRAcw==}
/@netlify/build/28.4.5_@types+node@18.11.10:
resolution: {integrity: sha512-5ciyNoF0SH+1DlDLUzgtLqPJJXh6QW1bDkq8H0S44uOy1VxJpbvFat3asa0BspoB61CYpqzyzmpfIQKw+voySA==}
engines: {node: ^14.16.0 || >=16.0.0}
hasBin: true
dependencies:
'@bugsnag/js': 7.16.1
'@netlify/cache-utils': 5.0.2_supports-color@9.2.1
'@netlify/config': 20.0.2
'@netlify/edge-bundler': 4.4.2
'@netlify/functions-utils': 5.0.4_supports-color@9.2.1
'@netlify/edge-bundler': 5.0.0
'@netlify/functions-utils': 5.0.5_supports-color@9.2.1
'@netlify/git-utils': 5.0.2
'@netlify/plugins-list': 6.56.0
'@netlify/run-utils': 5.0.2
'@netlify/zip-it-and-ship-it': 7.1.2_supports-color@9.2.1
'@netlify/zip-it-and-ship-it': 7.1.3_supports-color@9.2.1
'@sindresorhus/slugify': 2.1.0
ansi-escapes: 5.0.0
chalk: 5.1.2
@ -2011,8 +2078,8 @@ packages:
yargs: 17.6.0
dev: true
/@netlify/edge-bundler/4.4.2:
resolution: {integrity: sha512-ixoK6wlfyjQKEZReSMWxEwAuZsIqmssHCSUqboZ0XQtWJCnXW/dFBOhbSBKM0dMMuUdx4EDOpDER12tKOv0Ujw==}
/@netlify/edge-bundler/4.4.3:
resolution: {integrity: sha512-wELFNmsnst3ujgQ2KNv1ex07G4GLS6JwJcZfXuwC5aV3FOZAQApAIH/A3MzHNxIfoW6EmLD/PE6sVMdSB1U6uQ==}
engines: {node: ^14.16.0 || >=16.0.0}
dependencies:
'@import-maps/resolve': 1.0.1
@ -2036,8 +2103,8 @@ packages:
uuid: 9.0.0
dev: true
/@netlify/edge-bundler/4.4.3:
resolution: {integrity: sha512-wELFNmsnst3ujgQ2KNv1ex07G4GLS6JwJcZfXuwC5aV3FOZAQApAIH/A3MzHNxIfoW6EmLD/PE6sVMdSB1U6uQ==}
/@netlify/edge-bundler/5.0.0:
resolution: {integrity: sha512-6kTOzuBhdYO5/puBU87hbl5b15DMCUHynVbJMRb2AAnxB0/ggWbQpOVogQSeLF7pOO+4r5TmRGS/U30xC2CA2A==}
engines: {node: ^14.16.0 || >=16.0.0}
dependencies:
'@import-maps/resolve': 1.0.1
@ -2287,11 +2354,11 @@ packages:
url: 0.11.0
dev: true
/@netlify/functions-utils/5.0.4_supports-color@9.2.1:
resolution: {integrity: sha512-FCxQIWGvB/PBLYfWDPUUoHEwbYpXcR7oBY0y7uXkbwCkMeb0iFq0ADFA140NwYLsFAZSa7PRL2U7HA6GPHsOGw==}
/@netlify/functions-utils/5.0.5_supports-color@9.2.1:
resolution: {integrity: sha512-C9do87XSqBE3wP463o4617hBoZqj+T48aND8gUpgrMLIZRI0Ip7lKSKO8Qyx15Lqhg2a3istkeL4ux14LX/6lg==}
engines: {node: ^14.16.0 || >=16.0.0}
dependencies:
'@netlify/zip-it-and-ship-it': 7.1.2_supports-color@9.2.1
'@netlify/zip-it-and-ship-it': 7.1.3_supports-color@9.2.1
cpy: 8.1.2_supports-color@9.2.1
path-exists: 5.0.0
transitivePeerDependencies:
@ -2451,8 +2518,8 @@ packages:
execa: 6.1.0
dev: true
/@netlify/zip-it-and-ship-it/7.1.2_supports-color@9.2.1:
resolution: {integrity: sha512-WGCt5KDk5Zr+A0fhPGEgAAW2aNiGyLcZohBq4nu/4BoFtHkk+8vCZOH1lMytZiIFu0eAq00j2q4kdzyLFV0Wuw==}
/@netlify/zip-it-and-ship-it/7.1.3_supports-color@9.2.1:
resolution: {integrity: sha512-7ToznythQL7b99ZxAiGyjagULNcZsSg2fByuUp3L35WrBASMmSrdq03zpYhRk3EIsuM65DjJayJ/amYu7Mjn3w==}
engines: {node: ^12.20.0 || ^14.14.0 || >=16.0.0}
hasBin: true
dependencies:
@ -2540,7 +2607,6 @@ packages:
dependencies:
'@nodelib/fs.stat': 2.0.5
run-parallel: 1.2.0
dev: true
/@nodelib/fs.stat/1.1.3:
resolution: {integrity: sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==}
@ -2550,7 +2616,6 @@ packages:
/@nodelib/fs.stat/2.0.5:
resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==}
engines: {node: '>= 8'}
dev: true
/@nodelib/fs.walk/1.2.8:
resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
@ -2558,7 +2623,6 @@ packages:
dependencies:
'@nodelib/fs.scandir': 2.1.5
fastq: 1.13.0
dev: true
/@octokit/auth-token/3.0.1:
resolution: {integrity: sha512-/USkK4cioY209wXRpund6HZzHo9GmjakpV9ycOkpMcMxMk7QVcVFVyCMtzvXYiHsB2crgDgrtNYSELYFBXhhaA==}
@ -2755,6 +2819,14 @@ packages:
rollup: 2.79.1
dev: true
/@rollup/pluginutils/4.2.1:
resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==}
engines: {node: '>= 8.0.0'}
dependencies:
estree-walker: 2.0.2
picomatch: 2.3.1
dev: false
/@rushstack/eslint-patch/1.2.0:
resolution: {integrity: sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg==}
dev: true
@ -3349,7 +3421,7 @@ packages:
hasBin: true
dependencies:
'@mapbox/node-pre-gyp': 1.0.8
acorn: 8.8.0
acorn: 8.8.1
async-sema: 3.1.1
bindings: 1.5.0
estree-walker: 2.0.2
@ -3369,7 +3441,7 @@ packages:
hasBin: true
dependencies:
'@mapbox/node-pre-gyp': 1.0.8_supports-color@9.2.1
acorn: 8.8.0
acorn: 8.8.1
async-sema: 3.1.1
bindings: 1.5.0
estree-walker: 2.0.2
@ -3396,7 +3468,7 @@ packages:
magic-string: 0.26.7
regenerator-runtime: 0.13.10
systemjs: 6.13.0
terser: 5.10.0_acorn@8.8.0
terser: 5.10.0_acorn@7.4.1
vite: 3.2.4_aued5kpd3bg45bp3kl7wlhj4ti
dev: true
@ -3661,6 +3733,14 @@ packages:
negotiator: 0.6.3
dev: true
/acorn-jsx/5.3.2_acorn@7.4.1:
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
peerDependencies:
acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
acorn: 7.4.1
dev: false
/acorn-jsx/5.3.2_acorn@8.8.0:
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
peerDependencies:
@ -3674,12 +3754,22 @@ packages:
engines: {node: '>=0.4.0'}
dev: true
/acorn/7.4.1:
resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==}
engines: {node: '>=0.4.0'}
hasBin: true
/acorn/8.8.0:
resolution: {integrity: sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==}
engines: {node: '>=0.4.0'}
hasBin: true
dev: true
/acorn/8.8.1:
resolution: {integrity: sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==}
engines: {node: '>=0.4.0'}
hasBin: true
/agent-base/6.0.2:
resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}
engines: {node: '>= 6.0.0'}
@ -3886,7 +3976,6 @@ packages:
dependencies:
normalize-path: 3.0.0
picomatch: 2.3.1
dev: true
/aproba/2.0.0:
resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==}
@ -3946,7 +4035,6 @@ packages:
/argparse/2.0.1:
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
dev: true
/arr-diff/4.0.0:
resolution: {integrity: sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==}
@ -4004,7 +4092,7 @@ packages:
dev: true
/ascii-table/0.0.9:
resolution: {integrity: sha512-xpkr6sCDIYTPqzvjG8M3ncw1YOTaloWZOyrUmicoEifBEKzQzt+ooUpRpQ/AbOoJfO/p2ZKiyp79qHThzJDulQ==}
resolution: {integrity: sha1-BqZgTWpV1L9BqaR9mHLXp42jHnM=}
dev: true
/asn1/0.2.6:
@ -4212,7 +4300,6 @@ packages:
/binary-extensions/2.2.0:
resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==}
engines: {node: '>=8'}
dev: true
/bindings/1.5.0:
resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==}
@ -4371,7 +4458,6 @@ packages:
engines: {node: '>=8'}
dependencies:
fill-range: 7.0.1
dev: true
/browserslist/4.21.4:
resolution: {integrity: sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==}
@ -4400,7 +4486,7 @@ packages:
dev: true
/buffer-equal-constant-time/1.0.1:
resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==}
resolution: {integrity: sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=}
dev: true
/buffer-fill/1.0.0:
@ -4678,7 +4764,6 @@ packages:
readdirp: 3.6.0
optionalDependencies:
fsevents: 2.3.2
dev: true
/chownr/2.0.0:
resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==}
@ -4976,7 +5061,7 @@ packages:
dev: true
/concat-map/0.0.1:
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=}
dev: true
/concat-stream/1.6.2:
@ -5421,7 +5506,6 @@ packages:
optional: true
dependencies:
ms: 2.1.2
dev: true
/debug/4.3.4_supports-color@8.1.1:
resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==}
@ -6344,6 +6428,13 @@ packages:
estraverse: 5.3.0
dev: true
/eslint-utils/2.1.0:
resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==}
engines: {node: '>=6'}
dependencies:
eslint-visitor-keys: 1.3.0
dev: false
/eslint-utils/3.0.0_eslint@8.28.0:
resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==}
engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0}
@ -6354,6 +6445,11 @@ packages:
eslint-visitor-keys: 2.1.0
dev: true
/eslint-visitor-keys/1.3.0:
resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==}
engines: {node: '>=4'}
dev: false
/eslint-visitor-keys/2.1.0:
resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==}
engines: {node: '>=10'}
@ -6412,6 +6508,15 @@ packages:
- supports-color
dev: true
/espree/6.2.1:
resolution: {integrity: sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==}
engines: {node: '>=6.0.0'}
dependencies:
acorn: 7.4.1
acorn-jsx: 5.3.2_acorn@7.4.1
eslint-visitor-keys: 1.3.0
dev: false
/espree/9.4.0:
resolution: {integrity: sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@ -6741,7 +6846,6 @@ packages:
glob-parent: 5.1.2
merge2: 1.4.1
micromatch: 4.0.4
dev: true
/fast-json-stable-stringify/2.1.0:
resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==}
@ -6759,7 +6863,6 @@ packages:
resolution: {integrity: sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==}
dependencies:
reusify: 1.0.4
dev: true
/fd-slicer/1.1.0:
resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==}
@ -6829,7 +6932,7 @@ packages:
dev: true
/file-size/0.0.5:
resolution: {integrity: sha512-ZW056dw8Ta1RWHVOQue3LMZe+mSOnHkcM7AN9is8JoHSIHRiLD5szwPAHM3fM7P5SGJ1bkAmCv3PvUTGoluDqA==}
resolution: {integrity: sha1-BX1Dw6Ptc12j+Q1gUqs4Dx5tXjs=}
dev: true
/file-type/11.1.0:
@ -6896,7 +6999,6 @@ packages:
engines: {node: '>=8'}
dependencies:
to-regex-range: 5.0.1
dev: true
/filter-obj/2.0.2:
resolution: {integrity: sha512-lO3ttPjHZRfjMcxWKb1j1eDhTFsu4meeR3lnMcnBFhk6RuLhvEiuALu2TlfL310ph4lCYYwgF/ElIjdP739tdg==}
@ -7138,7 +7240,6 @@ packages:
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
os: [darwin]
requiresBuild: true
dev: true
optional: true
/function-bind/1.1.1:
@ -7308,7 +7409,6 @@ packages:
engines: {node: '>= 6'}
dependencies:
is-glob: 4.0.3
dev: true
/glob-parent/6.0.2:
resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==}
@ -8022,7 +8122,6 @@ packages:
engines: {node: '>=8'}
dependencies:
binary-extensions: 2.2.0
dev: true
/is-boolean-object/1.1.2:
resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==}
@ -8128,7 +8227,6 @@ packages:
/is-extglob/2.1.1:
resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}
engines: {node: '>=0.10.0'}
dev: true
/is-fullwidth-code-point/1.0.0:
resolution: {integrity: sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==}
@ -8164,7 +8262,6 @@ packages:
engines: {node: '>=0.10.0'}
dependencies:
is-extglob: 2.1.1
dev: true
/is-installed-globally/0.3.2:
resolution: {integrity: sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==}
@ -8232,7 +8329,6 @@ packages:
/is-number/7.0.0:
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
engines: {node: '>=0.12.0'}
dev: true
/is-obj/1.0.1:
resolution: {integrity: sha512-l4RyHgRqGN4Y3+9JHVrNqO+tN0rV5My76uW5/nuO4K1b6vw5G8d/cmFjP9tRfEsdhZNt0IFdZuK/c2Vr4Nb+Qg==}
@ -8538,7 +8634,6 @@ packages:
hasBin: true
dependencies:
argparse: 2.0.1
dev: true
/jsbn/0.1.1:
resolution: {integrity: sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==}
@ -8593,7 +8688,17 @@ packages:
hasBin: true
dependencies:
minimist: 1.2.7
dev: true
/jsonc-eslint-parser/1.4.1:
resolution: {integrity: sha512-hXBrvsR1rdjmB2kQmUjf1rEIa+TqHBGMge8pwi++C+Si1ad7EjZrJcpgwym+QGK/pqTx+K7keFAtLlVNdLRJOg==}
engines: {node: '>=8.10.0'}
dependencies:
acorn: 7.4.1
eslint-utils: 2.1.0
eslint-visitor-keys: 1.3.0
espree: 6.2.1
semver: 6.3.0
dev: false
/jsonfile/6.1.0:
resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==}
@ -8950,7 +9055,6 @@ packages:
/lodash/4.17.21:
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
dev: true
/log-process-errors/8.0.0:
resolution: {integrity: sha512-+SNGqNC1gCMJfhwYzAHr/YgNT/ZJc+V2nCkvtPnjrENMeCe+B/jgShBW0lmWoh6uVV2edFAPc/IUOkDdsjTbTg==}
@ -9206,7 +9310,6 @@ packages:
/merge2/1.4.1:
resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==}
engines: {node: '>= 8'}
dev: true
/methods/1.1.2:
resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==}
@ -9269,7 +9372,6 @@ packages:
dependencies:
braces: 3.0.2
picomatch: 2.3.1
dev: true
/mime-db/1.51.0:
resolution: {integrity: sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==}
@ -9417,7 +9519,6 @@ packages:
/ms/2.1.2:
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
dev: true
/ms/2.1.3:
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
@ -9437,7 +9538,7 @@ packages:
dev: true
/mute-stream/0.0.7:
resolution: {integrity: sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==}
resolution: {integrity: sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=}
dev: true
/mute-stream/0.0.8:
@ -9510,7 +9611,7 @@ packages:
hasBin: true
requiresBuild: true
dependencies:
'@netlify/build': 28.4.2_@types+node@18.11.10
'@netlify/build': 28.4.5_@types+node@18.11.10
'@netlify/config': 20.0.2
'@netlify/edge-bundler': 4.4.3
'@netlify/framework-info': 9.5.2
@ -9808,7 +9909,6 @@ packages:
/normalize-path/3.0.0:
resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}
engines: {node: '>=0.10.0'}
dev: true
/normalize-range/0.1.2:
resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==}
@ -10379,6 +10479,10 @@ packages:
engines: {node: '>=12'}
dev: true
/pathe/1.0.0:
resolution: {integrity: sha512-nPdMG0Pd09HuSsr7QOKUXO2Jr9eqaDiZvDwdyIhNG5SHYujkQHYKDfGQkulBxvbDHz8oHLsTgKN86LSwYzSHAg==}
dev: false
/pathval/1.1.1:
resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==}
dev: true
@ -10397,7 +10501,6 @@ packages:
/picomatch/2.3.1:
resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
engines: {node: '>=8.6'}
dev: true
/pify/2.3.0:
resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==}
@ -11024,14 +11127,13 @@ packages:
dev: true
/querystring/0.2.0:
resolution: {integrity: sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==}
resolution: {integrity: sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=}
engines: {node: '>=0.4.x'}
deprecated: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
dev: true
/queue-microtask/1.2.3:
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
dev: true
/quick-lru/4.0.1:
resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==}
@ -11180,7 +11282,6 @@ packages:
engines: {node: '>=8.10.0'}
dependencies:
picomatch: 2.3.1
dev: true
/redent/3.0.0:
resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==}
@ -11416,7 +11517,6 @@ packages:
/reusify/1.0.4:
resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==}
engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
dev: true
/rfdc/1.3.0:
resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==}
@ -11429,7 +11529,7 @@ packages:
glob: 7.2.0
dev: true
/rollup-plugin-terser/7.0.2_acorn@8.8.0+rollup@2.79.1:
/rollup-plugin-terser/7.0.2_acorn@7.4.1+rollup@2.79.1:
resolution: {integrity: sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==}
peerDependencies:
rollup: ^2.0.0
@ -11438,7 +11538,7 @@ packages:
jest-worker: 26.6.2
rollup: 2.79.1
serialize-javascript: 4.0.0
terser: 5.10.0_acorn@8.8.0
terser: 5.10.0_acorn@7.4.1
transitivePeerDependencies:
- acorn
dev: true
@ -11490,7 +11590,6 @@ packages:
resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==}
dependencies:
queue-microtask: 1.2.3
dev: true
/rusha/0.8.14:
resolution: {integrity: sha512-cLgakCUf6PedEu15t8kbsjnwIFFR2D4RfL+W3iWFJ4iac7z4B0ZI8fxy4R3J956kAI68HclCFGL8MPoUVC3qVA==}
@ -11575,7 +11674,6 @@ packages:
/semver/6.3.0:
resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==}
hasBin: true
dev: true
/semver/7.0.0:
resolution: {integrity: sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==}
@ -12337,7 +12435,7 @@ packages:
supports-hyperlinks: 2.2.0
dev: true
/terser/5.10.0_acorn@8.8.0:
/terser/5.10.0_acorn@7.4.1:
resolution: {integrity: sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==}
engines: {node: '>=10'}
hasBin: true
@ -12347,7 +12445,7 @@ packages:
acorn:
optional: true
dependencies:
acorn: 8.8.0
acorn: 7.4.1
commander: 2.20.3
source-map: 0.7.4
source-map-support: 0.5.21
@ -12489,7 +12587,6 @@ packages:
engines: {node: '>=8.0'}
dependencies:
is-number: 7.0.0
dev: true
/to-regex/3.0.2:
resolution: {integrity: sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==}
@ -12568,7 +12665,7 @@ packages:
'@tsconfig/node14': 1.0.1
'@tsconfig/node16': 1.0.2
'@types/node': 18.11.10
acorn: 8.8.0
acorn: 8.8.1
acorn-walk: 8.2.0
arg: 4.1.3
create-require: 1.1.1
@ -12791,6 +12888,15 @@ packages:
engines: {node: '>= 0.8'}
dev: true
/unplugin/1.0.0:
resolution: {integrity: sha512-H5UnBUxfhTXBXGo2AwKsl0UaLSHzSNDZNehPQSgdhVfO/t+XAS1Yoj3vmLrrlBrS9ZwtH5tejbX/TCp5DcyCKg==}
dependencies:
acorn: 8.8.1
chokidar: 3.5.3
webpack-sources: 3.2.3
webpack-virtual-modules: 0.4.6
dev: false
/unset-value/1.0.0:
resolution: {integrity: sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==}
engines: {node: '>=0.10.0'}
@ -12962,7 +13068,7 @@ packages:
dev: true
/verror/1.10.0:
resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==}
resolution: {integrity: sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=}
engines: {'0': node >=0.6.0}
dependencies:
assert-plus: 1.0.0
@ -12983,7 +13089,7 @@ packages:
pretty-bytes: 6.0.0
rollup: 2.79.1
vite: 3.2.4_aued5kpd3bg45bp3kl7wlhj4ti
workbox-build: 6.5.4_acorn@8.8.0
workbox-build: 6.5.4_acorn@7.4.1
workbox-window: 6.5.4
transitivePeerDependencies:
- supports-color
@ -13027,7 +13133,7 @@ packages:
resolve: 1.22.1
rollup: 2.79.1
sass: 1.56.1
terser: 5.10.0_acorn@8.8.0
terser: 5.10.0_acorn@7.4.1
optionalDependencies:
fsevents: 2.3.2
dev: true
@ -13240,6 +13346,15 @@ packages:
engines: {node: '>=12'}
dev: true
/webpack-sources/3.2.3:
resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==}
engines: {node: '>=10.13.0'}
dev: false
/webpack-virtual-modules/0.4.6:
resolution: {integrity: sha512-5tyDlKLqPfMqjT3Q9TAqf2YqjwmnUleZwzJi1A5qXnlBCdj2AtOJ6wAWdglTIDOPgOiOrXeBeFcsQ8+aGQ6QbA==}
dev: false
/well-known-symbols/2.0.0:
resolution: {integrity: sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==}
engines: {node: '>=6'}
@ -13360,7 +13475,7 @@ packages:
workbox-core: 6.5.4
dev: true
/workbox-build/6.5.4_acorn@8.8.0:
/workbox-build/6.5.4_acorn@7.4.1:
resolution: {integrity: sha512-kgRevLXEYvUW9WS4XoziYqZ8Q9j/2ziJYEtTrjdz5/L/cTUa2XfyMP2i7c3p34lgqJ03+mTiz13SdFef2POwbA==}
engines: {node: '>=10.0.0'}
dependencies:
@ -13380,7 +13495,7 @@ packages:
lodash: 4.17.21
pretty-bytes: 5.6.0
rollup: 2.79.1
rollup-plugin-terser: 7.0.2_acorn@8.8.0+rollup@2.79.1
rollup-plugin-terser: 7.0.2_acorn@7.4.1+rollup@2.79.1
source-map: 0.8.0-beta.0
stringify-object: 3.3.0
strip-comments: 2.0.1
@ -13413,7 +13528,7 @@ packages:
workbox-core: 6.5.4
dev: true
/workbox-cli/6.5.4_acorn@8.8.0:
/workbox-cli/6.5.4_acorn@7.4.1:
resolution: {integrity: sha512-+Cc0jYh25MofhCROZqfQkpYSAGvykyrUVekuuPaLFbJ8qxX/zzX8hRRpglfwxDwokAjz8S20oEph4s+MyQc+Yw==}
engines: {node: '>=10.0.0'}
hasBin: true
@ -13430,7 +13545,7 @@ packages:
stringify-object: 3.3.0
upath: 1.2.0
update-notifier: 4.1.3
workbox-build: 6.5.4_acorn@8.8.0
workbox-build: 6.5.4_acorn@7.4.1
transitivePeerDependencies:
- '@types/babel__core'
- acorn
@ -13599,6 +13714,19 @@ packages:
resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==}
dev: true
/yaml-eslint-parser/0.3.2:
resolution: {integrity: sha512-32kYO6kJUuZzqte82t4M/gB6/+11WAuHiEnK7FreMo20xsCKPeFH5tDBU7iWxR7zeJpNnMXfJyXwne48D0hGrg==}
dependencies:
eslint-visitor-keys: 1.3.0
lodash: 4.17.21
yaml: 1.10.2
dev: false
/yaml/1.10.2:
resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==}
engines: {node: '>= 6'}
dev: false
/yargs-parser/18.1.3:
resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==}
engines: {node: '>=6'}

View File

@ -58,7 +58,7 @@ export function formatISO(date) {
* by creating a shared composable.
*/
export const useDateTimeFormatter = createSharedComposable((options?: MaybeRef<Intl.DateTimeFormatOptions>) => {
return computed(() => new Intl.DateTimeFormat(i18n.global.locale, unref(options)))
return computed(() => new Intl.DateTimeFormat(i18n.global.locale.value, unref(options)))
})
export function useWeekDayFromDate() {

View File

@ -22,31 +22,22 @@ export const DEFAULT_LANGUAGE: SupportedLocale= 'en'
export type ISOLanguage = string
// we load all messsages async
export const i18n = createI18n({
locale: DEFAULT_LANGUAGE, // set locale
fallbackLocale: DEFAULT_LANGUAGE,
legacy: true,
globalInjection: true,
allowComposition: true,
inheritLocale: true,
legacy: false,
messages: {
en: langEN,
} as Record<SupportedLocale, any>,
})
function setI18nLanguage(lang: SupportedLocale): SupportedLocale {
i18n.global.locale = lang
document.documentElement.lang = lang
return lang
}
export async function loadLanguageAsync(lang: SupportedLocale) {
export async function setLanguage(lang: SupportedLocale = getCurrentLanguage()): Promise<SupportedLocale | undefined> {
if (!lang) {
throw new Error()
}
// do not change language to the current one
if (i18n.global.locale === lang) {
if (i18n.global.locale.value === lang) {
return
}
@ -56,7 +47,9 @@ export async function loadLanguageAsync(lang: SupportedLocale) {
i18n.global.setLocaleMessage(lang, messages.default)
}
return setI18nLanguage(lang)
i18n.global.locale.value = lang
document.documentElement.lang = lang
return lang
}
export function getCurrentLanguage(): SupportedLocale {
@ -74,11 +67,7 @@ export function getCurrentLanguage(): SupportedLocale {
return language || DEFAULT_LANGUAGE
}
export function saveLanguage(lang: SupportedLocale) {
export async function saveLanguage(lang: SupportedLocale) {
localStorage.setItem('language', lang)
setLanguage()
}
export function setLanguage() {
return loadLanguageAsync(getCurrentLanguage())
await setLanguage()
}

View File

@ -1,6 +1,5 @@
import {computed, ref, watch} from 'vue'
import type dayjs from 'dayjs'
import type ILocale from 'dayjs/locale/*'
import {i18n, type SupportedLocale, type ISOLanguage} from '@/i18n'
@ -36,7 +35,7 @@ export function useDayjsLanguageSync(dayjsGlobal: typeof dayjs) {
const dayjsLanguageLoaded = ref(false)
watch(
() => i18n.global.locale,
() => i18n.global.locale.value,
async (currentLanguage: string) => {
if (!dayjsGlobal) {
return

View File

@ -15,7 +15,7 @@ import Notifications from '@kyvg/vue3-notification'
import './registerServiceWorker'
// i18n
import {i18n} from './i18n'
import {i18n, setLanguage} from './i18n'
declare global {
interface Window {
@ -106,4 +106,6 @@ app.use(pinia)
app.use(router)
app.use(i18n)
app.mount('#app')
setLanguage().then(() => {
app.mount('#app')
Review

So the current locale will be loaded before the app is even mounted?

So the current locale will be loaded before the app is even mounted?
Review

Yes. This might impct the loading speed a bit. But might improve the perceived speed at the same time. Also the user get's to see the language for the loading that he probably used the last time. I just realize that we should add a language selector on the login, reset etc screens.

Yes. This might impct the loading speed a bit. But might improve the perceived speed at the same time. Also the user get's to see the language for the loading that he probably used the last time. I just realize that we should add a language selector on the login, reset etc screens.
Review

My original goal was to also remove the default language until I realized that it's also used as a fallback. Because of that no matter what english has to be loaded, which is annoying. Would be better if we could be sure that all strings are in all languages so that even if we need to fallback, that fallback will already be part of the incompletely translated local language file.

My original goal was to also remove the default language until I realized that it's also used as a fallback. Because of that no matter what english has to be loaded, which is annoying. Would be better if we could be sure that all strings are in all languages so that even if we need to fallback, that fallback will already be part of the incompletely translated local language file.
Review

Would be better if we could be sure that all strings are in all languages so that even if we need to fallback, that fallback will already be part of the incompletely translated local language file.

Doesn't crowdin already does this? https://kolaente.dev/vikunja/frontend/src/branch/main/src/i18n/lang/nl-NL.json#L21

> Would be better if we could be sure that all strings are in all languages so that even if we need to fallback, that fallback will already be part of the incompletely translated local language file. Doesn't crowdin already does this? https://kolaente.dev/vikunja/frontend/src/branch/main/src/i18n/lang/nl-NL.json#L21
})

View File

@ -311,9 +311,11 @@ export const useAuthStore = defineStore('auth', () => {
const cancel = setModuleLoading(setIsLoadingGeneralSettings)
try {
saveLanguage(settings.language)
await userSettingsService.update(settings)
const updateSettingsPromise = userSettingsService.update(settings)
const saveLanguagePromise = saveLanguage(settings.language)
await updateSettingsPromise
setUserSettings({...settings})
await saveLanguagePromise
if (showMessage) {
success({message: i18n.global.t('user.settings.general.savedSuccess')})
}

View File

@ -2,13 +2,15 @@
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import legacyFn from '@vitejs/plugin-legacy'
import { URL, fileURLToPath } from "url";
import { dirname, resolve } from "path";
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
import {VitePWA} from 'vite-plugin-pwa'
import {visualizer} from 'rollup-plugin-visualizer'
import svgLoader from 'vite-svg-loader'
import postcssPresetEnv from "postcss-preset-env";
import { fileURLToPath, URL } from 'url'
const pathSrc = fileURLToPath(new URL('./src', import.meta.url))
@ -58,6 +60,13 @@ export default defineConfig({
// we don't need to optimize them again.
svgo: false,
}),
VueI18nPlugin({
// TODO: only install needed stuff
// Whether to install the full set of APIs, components, etc. provided by Vue I18n.
// By default, all of them will be installed.
fullInstall: true,
include: resolve(dirname(pathSrc), './src/i18n/lang/**'),
}),
VitePWA({
srcDir: 'src',
filename: 'sw.ts',