diff --git a/frontend/.typesafe-i18n.json b/frontend/.typesafe-i18n.json new file mode 100644 index 0000000..12eb8a1 --- /dev/null +++ b/frontend/.typesafe-i18n.json @@ -0,0 +1,7 @@ +{ + "baseLocale": "cs", + "adapter": "svelte", + "esmImports": true, + "outputPath": "./src/translations", + "$schema": "https://unpkg.com/typesafe-i18n@5.20.0/schema/typesafe-i18n.json" +} \ No newline at end of file diff --git a/frontend/package.json b/frontend/package.json index 2c1e416..f10de62 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -10,7 +10,8 @@ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", "lint": "prettier --plugin-search-dir . --check . && eslint .", - "format": "prettier --plugin-search-dir . --write ." + "format": "prettier --plugin-search-dir . --write .", + "typesafe-i18n": "typesafe-i18n" }, "devDependencies": { "@playwright/test": "^1.29.2", @@ -46,6 +47,7 @@ "svelte-tippy": "^1.3.2", "swiper": "^8.4.6", "tippy.js": "^6.3.7", + "typesafe-i18n": "^5.20.0", "yup": "^0.32.11" } } diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index d76650e..774c62b 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -34,6 +34,9 @@ dependencies: tippy.js: specifier: ^6.3.7 version: 6.3.7 + typesafe-i18n: + specifier: ^5.20.0 + version: 5.20.0(typescript@4.9.4) yup: specifier: ^0.32.11 version: 0.32.11 @@ -2385,11 +2388,19 @@ packages: engines: {node: '>=10'} dev: true + /typesafe-i18n@5.20.0(typescript@4.9.4): + resolution: {integrity: sha512-uOvKnVkp1tXRDNBz9Aom54qs0LP2xWrtDliMPdKm9Scsnvn0DC7ZqjSGdOWxVplpbFbqYWNZuzx5Q5jWOjnBTA==} + hasBin: true + peerDependencies: + typescript: '>=3.5.1' + dependencies: + typescript: 4.9.4 + dev: false + /typescript@4.9.4: resolution: {integrity: sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==} engines: {node: '>=4.2.0'} hasBin: true - dev: true /unconfig@0.2.2: resolution: {integrity: sha512-JN1MeYJ/POnjBj7NgOJJxPp6+NcD6Nd0hEuK0D89kjm9GvQQUq8HeE2Eb7PZgtu+64mWkDiqeJn1IZoLH7htPg==} diff --git a/frontend/src/lib/components/checkbox/AccountLinkCheckBox.svelte b/frontend/src/lib/components/checkbox/AccountLinkCheckBox.svelte index 1276f57..55f1438 100644 --- a/frontend/src/lib/components/checkbox/AccountLinkCheckBox.svelte +++ b/frontend/src/lib/components/checkbox/AccountLinkCheckBox.svelte @@ -1,14 +1,23 @@ diff --git a/frontend/src/routes/(admin)/admin/auth/login/+page.svelte b/frontend/src/routes/(admin)/admin/auth/login/+page.svelte index d43982f..ce16af7 100644 --- a/frontend/src/routes/(admin)/admin/auth/login/+page.svelte +++ b/frontend/src/routes/(admin)/admin/auth/login/+page.svelte @@ -1,10 +1,11 @@ @@ -428,10 +432,9 @@
{#if pageIndex === 0}