diff --git a/frontend/package.json b/frontend/package.json index c60cad95..ebd42535 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -44,7 +44,6 @@ "@unovis/ts": "1.5.0-beta.0", "cdigit": "^4.0.2", "iso-639-1": "3.1.3", - "svelte-dnd-action": "^0.9.52", - "svelte-i18n": "^4.0.1" + "svelte-dnd-action": "^0.9.52" } } diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index 30ed916f..b45e4676 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -23,9 +23,6 @@ importers: svelte-dnd-action: specifier: ^0.9.52 version: 0.9.52(svelte@5.1.16) - svelte-i18n: - specifier: ^4.0.1 - version: 4.0.1(svelte@5.1.16) devDependencies: '@hey-api/openapi-ts': specifier: 0.55.2 @@ -185,276 +182,138 @@ packages: '@emotion/weak-memoize@0.4.0': resolution: {integrity: sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==} - '@esbuild/aix-ppc64@0.19.12': - resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [aix] - '@esbuild/aix-ppc64@0.21.5': resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} engines: {node: '>=12'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.19.12': - resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - '@esbuild/android-arm64@0.21.5': resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} engines: {node: '>=12'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.19.12': - resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - '@esbuild/android-arm@0.21.5': resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} engines: {node: '>=12'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.19.12': - resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - '@esbuild/android-x64@0.21.5': resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} engines: {node: '>=12'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.19.12': - resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - '@esbuild/darwin-arm64@0.21.5': resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.19.12': - resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - '@esbuild/darwin-x64@0.21.5': resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} engines: {node: '>=12'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.19.12': - resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - '@esbuild/freebsd-arm64@0.21.5': resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.19.12': - resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - '@esbuild/freebsd-x64@0.21.5': resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.19.12': - resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - '@esbuild/linux-arm64@0.21.5': resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} engines: {node: '>=12'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.19.12': - resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - '@esbuild/linux-arm@0.21.5': resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} engines: {node: '>=12'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.19.12': - resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - '@esbuild/linux-ia32@0.21.5': resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} engines: {node: '>=12'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.19.12': - resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - '@esbuild/linux-loong64@0.21.5': resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.19.12': - resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - '@esbuild/linux-mips64el@0.21.5': resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.19.12': - resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - '@esbuild/linux-ppc64@0.21.5': resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.19.12': - resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - '@esbuild/linux-riscv64@0.21.5': resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.19.12': - resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - '@esbuild/linux-s390x@0.21.5': resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} engines: {node: '>=12'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.19.12': - resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - '@esbuild/linux-x64@0.21.5': resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} engines: {node: '>=12'} cpu: [x64] os: [linux] - '@esbuild/netbsd-x64@0.19.12': - resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - '@esbuild/netbsd-x64@0.21.5': resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-x64@0.19.12': - resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - '@esbuild/openbsd-x64@0.21.5': resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] - '@esbuild/sunos-x64@0.19.12': - resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - '@esbuild/sunos-x64@0.21.5': resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} engines: {node: '>=12'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.19.12': - resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - '@esbuild/win32-arm64@0.21.5': resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} engines: {node: '>=12'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.19.12': - resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - '@esbuild/win32-ia32@0.21.5': resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} engines: {node: '>=12'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.19.12': - resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - '@esbuild/win32-x64@0.21.5': resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} engines: {node: '>=12'} @@ -504,21 +363,6 @@ packages: '@floating-ui/utils@0.2.8': resolution: {integrity: sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==} - '@formatjs/ecma402-abstract@2.2.3': - resolution: {integrity: sha512-aElGmleuReGnk2wtYOzYFmNWYoiWWmf1pPPCYg0oiIQSJj0mjc4eUfzUXaSOJ4S8WzI/cLqnCTWjqz904FT2OQ==} - - '@formatjs/fast-memoize@2.2.3': - resolution: {integrity: sha512-3jeJ+HyOfu8osl3GNSL4vVHUuWFXR03Iz9jjgI7RwjG6ysu/Ymdr0JRCPHfF5yGbTE6JCrd63EpvX1/WybYRbA==} - - '@formatjs/icu-messageformat-parser@2.9.3': - resolution: {integrity: sha512-9L99QsH14XjOCIp4TmbT8wxuffJxGK8uLNO1zNhLtcZaVXvv626N0s4A2qgRCKG3dfYWx9psvGlFmvyVBa6u/w==} - - '@formatjs/icu-skeleton-parser@1.8.7': - resolution: {integrity: sha512-fI+6SmS2g7h3srfAKSWa5dwreU5zNEfon2uFo99OToiLF6yxGE+WikvFSbsvMAYkscucvVmTYNlWlaDPp0n5HA==} - - '@formatjs/intl-localematcher@0.5.7': - resolution: {integrity: sha512-GGFtfHGQVFe/niOZp24Kal5b2i36eE2bNL0xi9Sg/yd0TR8aLjcteApZdHmismP5QQax1cMnZM9yWySUUjJteA==} - '@hey-api/client-fetch@0.4.3': resolution: {integrity: sha512-Y0McgfJED/Iq6Tr8LgewFL+qrOpb87rUBUJkc6mLzxqTkqF52KcexYZPlKyjee0Qb/oUJOupFRpvUEWjH/339w==} @@ -1231,10 +1075,6 @@ packages: citty@0.1.6: resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==} - cli-color@2.0.4: - resolution: {integrity: sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==} - engines: {node: '>=0.10'} - color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} @@ -1455,10 +1295,6 @@ packages: resolution: {integrity: sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==} engines: {node: '>=12'} - d@1.0.2: - resolution: {integrity: sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==} - engines: {node: '>=0.12'} - data-urls@5.0.0: resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} engines: {node: '>=18'} @@ -1544,25 +1380,6 @@ packages: error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - es5-ext@0.10.64: - resolution: {integrity: sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==} - engines: {node: '>=0.10'} - - es6-iterator@2.0.3: - resolution: {integrity: sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==} - - es6-symbol@3.1.4: - resolution: {integrity: sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==} - engines: {node: '>=0.12'} - - es6-weak-map@2.0.3: - resolution: {integrity: sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==} - - esbuild@0.19.12: - resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} - engines: {node: '>=12'} - hasBin: true - esbuild@0.21.5: resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} engines: {node: '>=12'} @@ -1601,10 +1418,6 @@ packages: esm-env@1.1.4: resolution: {integrity: sha512-oO82nKPHKkzIj/hbtuDYy/JHqBHFlMIW36SDiPCVsj87ntDLcWN+sJ1erdVryd4NxODacFTsdrIE3b7IamqbOg==} - esniff@2.0.1: - resolution: {integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==} - engines: {node: '>=0.10'} - espree@10.3.0: resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1634,9 +1447,6 @@ packages: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} - event-emitter@0.3.5: - resolution: {integrity: sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==} - execa@8.0.1: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} @@ -1645,9 +1455,6 @@ packages: resolution: {integrity: sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==} engines: {node: '>=12.0.0'} - ext@1.7.0: - resolution: {integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==} - fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -1865,9 +1672,6 @@ packages: resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} engines: {node: '>=12'} - intl-messageformat@10.7.6: - resolution: {integrity: sha512-IsMU/hqyy3FJwNJ0hxDfY2heJ7MteSuFvcnCebxRp67di4Fhx1gKKE+qS0bBwUF8yXkX9SsPUhLeX/B6h5SKUA==} - is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} @@ -1901,9 +1705,6 @@ packages: is-potential-custom-element-name@1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} - is-promise@2.2.2: - resolution: {integrity: sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==} - is-reference@3.0.3: resolution: {integrity: sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==} @@ -2035,9 +1836,6 @@ packages: lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} - lru-queue@0.1.0: - resolution: {integrity: sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==} - lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true @@ -2055,10 +1853,6 @@ packages: maplibre-gl@2.4.0: resolution: {integrity: sha512-csNFylzntPmHWidczfgCZpvbTSmhaWvLRj9e1ezUDBEPizGgshgm3ea1T5TCNEEBq0roauu7BPuRZjA3wO4KqA==} - memoizee@0.4.17: - resolution: {integrity: sha512-DGqD7Hjpi/1or4F/aYAspXKNm5Yili0QDAFAY4QYvpqpgiY6+1jOfqpmByzjxbWd/T9mChbCArXAbDAsTm5oXA==} - engines: {node: '>=0.12'} - merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -2148,9 +1942,6 @@ packages: neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} - next-tick@1.1.0: - resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} - node-fetch-native@1.6.4: resolution: {integrity: sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==} @@ -2526,13 +2317,6 @@ packages: peerDependencies: svelte: '>=3.23.0 || ^5.0.0-next.0' - svelte-i18n@4.0.1: - resolution: {integrity: sha512-jaykGlGT5PUaaq04JWbJREvivlCnALtT+m87Kbm0fxyYHynkQaxQMnIKHLm2WeIuBRoljzwgyvz0Z6/CMwfdmQ==} - engines: {node: '>= 16'} - hasBin: true - peerDependencies: - svelte: ^3 || ^4 || ^5 - svelte@5.1.16: resolution: {integrity: sha512-QcY+om9r8+uTcSfeFuv8++ExdfwVCKeT+Y7GPSZ6rQPczvy62BMtvMoi0rScabgv+upGE5jxKjd7M4u23+AjGA==} engines: {node: '>=18'} @@ -2604,10 +2388,6 @@ packages: resolution: {integrity: sha512-B71/4oyj61iNH0KeCamLuE2rmKuTO5byTOSVwECM5FA7TiAiAW+UqTKZ9ERueC4qvgSttUhdmq1mXC3kJqGX7A==} engines: {node: '>=12.22'} - timers-ext@0.1.8: - resolution: {integrity: sha512-wFH7+SEAcKfJpfLPkrgMPvvwnEtj8W4IurvEyrKsDleXnKLCDw71w8jltvfLa8Rm4qQxxT4jmDBYbJG/z7qoww==} - engines: {node: '>=0.12'} - tiny-glob@0.2.9: resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==} @@ -2678,9 +2458,6 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} - type@2.7.3: - resolution: {integrity: sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==} - typescript-eslint@8.14.0: resolution: {integrity: sha512-K8fBJHxVL3kxMmwByvz8hNdBJ8a0YqKzKDX6jRlrjMuNXyd5T2V02HIq37+OiWXvUUOXgOOGiSSOh26Mh8pC3w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -3004,141 +2781,72 @@ snapshots: '@emotion/weak-memoize@0.4.0': {} - '@esbuild/aix-ppc64@0.19.12': - optional: true - '@esbuild/aix-ppc64@0.21.5': optional: true - '@esbuild/android-arm64@0.19.12': - optional: true - '@esbuild/android-arm64@0.21.5': optional: true - '@esbuild/android-arm@0.19.12': - optional: true - '@esbuild/android-arm@0.21.5': optional: true - '@esbuild/android-x64@0.19.12': - optional: true - '@esbuild/android-x64@0.21.5': optional: true - '@esbuild/darwin-arm64@0.19.12': - optional: true - '@esbuild/darwin-arm64@0.21.5': optional: true - '@esbuild/darwin-x64@0.19.12': - optional: true - '@esbuild/darwin-x64@0.21.5': optional: true - '@esbuild/freebsd-arm64@0.19.12': - optional: true - '@esbuild/freebsd-arm64@0.21.5': optional: true - '@esbuild/freebsd-x64@0.19.12': - optional: true - '@esbuild/freebsd-x64@0.21.5': optional: true - '@esbuild/linux-arm64@0.19.12': - optional: true - '@esbuild/linux-arm64@0.21.5': optional: true - '@esbuild/linux-arm@0.19.12': - optional: true - '@esbuild/linux-arm@0.21.5': optional: true - '@esbuild/linux-ia32@0.19.12': - optional: true - '@esbuild/linux-ia32@0.21.5': optional: true - '@esbuild/linux-loong64@0.19.12': - optional: true - '@esbuild/linux-loong64@0.21.5': optional: true - '@esbuild/linux-mips64el@0.19.12': - optional: true - '@esbuild/linux-mips64el@0.21.5': optional: true - '@esbuild/linux-ppc64@0.19.12': - optional: true - '@esbuild/linux-ppc64@0.21.5': optional: true - '@esbuild/linux-riscv64@0.19.12': - optional: true - '@esbuild/linux-riscv64@0.21.5': optional: true - '@esbuild/linux-s390x@0.19.12': - optional: true - '@esbuild/linux-s390x@0.21.5': optional: true - '@esbuild/linux-x64@0.19.12': - optional: true - '@esbuild/linux-x64@0.21.5': optional: true - '@esbuild/netbsd-x64@0.19.12': - optional: true - '@esbuild/netbsd-x64@0.21.5': optional: true - '@esbuild/openbsd-x64@0.19.12': - optional: true - '@esbuild/openbsd-x64@0.21.5': optional: true - '@esbuild/sunos-x64@0.19.12': - optional: true - '@esbuild/sunos-x64@0.21.5': optional: true - '@esbuild/win32-arm64@0.19.12': - optional: true - '@esbuild/win32-arm64@0.21.5': optional: true - '@esbuild/win32-ia32@0.19.12': - optional: true - '@esbuild/win32-ia32@0.21.5': optional: true - '@esbuild/win32-x64@0.19.12': - optional: true - '@esbuild/win32-x64@0.21.5': optional: true @@ -3192,31 +2900,6 @@ snapshots: '@floating-ui/utils@0.2.8': {} - '@formatjs/ecma402-abstract@2.2.3': - dependencies: - '@formatjs/fast-memoize': 2.2.3 - '@formatjs/intl-localematcher': 0.5.7 - tslib: 2.8.1 - - '@formatjs/fast-memoize@2.2.3': - dependencies: - tslib: 2.8.1 - - '@formatjs/icu-messageformat-parser@2.9.3': - dependencies: - '@formatjs/ecma402-abstract': 2.2.3 - '@formatjs/icu-skeleton-parser': 1.8.7 - tslib: 2.8.1 - - '@formatjs/icu-skeleton-parser@1.8.7': - dependencies: - '@formatjs/ecma402-abstract': 2.2.3 - tslib: 2.8.1 - - '@formatjs/intl-localematcher@0.5.7': - dependencies: - tslib: 2.8.1 - '@hey-api/client-fetch@0.4.3': {} '@hey-api/openapi-ts@0.55.2(magicast@0.3.5)(typescript@5.6.3)': @@ -4023,14 +3706,6 @@ snapshots: dependencies: consola: 3.2.3 - cli-color@2.0.4: - dependencies: - d: 1.0.2 - es5-ext: 0.10.64 - es6-iterator: 2.0.3 - memoizee: 0.4.17 - timers-ext: 0.1.8 - color-convert@2.0.1: dependencies: color-name: 1.1.4 @@ -4262,11 +3937,6 @@ snapshots: d3-transition: 3.0.1(d3-selection@3.0.0) d3-zoom: 3.0.0 - d@1.0.2: - dependencies: - es5-ext: 0.10.64 - type: 2.7.3 - data-urls@5.0.0: dependencies: whatwg-mimetype: 4.0.0 @@ -4324,57 +3994,6 @@ snapshots: dependencies: is-arrayish: 0.2.1 - es5-ext@0.10.64: - dependencies: - es6-iterator: 2.0.3 - es6-symbol: 3.1.4 - esniff: 2.0.1 - next-tick: 1.1.0 - - es6-iterator@2.0.3: - dependencies: - d: 1.0.2 - es5-ext: 0.10.64 - es6-symbol: 3.1.4 - - es6-symbol@3.1.4: - dependencies: - d: 1.0.2 - ext: 1.7.0 - - es6-weak-map@2.0.3: - dependencies: - d: 1.0.2 - es5-ext: 0.10.64 - es6-iterator: 2.0.3 - es6-symbol: 3.1.4 - - esbuild@0.19.12: - optionalDependencies: - '@esbuild/aix-ppc64': 0.19.12 - '@esbuild/android-arm': 0.19.12 - '@esbuild/android-arm64': 0.19.12 - '@esbuild/android-x64': 0.19.12 - '@esbuild/darwin-arm64': 0.19.12 - '@esbuild/darwin-x64': 0.19.12 - '@esbuild/freebsd-arm64': 0.19.12 - '@esbuild/freebsd-x64': 0.19.12 - '@esbuild/linux-arm': 0.19.12 - '@esbuild/linux-arm64': 0.19.12 - '@esbuild/linux-ia32': 0.19.12 - '@esbuild/linux-loong64': 0.19.12 - '@esbuild/linux-mips64el': 0.19.12 - '@esbuild/linux-ppc64': 0.19.12 - '@esbuild/linux-riscv64': 0.19.12 - '@esbuild/linux-s390x': 0.19.12 - '@esbuild/linux-x64': 0.19.12 - '@esbuild/netbsd-x64': 0.19.12 - '@esbuild/openbsd-x64': 0.19.12 - '@esbuild/sunos-x64': 0.19.12 - '@esbuild/win32-arm64': 0.19.12 - '@esbuild/win32-ia32': 0.19.12 - '@esbuild/win32-x64': 0.19.12 - esbuild@0.21.5: optionalDependencies: '@esbuild/aix-ppc64': 0.21.5 @@ -4458,13 +4077,6 @@ snapshots: esm-env@1.1.4: {} - esniff@2.0.1: - dependencies: - d: 1.0.2 - es5-ext: 0.10.64 - event-emitter: 0.3.5 - type: 2.7.3 - espree@10.3.0: dependencies: acorn: 8.14.0 @@ -4494,11 +4106,6 @@ snapshots: esutils@2.0.3: {} - event-emitter@0.3.5: - dependencies: - d: 1.0.2 - es5-ext: 0.10.64 - execa@8.0.1: dependencies: cross-spawn: 7.0.5 @@ -4513,10 +4120,6 @@ snapshots: expect-type@1.1.0: {} - ext@1.7.0: - dependencies: - type: 2.7.3 - fast-deep-equal@3.1.3: {} fast-glob@3.3.2: @@ -4733,13 +4336,6 @@ snapshots: internmap@2.0.3: {} - intl-messageformat@10.7.6: - dependencies: - '@formatjs/ecma402-abstract': 2.2.3 - '@formatjs/fast-memoize': 2.2.3 - '@formatjs/icu-messageformat-parser': 2.9.3 - tslib: 2.8.1 - is-arrayish@0.2.1: {} is-binary-path@2.1.0: @@ -4764,8 +4360,6 @@ snapshots: is-potential-custom-element-name@1.0.1: {} - is-promise@2.2.2: {} - is-reference@3.0.3: dependencies: '@types/estree': 1.0.6 @@ -4892,10 +4486,6 @@ snapshots: lru-cache@10.4.3: {} - lru-queue@0.1.0: - dependencies: - es5-ext: 0.10.64 - lz-string@1.5.0: {} magic-string@0.30.12: @@ -4939,17 +4529,6 @@ snapshots: tinyqueue: 2.0.3 vt-pbf: 3.1.3 - memoizee@0.4.17: - dependencies: - d: 1.0.2 - es5-ext: 0.10.64 - es6-weak-map: 2.0.3 - event-emitter: 0.3.5 - is-promise: 2.2.2 - lru-queue: 0.1.0 - next-tick: 1.1.0 - timers-ext: 0.1.8 - merge-stream@2.0.0: {} merge2@1.4.1: {} @@ -5021,8 +4600,6 @@ snapshots: neo-async@2.6.2: {} - next-tick@1.1.0: {} - node-fetch-native@1.6.4: {} node-releases@2.0.18: {} @@ -5373,17 +4950,6 @@ snapshots: dependencies: svelte: 5.1.16 - svelte-i18n@4.0.1(svelte@5.1.16): - dependencies: - cli-color: 2.0.4 - deepmerge: 4.3.1 - esbuild: 0.19.12 - estree-walker: 2.0.2 - intl-messageformat: 10.7.6 - sade: 1.8.1 - svelte: 5.1.16 - tiny-glob: 0.2.9 - svelte@5.1.16: dependencies: '@ampproject/remapping': 2.3.0 @@ -5491,11 +5057,6 @@ snapshots: throttle-debounce@5.0.2: {} - timers-ext@0.1.8: - dependencies: - es5-ext: 0.10.64 - next-tick: 1.1.0 - tiny-glob@0.2.9: dependencies: globalyzer: 0.1.0 @@ -5553,8 +5114,6 @@ snapshots: dependencies: prelude-ls: 1.2.1 - type@2.7.3: {} - typescript-eslint@8.14.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3): dependencies: '@typescript-eslint/eslint-plugin': 8.14.0(@typescript-eslint/parser@8.14.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3) diff --git a/frontend/src/lib/components/Admin/AddButton.svelte b/frontend/src/lib/components/Admin/AddButton.svelte index 54eb470a..b24a220c 100644 --- a/frontend/src/lib/components/Admin/AddButton.svelte +++ b/frontend/src/lib/components/Admin/AddButton.svelte @@ -1,9 +1,9 @@ {$_('admin.add')} {i18n.tr.admin.add} diff --git a/frontend/src/lib/components/Admin/CancelButton.svelte b/frontend/src/lib/components/Admin/CancelButton.svelte index 92f4f981..11dfe1f8 100644 --- a/frontend/src/lib/components/Admin/CancelButton.svelte +++ b/frontend/src/lib/components/Admin/CancelButton.svelte @@ -1,9 +1,9 @@ {$_('admin.cancel')} {i18n.tr.admin.cancel} diff --git a/frontend/src/lib/components/Admin/DeleteButton.svelte b/frontend/src/lib/components/Admin/DeleteButton.svelte index cff37133..7174b2f0 100644 --- a/frontend/src/lib/components/Admin/DeleteButton.svelte +++ b/frontend/src/lib/components/Admin/DeleteButton.svelte @@ -1,11 +1,11 @@ - {$_('admin.delete')} + {i18n.tr.admin.delete} diff --git a/frontend/src/lib/components/Admin/DeleteModal.svelte b/frontend/src/lib/components/Admin/DeleteModal.svelte index 6107ac3d..839de96d 100644 --- a/frontend/src/lib/components/Admin/DeleteModal.svelte +++ b/frontend/src/lib/components/Admin/DeleteModal.svelte @@ -1,9 +1,9 @@ - {$_('admin.edit')} + {i18n.tr.admin.edit} diff --git a/frontend/src/lib/components/Admin/EditMilestoneGroupModal.svelte b/frontend/src/lib/components/Admin/EditMilestoneGroupModal.svelte index f668374a..dacf8aff 100644 --- a/frontend/src/lib/components/Admin/EditMilestoneGroupModal.svelte +++ b/frontend/src/lib/components/Admin/EditMilestoneGroupModal.svelte @@ -9,10 +9,14 @@ import { updateMilestoneGroupAdmin, uploadMilestoneGroupImage, } from "$lib/client/services.gen"; -import type { MilestoneGroupAdmin } from "$lib/client/types.gen"; +import type { + MilestoneGroupAdmin, + MilestoneGroupText, +} from "$lib/client/types.gen"; import CancelButton from "$lib/components/Admin/CancelButton.svelte"; import SaveButton from "$lib/components/Admin/SaveButton.svelte"; import ImageFileUpload from "$lib/components/DataInput/ImageFileUpload.svelte"; +import { i18n } from "$lib/i18n.svelte"; import { ButtonGroup, InputAddon, @@ -21,7 +25,6 @@ import { Textarea, } from "flowbite-svelte"; import { onMount } from "svelte"; -import { _, locales } from "svelte-i18n"; let { open = $bindable(false), @@ -30,7 +33,9 @@ let { let files: FileList | undefined = $state(undefined); let image: string = $state(""); -const textKeys = ["title", "desc"]; +const textKeys = ["title", "desc"] as Array< + keyof typeof i18n.tr.admin & keyof MilestoneGroupText +>; onMount(() => { if (milestoneGroup) { @@ -68,13 +73,13 @@ export async function saveChanges() { } - + {#if milestoneGroup} {#each textKeys as textKey} - {@const title = $_(`admin.${textKey}`)} + {@const title = i18n.tr.admin[textKey]} {title} - {#each $locales as lang_id} + {#each i18n.locales as lang_id} {lang_id} @@ -85,7 +90,7 @@ export async function saveChanges() { {/each} - {$_('admin.image')} + {i18n.tr.admin.image} ; async function saveChanges() { if (!milestone) { @@ -75,13 +77,13 @@ async function deleteMilestoneImageAndUpdate() { } - + {#if milestone} {#each textKeys as textKey} - {@const title = $_(`admin.${textKey}`)} + {@const title = i18n.tr.admin[textKey]} {title} - {#each $locales as lang_id} + {#each i18n.locales as lang_id} {lang_id} @@ -92,12 +94,12 @@ async function deleteMilestoneImageAndUpdate() { {/each} - {`${$_("admin.expected-age")}: ${milestone.expected_age_months}m`} - + {`${i18n.tr.admin.expectedAge}: ${milestone.expected_age_months}m`} + {showMilestoneExpectedAgeModal = true;}}>View data - {$_('admin.images')} + {i18n.tr.admin.images} {#each milestone.images as milestoneImage (milestoneImage.id)} ({ @@ -99,14 +99,14 @@ async function saveChanges() { - {$_("admin.question")} + {i18n.tr.admin.question} {#each Object.values(question.text) as text} {text.lang_id} @@ -164,7 +164,7 @@ async function saveChanges() { Preview - {#each $locales as lang_id} + {#each i18n.locales as lang_id} { diff --git a/frontend/src/lib/components/Admin/Languages.svelte b/frontend/src/lib/components/Admin/Languages.svelte index 6f0329a9..874bb0b5 100644 --- a/frontend/src/lib/components/Admin/Languages.svelte +++ b/frontend/src/lib/components/Admin/Languages.svelte @@ -5,7 +5,7 @@ import { createLanguage, deleteLanguage } from "$lib/client/services.gen"; import AddButton from "$lib/components/Admin/AddButton.svelte"; import DeleteButton from "$lib/components/Admin/DeleteButton.svelte"; import DeleteModal from "$lib/components/Admin/DeleteModal.svelte"; -import { getTranslations } from "$lib/i18n"; +import { i18n } from "$lib/i18n.svelte"; import type { SelectOptionType } from "flowbite-svelte"; import { Card, @@ -18,7 +18,6 @@ import { TableHeadCell, } from "flowbite-svelte"; import ISO6391 from "iso-639-1"; -import { _, locales } from "svelte-i18n"; const langCodes = ISO6391.getAllCodes(); const langNames = ISO6391.getAllNativeNames(); @@ -38,7 +37,7 @@ async function createLanguageAndUpdateLanguages() { console.log(error); } else { console.log(data); - await getTranslations(); + await i18n.load(); } } @@ -50,21 +49,21 @@ async function deleteLanguageAndUpdateLanguages() { console.log(error); } else { console.log(data); - await getTranslations(); + await i18n.load(); } } - {$_('admin.languages')} + {i18n.tr.admin.languages} Code (ISO 639-1) Name - {$_('admin.actions')} + {i18n.tr.admin.actions} - {#each $locales as lang_id} + {#each i18n.locales as lang_id} {lang_id} diff --git a/frontend/src/lib/components/Admin/MilestoneExpectedAgeModal.svelte b/frontend/src/lib/components/Admin/MilestoneExpectedAgeModal.svelte index 81ede8bd..c7d5aa03 100644 --- a/frontend/src/lib/components/Admin/MilestoneExpectedAgeModal.svelte +++ b/frontend/src/lib/components/Admin/MilestoneExpectedAgeModal.svelte @@ -4,9 +4,9 @@ import { getMilestoneAgeScores } from "$lib/client/services.gen"; import type { MilestoneAgeScore } from "$lib/client/types.gen"; import PlotScoreAge from "$lib/components/DataDisplay/PlotScoreAge.svelte"; +import { i18n } from "$lib/i18n.svelte"; import { Modal } from "flowbite-svelte"; import { onMount } from "svelte"; -import { _ } from "svelte-i18n"; let { open = $bindable(false), @@ -34,7 +34,7 @@ onMount(async () => { }); - + {#if scores} {/if} diff --git a/frontend/src/lib/components/Admin/MilestoneExpectedAges.svelte b/frontend/src/lib/components/Admin/MilestoneExpectedAges.svelte index f06df3ab..2adc653f 100644 --- a/frontend/src/lib/components/Admin/MilestoneExpectedAges.svelte +++ b/frontend/src/lib/components/Admin/MilestoneExpectedAges.svelte @@ -9,6 +9,7 @@ import { import type { MilestoneAgeScoreCollectionPublic } from "$lib/client/types.gen"; import SaveButton from "$lib/components/Admin/SaveButton.svelte"; import PlotScoreAge from "$lib/components/DataDisplay/PlotScoreAge.svelte"; +import { i18n } from "$lib/i18n.svelte"; import { milestoneGroups } from "$lib/stores/adminStore"; import { Button, @@ -23,7 +24,6 @@ import { TableHeadCell, } from "flowbite-svelte"; import RefreshOutline from "flowbite-svelte-icons/RefreshOutline.svelte"; -import { _, locale } from "svelte-i18n"; let currentMilestoneId = $state(null as number | null); let showMilestoneExpectedAgeModal = $state(false); @@ -86,11 +86,11 @@ async function saveNewExpectedAges() { - {#if milestoneGroups && $locale} + {#if milestoneGroups && i18n.locale} - {$_("admin.recalculate-expected-age")} + {i18n.tr.admin.recalculateExpectedAge} @@ -104,23 +104,23 @@ async function saveNewExpectedAges() { - {$_('admin.milestones')} - {$_('admin.expected-age')} - {$_('admin.new-expected-age')} - {$_('admin.actions')} + {i18n.tr.admin.milestones} + {i18n.tr.admin.expectedAge} + {i18n.tr.admin.newExpectedAge} + {i18n.tr.admin.actions} {#each $milestoneGroups as milestoneGroup (milestoneGroup.id)} - {@const groupTitle = milestoneGroup.text[$locale].title} + {@const groupTitle = milestoneGroup.text[i18n.locale].title} {#each milestoneGroup.milestones as milestone (milestone.id)} - {@const milestoneTitle = `${groupTitle} / ${milestone.text[$locale].title}`} + {@const milestoneTitle = `${groupTitle} / ${milestone.text[i18n.locale].title}`} {@const newExpectedAge = expectedAges?.[milestone.id]?.expected_age ?? '-'} {milestoneTitle} {milestone.expected_age_months} {newExpectedAge} {currentMilestoneId = milestone.id; currentTitle = `${milestoneTitle} ${$_('admin.new-expected-age')}: ${newExpectedAge}m`; showMilestoneExpectedAgeModal = true;}}>{$_("admin.view-data")} + onclick={() => {currentMilestoneId = milestone.id; currentTitle = `${milestoneTitle} ${i18n.tr.admin.newExpectedAge}: ${newExpectedAge}m`; showMilestoneExpectedAgeModal = true;}}>{i18n.tr.admin.viewData} {/each} {/each} diff --git a/frontend/src/lib/components/Admin/MilestoneGroups.svelte b/frontend/src/lib/components/Admin/MilestoneGroups.svelte index 88f387bf..10a2d4dd 100644 --- a/frontend/src/lib/components/Admin/MilestoneGroups.svelte +++ b/frontend/src/lib/components/Admin/MilestoneGroups.svelte @@ -25,6 +25,7 @@ import EditMilestoneGroupModal from "$lib/components/Admin/EditMilestoneGroupMod import EditMilestoneModal from "$lib/components/Admin/EditMilestoneModal.svelte"; import OrderItemsModal from "$lib/components/Admin/OrderItemsModal.svelte"; import ReorderButton from "$lib/components/Admin/ReorderButton.svelte"; +import { i18n } from "$lib/i18n.svelte"; import { milestoneGroups } from "$lib/stores/adminStore"; import { Card, @@ -37,7 +38,6 @@ import { } from "flowbite-svelte"; import ChevronDownOutline from "flowbite-svelte-icons/ChevronDownOutline.svelte"; import ChevronUpOutline from "flowbite-svelte-icons/ChevronUpOutline.svelte"; -import { _, locale } from "svelte-i18n"; import AlertMessage from "../AlertMessage.svelte"; let currentMilestoneGroup = $state(null as MilestoneGroupAdmin | null); @@ -126,16 +126,16 @@ async function doDeleteMilestone() { } -{#if $locale} +{#if i18n.locale} {#if milestoneGroups} - {$_('admin.milestone-groups')} + {i18n.tr.admin.milestoneGroups} {#each $milestoneGroups as milestoneGroup, groupIndex (milestoneGroup.id)} - {@const groupTitle = milestoneGroup.text[$locale]?.title} + {@const groupTitle = milestoneGroup.text[i18n.locale]?.title} { toggleOpenGroupIndex(groupIndex); @@ -184,11 +184,11 @@ async function doDeleteMilestone() { - {$_('admin.milestones')} + {i18n.tr.admin.milestones} {#each milestoneGroup.milestones as milestone (milestone.id)} - {@const milestoneTitle = milestone?.text[$locale]?.title} + {@const milestoneTitle = milestone?.text[i18n.locale]?.title} {#if milestone?.images?.length} @@ -229,7 +229,7 @@ async function doDeleteMilestone() { onclick={(event: Event) => { event.stopPropagation(); currentOrderEndpoint = orderMilestonesAdmin; - currentOrderItems = milestoneGroup.milestones.map((milestone) => {return {id: milestone.id, text: milestone.text[$locale]?.title};}); + currentOrderItems = milestoneGroup.milestones.map((milestone) => {return {id: milestone.id, text: milestone.text[i18n.locale]?.title};}); showOrderItemsModal = true; }} /> @@ -250,7 +250,7 @@ async function doDeleteMilestone() { onclick={(event: Event) => { event.stopPropagation(); currentOrderEndpoint = orderMilestoneGroupsAdmin; - currentOrderItems = $milestoneGroups.map((milestoneGroup) => {return {id: milestoneGroup.id, text: milestoneGroup.text[$locale]?.title};}); + currentOrderItems = $milestoneGroups.map((milestoneGroup) => {return {id: milestoneGroup.id, text: milestoneGroup.text[i18n.locale]?.title};}); showOrderItemsModal = true; }} /> @@ -277,5 +277,5 @@ async function doDeleteMilestone() { {:else} - + {/if} diff --git a/frontend/src/lib/components/Admin/OrderItemsModal.svelte b/frontend/src/lib/components/Admin/OrderItemsModal.svelte index 06415d9b..76f38658 100644 --- a/frontend/src/lib/components/Admin/OrderItemsModal.svelte +++ b/frontend/src/lib/components/Admin/OrderItemsModal.svelte @@ -1,6 +1,11 @@ - + {#each items as item(item.id)} { }); -{#if $locale} +{#if i18n.locale} - {$_(`admin.${kind}-questions`)} + {i18n.tr.admin[`${kind}Questions`]} Question Input type Options - {$_('admin.actions')} + {i18n.tr.admin.actions} {#each $questions as question, groupIndex (question.id)} - {question?.text[$locale]?.question} + {question?.text[i18n.locale]?.question} {question?.component} - {question?.text[$locale]?.options} + {question?.text[i18n.locale]?.options} { { - currentOrderItems = $questions.map((question) => {return {id: question.id, text: question.text[$locale]?.question};}); + currentOrderItems = $questions.map((question) => {return {id: question.id, text: question.text[i18n.locale]?.question};}); showOrderItemsModal = true; }} /> @@ -181,5 +181,5 @@ onMount(async () => { {:else} - + {/if} diff --git a/frontend/src/lib/components/Admin/ReorderButton.svelte b/frontend/src/lib/components/Admin/ReorderButton.svelte index b9c0c8f6..3a67ef25 100644 --- a/frontend/src/lib/components/Admin/ReorderButton.svelte +++ b/frontend/src/lib/components/Admin/ReorderButton.svelte @@ -1,13 +1,13 @@ - {$_('admin.reorder')} + {i18n.tr.admin.reorder} diff --git a/frontend/src/lib/components/Admin/SaveButton.svelte b/frontend/src/lib/components/Admin/SaveButton.svelte index 66e9529a..02bd15e1 100644 --- a/frontend/src/lib/components/Admin/SaveButton.svelte +++ b/frontend/src/lib/components/Admin/SaveButton.svelte @@ -1,13 +1,13 @@ diff --git a/frontend/src/lib/components/Admin/SubmittedMilestoneImages.svelte b/frontend/src/lib/components/Admin/SubmittedMilestoneImages.svelte index 5ab1d689..c33c6cc0 100644 --- a/frontend/src/lib/components/Admin/SubmittedMilestoneImages.svelte +++ b/frontend/src/lib/components/Admin/SubmittedMilestoneImages.svelte @@ -11,6 +11,7 @@ import type { SubmittedMilestoneImagePublic } from "$lib/client/types.gen"; import DeleteButton from "$lib/components/Admin/DeleteButton.svelte"; import DeleteModal from "$lib/components/Admin/DeleteModal.svelte"; import SaveButton from "$lib/components/Admin/SaveButton.svelte"; +import { i18n } from "$lib/i18n.svelte"; import { milestoneGroups } from "$lib/stores/adminStore"; import { Card, @@ -22,7 +23,6 @@ import { TableHeadCell, } from "flowbite-svelte"; import { onMount } from "svelte"; -import { _, locale } from "svelte-i18n"; let images = $state([] as Array); let currentImageId = $state(0); @@ -69,48 +69,46 @@ onMount(async () => { }); -{#if $locale} - - - {$_("admin.users")} - - - - {$_('admin.milestone')} - {$_('admin.image')} - {$_('admin.actions')} - - - {#each $milestoneGroups as milestoneGroup (milestoneGroup.id)} - {@const groupTitle = milestoneGroup.text[$locale].title} - {#each milestoneGroup.milestones as milestone (milestone.id)} - {@const milestoneTitle = `${groupTitle} / ${milestone.text[$locale].title}`} - {#each images as image (image.id)} - {#if image.milestone_id === milestone.id} - - - {milestoneTitle} - - - - - - {approveImage(image.id)}}/> - { - currentImageId = image.id; - showDeleteModal = true; - }} - /> - - - {/if} - {/each} + + + {i18n.tr.admin.users} + + + + {i18n.tr.admin.milestone} + {i18n.tr.admin.image} + {i18n.tr.admin.actions} + + + {#each $milestoneGroups as milestoneGroup (milestoneGroup.id)} + {@const groupTitle = milestoneGroup.text[i18n.locale].title} + {#each milestoneGroup.milestones as milestone (milestone.id)} + {@const milestoneTitle = `${groupTitle} / ${milestone.text[i18n.locale].title}`} + {#each images as image (image.id)} + {#if image.milestone_id === milestone.id} + + + {milestoneTitle} + + + + + + {approveImage(image.id)}}/> + { + currentImageId = image.id; + showDeleteModal = true; + }} + /> + + + {/if} {/each} {/each} - - - -{/if} + {/each} + + + diff --git a/frontend/src/lib/components/Admin/Translations.svelte b/frontend/src/lib/components/Admin/Translations.svelte index 3d179bc3..7b694996 100644 --- a/frontend/src/lib/components/Admin/Translations.svelte +++ b/frontend/src/lib/components/Admin/Translations.svelte @@ -3,7 +3,9 @@ - {$_('admin.translations')} + {i18n.tr.admin.translations} - {#each Object.entries(de) as [section_key, section]} + {#each Object.entries(translationIds) as [section_key, section]} {section_key} - {#each Object.entries(section) as [item_key, item]} + {#each Object.keys(section) as item_key} {item_key} - - - de - {item} - - - {#each Object.keys(translations) as lang} + {#each i18n.locales as lang} {lang} diff --git a/frontend/src/lib/components/Admin/Users.svelte b/frontend/src/lib/components/Admin/Users.svelte index 2e372b85..7f981ef7 100644 --- a/frontend/src/lib/components/Admin/Users.svelte +++ b/frontend/src/lib/components/Admin/Users.svelte @@ -21,8 +21,8 @@ import { usersPatchUser, } from "$lib/client/services.gen"; import type { UserRead } from "$lib/client/types.gen"; +import { i18n } from "$lib/i18n.svelte"; import { onMount } from "svelte"; -import { _ } from "svelte-i18n"; let users = $state([] as Array); let saveDisabled = $state({} as Record); @@ -79,7 +79,7 @@ onMount(async () => { - {$_("admin.users")} + {i18n.tr.admin.users} @@ -90,7 +90,7 @@ onMount(async () => { Full data access Research Code Admin - {$_('admin.actions')} + {i18n.tr.admin.actions} {#each users as user (user.id)} diff --git a/frontend/src/lib/components/AdminPage.svelte b/frontend/src/lib/components/AdminPage.svelte index d3d4bb62..369e9316 100644 --- a/frontend/src/lib/components/AdminPage.svelte +++ b/frontend/src/lib/components/AdminPage.svelte @@ -9,6 +9,7 @@ import Questions from "$lib/components/Admin/Questions.svelte"; import SubmittedMilestoneImages from "$lib/components/Admin/SubmittedMilestoneImages.svelte"; import Translations from "$lib/components/Admin/Translations.svelte"; import Users from "$lib/components/Admin/Users.svelte"; +import { i18n } from "$lib/i18n.svelte"; import { user } from "$lib/stores/userStore.svelte"; import { TabItem, Tabs } from "flowbite-svelte"; import { @@ -20,7 +21,6 @@ import { UsersOutline, } from "flowbite-svelte-icons"; import { onMount } from "svelte"; -import { _ } from "svelte-i18n"; onMount(async () => { await user.load(); @@ -32,56 +32,56 @@ onMount(async () => { - {$_("admin.milestones")} + {i18n.tr.admin.milestones} - {$_("admin.expected-age")} + {i18n.tr.admin.expectedAge} - {$_("admin.submitted-images")} + {i18n.tr.admin.submittedImages} - {$_("admin.users")} + {i18n.tr.admin.users} - {$_("admin.user-questions")} + {i18n.tr.admin.userQuestions} - {$_("admin.child-questions")} + {i18n.tr.admin.childQuestions} - {$_("admin.translations")} + {i18n.tr.admin.translations} - {$_("admin.languages")} + {i18n.tr.admin.languages} diff --git a/frontend/src/lib/components/AlertMessage.svelte b/frontend/src/lib/components/AlertMessage.svelte index d704282d..9527eba6 100644 --- a/frontend/src/lib/components/AlertMessage.svelte +++ b/frontend/src/lib/components/AlertMessage.svelte @@ -1,8 +1,8 @@ {#await promise} - {$_("userData.loadingMessage")} + {i18n.tr.userData.loadingMessage} {:then data} {#if showAlert} { showAlert = false; @@ -145,12 +146,12 @@ const searchData = [ {$_("childData.overviewLabel")}{i18n.tr.childData.overviewLabel} - {$_("childData.overviewSummary")} + {i18n.tr.childData.overviewSummary} { if (new_child.error) { showAlert = true; alertMessage = - $_("childData.alertMessageCreate") + new_child.error.detail; + i18n.tr.childData.alertMessageCreate + new_child.error.detail; return; } currentChild.id = new_child.data.id; @@ -179,7 +179,7 @@ async function submitChildData(): Promise { if (response.error) { showAlert = true; - alertMessage = `${$_("childData.alertMessageUpdate")} ${response.error.detail}`; + alertMessage = `${i18n.tr.childData.alertMessageUpdate} ${response.error.detail}`; return; } } @@ -197,7 +197,7 @@ async function submitChildData(): Promise { "Error when sending user question answers: ", response.error.detail, ); - alertMessage = `${$_("childData.alertMessageError")} ${response.error.detail}`; + alertMessage = `${i18n.tr.childData.alertMessageError} ${response.error.detail}`; showAlert = true; return; } @@ -207,7 +207,7 @@ async function submitImageData(): Promise { if (currentChild.id === null) { console.log("no child id, no image to upload"); showAlert = true; - alertMessage = $_("childData.alertMessageError"); + alertMessage = i18n.tr.childData.alertMessageError; return; } @@ -221,7 +221,7 @@ async function submitImageData(): Promise { if (response.error) { console.log("error during file delete: ", response.error.detail); showAlert = true; - alertMessage = `${$_("childData.alertMessageUpdate")} ${response.error.detail}`; + alertMessage = `${i18n.tr.childData.alertMessageUpdate} ${response.error.detail}`; return; } } else if (image instanceof File && imageDeleted === false) { @@ -237,7 +237,7 @@ async function submitImageData(): Promise { if (response.error) { console.log("error during file upload: ", response.error.detail); showAlert = true; - alertMessage = `${$_("childData.alertMessageError")} ${response.error.detail}`; + alertMessage = `${i18n.tr.childData.alertMessageError} ${response.error.detail}`; return; } } else { @@ -259,16 +259,16 @@ async function submitData(): Promise { } -{#if $locale} +{#if i18n.locale} {#await promise} - {$_("childData.loadingMessage")} + {i18n.tr.childData.loadingMessage} {:then { questionnaire, answers }} {#if showAlert} { showAlert = false; @@ -284,7 +284,7 @@ async function submitData(): Promise { > {#if showAlert} { showAlert = false; @@ -298,9 +298,9 @@ async function submitData(): Promise { { { { { { }} > - {$_("childData.deleteImageButton")} + {i18n.tr.childData.deleteImageButton} {:else if disableImageDelete === true} - {$_("childData.imageOfChildChangeDelete")} + {i18n.tr.childData.imageOfChildChangeDelete} {/if} @@ -379,15 +379,15 @@ async function submitData(): Promise { bind:value={answers[element.id].answer} bind:additionalValue={answers[element.id] .additional_answer} - label={element?.text?.[$locale].question} + label={element?.text?.[i18n.locale].question} textTrigger={element.additional_option} required={element.component === 'fileupload' ? false : true} additionalRequired={true} id={"input_" + String(i)} - items={element?.text?.[$locale].options_json === "" + items={element?.text?.[i18n.locale].options_json === "" ? undefined : JSON.parse( - element?.text?.[$locale].options_json ?? '', + element?.text?.[i18n.locale].options_json ?? '', )} disabled={disableEdit} placeholder="" @@ -402,14 +402,14 @@ async function submitData(): Promise { }} > - {$_("childData.changeData")} + {i18n.tr.childData.changeData} {:else} {$_("childData.submitButtonLabel")}{i18n.tr.childData.submitButtonLabel} {/if} {#if currentChild.id !== null} @@ -422,7 +422,7 @@ async function submitData(): Promise { }} > - {$_("childData.nextButtonLabel")} + {i18n.tr.childData.nextButtonLabel} { }} > - {$_("childData.feedbackButtonLabel")} + {i18n.tr.childData.feedbackButtonLabel} { if (currentChild.id === null) { console.log("no child id, no child to delete"); showAlert = true; - alertMessage = $_("childData.alertMessageError"); + alertMessage = i18n.tr.childData.alertMessageError; return; } @@ -457,7 +457,7 @@ async function submitData(): Promise { if (response.error) { console.log("Error when deleting child"); showAlert = true; - alertMessage=$_("childData.alertMessageError") + response.error.detail; + alertMessage=i18n.tr.childData.alertMessageError + response.error.detail; } else { activeTabChildren.update((value) => { @@ -466,7 +466,7 @@ async function submitData(): Promise { currentChild.id = null; } }} - > {$_("childData.deleteButtonLabel")} {i18n.tr.childData.deleteButtonLabel} {/if} @@ -475,7 +475,7 @@ async function submitData(): Promise { {/if} {:catch error} { showAlert = false; @@ -484,8 +484,8 @@ async function submitData(): Promise { {/await} {:else} { showAlert = false; }} diff --git a/frontend/src/lib/components/DataDisplay/PlotScoreAge.svelte b/frontend/src/lib/components/DataDisplay/PlotScoreAge.svelte index 6a0b4b7a..eee62b8c 100644 --- a/frontend/src/lib/components/DataDisplay/PlotScoreAge.svelte +++ b/frontend/src/lib/components/DataDisplay/PlotScoreAge.svelte @@ -2,6 +2,7 @@ - + - {$_('milestone.submit-image-text')} + {i18n.tr.milestone.submitImageText} {#if milestoneId} @@ -50,10 +50,10 @@ export async function submitImage() { bind:image /> - {$_('milestone.submit-image-conditions')} + {i18n.tr.milestone.submitImageConditions} {/if} - {open = false; submitImage()}}/> + {open = false; submitImage()}}/> {open = false;}}/> diff --git a/frontend/src/lib/components/FrontPageAbout.svelte b/frontend/src/lib/components/FrontPageAbout.svelte index 0bb04093..41a1a6c4 100644 --- a/frontend/src/lib/components/FrontPageAbout.svelte +++ b/frontend/src/lib/components/FrontPageAbout.svelte @@ -1,16 +1,16 @@ - + - {$_("frontpageAbout.heading")} - {$_("frontpageAbout.summary1")} - {$_("frontpageAbout.summary2")} + {i18n.tr.frontpageAbout.heading} + {i18n.tr.frontpageAbout.summary1} + {i18n.tr.frontpageAbout.summary2} diff --git a/frontend/src/lib/components/FrontPageAccordion.svelte b/frontend/src/lib/components/FrontPageAccordion.svelte index 63247320..c90f2086 100644 --- a/frontend/src/lib/components/FrontPageAccordion.svelte +++ b/frontend/src/lib/components/FrontPageAccordion.svelte @@ -1,16 +1,16 @@ - {$_('frontpageAccordion.heading1')} - {@html $_('frontpageAccordion.summary1')} + {i18n.tr.frontpageAccordion.heading1} + {@html i18n.tr.frontpageAccordion.summary1} - {$_('frontpageAccordion.heading2')} - {@html $_('frontpageAccordion.summary2')} + {i18n.tr.frontpageAccordion.heading2} + {@html i18n.tr.frontpageAccordion.summary2} diff --git a/frontend/src/lib/components/FrontPageBookmarks.svelte b/frontend/src/lib/components/FrontPageBookmarks.svelte index eca10272..932b467e 100644 --- a/frontend/src/lib/components/FrontPageBookmarks.svelte +++ b/frontend/src/lib/components/FrontPageBookmarks.svelte @@ -1,6 +1,5 @@ - {$_("frontpage.heading")} - {$_("frontpage.summary")} + {i18n.tr.frontpage.heading} + {i18n.tr.frontpage.summary} { goto("/signup"); - }}>{$_("frontpage.buttonLabel")} - {$_("frontpage.toolTip")} + }}>{i18n.tr.frontpage.buttonLabel} + {i18n.tr.frontpage.toolTip} diff --git a/frontend/src/lib/components/Frontpage.svelte b/frontend/src/lib/components/Frontpage.svelte index 27e1889c..b78cb67f 100644 --- a/frontend/src/lib/components/Frontpage.svelte +++ b/frontend/src/lib/components/Frontpage.svelte @@ -4,7 +4,7 @@ import CardDisplay from "$lib/components//DataDisplay/CardDisplay.svelte"; import GalleryDisplay from "$lib/components/DataDisplay/GalleryDisplay.svelte"; import FrontPageAbout from "$lib/components/FrontPageAbout.svelte"; import FrontPageCard from "$lib/components/FrontPageCard.svelte"; -import { _ } from "svelte-i18n"; +import { i18n } from "$lib/i18n.svelte"; import FrontPageAccordion from "./FrontPageAccordion.svelte"; import FrontPageBookmarks from "./FrontPageBookmarks.svelte"; @@ -12,32 +12,32 @@ let { items = [] } = $props(); const bookmarks = [ { - titleKey: $_("frontpageBookmarks.headingMotor"), - contentKey: $_("frontpageBookmarks.summaryMotor"), + titleKey: i18n.tr.frontpageBookmarks.headingMotor, + contentKey: i18n.tr.frontpageBookmarks.summaryMotor, }, { - titleKey: $_("frontpageBookmarks.headingFineMotor"), - contentKey: $_("frontpageBookmarks.summaryFineMotor"), + titleKey: i18n.tr.frontpageBookmarks.headingFineMotor, + contentKey: i18n.tr.frontpageBookmarks.summaryFineMotor, }, { - titleKey: $_("frontpageBookmarks.headingThinking"), - contentKey: $_("frontpageBookmarks.summaryThinking"), + titleKey: i18n.tr.frontpageBookmarks.headingThinking, + contentKey: i18n.tr.frontpageBookmarks.summaryThinking, }, { - titleKey: $_("frontpageBookmarks.headingLanguage"), - contentKey: $_("frontpageBookmarks.summaryLanguage"), + titleKey: i18n.tr.frontpageBookmarks.headingLanguage, + contentKey: i18n.tr.frontpageBookmarks.summaryLanguage, }, { - titleKey: $_("frontpageBookmarks.headingSocialDevelopment"), - contentKey: $_("frontpageBookmarks.summarySocialDevelopment"), + titleKey: i18n.tr.frontpageBookmarks.headingSocialDevelopment, + contentKey: i18n.tr.frontpageBookmarks.summarySocialDevelopment, }, { - titleKey: $_("frontpageBookmarks.headingInnerStates"), - contentKey: $_("frontpageBookmarks.summaryInnerStates"), + titleKey: i18n.tr.frontpageBookmarks.headingInnerStates, + contentKey: i18n.tr.frontpageBookmarks.summaryInnerStates, }, { - titleKey: $_("frontpageBookmarks.headingSchool"), - contentKey: $_("frontpageBookmarks.summarySchool"), + titleKey: i18n.tr.frontpageBookmarks.headingSchool, + contentKey: i18n.tr.frontpageBookmarks.summarySchool, }, ]; @@ -49,7 +49,7 @@ const bookmarks = [ /> - {$_('frontpageBookmarks.title')} + {i18n.tr.frontpageBookmarks.title} diff --git a/frontend/src/lib/components/LocaleChooser.svelte b/frontend/src/lib/components/LocaleChooser.svelte index 15ea1a3e..c05a305e 100644 --- a/frontend/src/lib/components/LocaleChooser.svelte +++ b/frontend/src/lib/components/LocaleChooser.svelte @@ -1,7 +1,7 @@ @@ -12,19 +12,19 @@ let dropdownOpen = false; class="z-10 inline-flex flex-shrink-0 items-center rounded-lg bg-gray-100 px-4 py-2.5 text-center text-sm font-medium text-gray-500 hover:bg-gray-200 focus:outline-none focus:ring-4 focus:ring-gray-100 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-700" type="button" > - {$locale} + {i18n.locale} - {#each $locales as loc} + {#each i18n.locales as locale} { - locale.set(loc); + i18n.locale = locale; dropdownOpen = false; }} > - {loc} + {locale} {/each} diff --git a/frontend/src/lib/components/Milestone.svelte b/frontend/src/lib/components/Milestone.svelte index db57eb33..26e76f48 100644 --- a/frontend/src/lib/components/Milestone.svelte +++ b/frontend/src/lib/components/Milestone.svelte @@ -9,6 +9,7 @@ import { } from "$lib/client"; import SubmitMilestoneImageModal from "$lib/components/DataInput/SubmitMilestoneImageModal.svelte"; import MilestoneButton from "$lib/components/MilestoneButton.svelte"; +import { i18n } from "$lib/i18n.svelte"; import { currentChild } from "$lib/stores/childrenStore.svelte"; import { activeTabChildren } from "$lib/stores/componentStore"; import { contentStore } from "$lib/stores/contentStore.svelte"; @@ -25,7 +26,6 @@ import { UserSettingsOutline, } from "flowbite-svelte-icons"; import { onMount } from "svelte"; -import { _, locale } from "svelte-i18n"; import AlertMessage from "./AlertMessage.svelte"; import Breadcrumbs from "./Navigation/Breadcrumbs.svelte"; @@ -123,7 +123,7 @@ async function setup() { if (response.error) { console.log("Error when retrieving milestone answer session"); showAlert = true; - alertMessage = `${$_("milestone.alertMessageRetrieving")} ${response.error.detail}`; + alertMessage = `${i18n.tr.milestone.alertMessageRetrieving} ${response.error.detail}`; milestoneAnswerSession = undefined; } else { milestoneAnswerSession = response.data; @@ -153,14 +153,14 @@ const breadcrumbdata = $derived([ symbol: UserSettingsOutline, }, { - label: $_("milestone.groupOverviewLabel"), + label: i18n.tr.milestone.groupOverviewLabel, onclick: () => { activeTabChildren.set("milestoneGroup"); }, symbol: RectangleListOutline, }, { - label: contentStore.milestoneGroupData.text[$locale].title, + label: contentStore.milestoneGroupData.text[i18n.locale].title, onclick: () => { activeTabChildren.set("milestoneOverview"); }, @@ -174,12 +174,12 @@ const breadcrumbdata = $derived([ {#await promise} -{$_("userData.loadingMessage")} +{i18n.tr.userData.loadingMessage} {:then} - {#if $locale && contentStore.milestoneGroupData && contentStore.milestoneGroupData.text && contentStore.milestoneGroupData.milestones && currentMilestone && currentMilestone.text && currentMilestone.images} + {#if i18n.locale && contentStore.milestoneGroupData && contentStore.milestoneGroupData.text && contentStore.milestoneGroupData.milestones && currentMilestone && currentMilestone.text && currentMilestone.images} @@ -195,38 +195,38 @@ const breadcrumbdata = $derived([ - {currentMilestone.text[$locale].title} + {currentMilestone.text[i18n.locale].title} - {currentMilestone.text[$locale].desc} + {currentMilestone.text[i18n.locale].desc} - {$_('milestone.observation')} + {i18n.tr.milestone.observation} - {currentMilestone.text[$locale].obs} + {currentMilestone.text[i18n.locale].obs} - {$_('milestone.help')} + {i18n.tr.milestone.help} - {currentMilestone.text[$locale].help} + {currentMilestone.text[i18n.locale].help} - {$_('milestone.submit-image')} + {i18n.tr.milestone.submitImage} - {$_('milestone.submit-image-text')} + {i18n.tr.milestone.submitImageText} {showSubmitMilestoneImageModal=true;}}>{$_('milestone.submit-image')} + onclick={()=>{showSubmitMilestoneImageModal=true;}}>{i18n.tr.milestone.submitImage} @@ -238,9 +238,9 @@ const breadcrumbdata = $derived([ onClick={() => { selectAnswer(answerIndex); }} - tooltip={$_(`milestone.answer${answerIndex}-desc`)} + tooltip={i18n.tr.milestone[`answer${answerIndex}Desc`]} > - {$_(`milestone.answer${answerIndex}-text`)} + {i18n.tr.milestone[`answer${answerIndex}Text`]} {/each} @@ -251,7 +251,7 @@ const breadcrumbdata = $derived([ class="m-1 mt-4 text-gray-700 dark:text-gray-400" > - {$_('milestone.prev')} + {i18n.tr.milestone.prev} - {$_('milestone.next')} + {i18n.tr.milestone.next} - {$_('milestone.autonext')} + {i18n.tr.milestone.autoNext} {/if} {:catch error} - + {/await} {#key showSubmitMilestoneImageModal} diff --git a/frontend/src/lib/components/MilestoneGroup.svelte b/frontend/src/lib/components/MilestoneGroup.svelte index c94a31f4..770448c5 100644 --- a/frontend/src/lib/components/MilestoneGroup.svelte +++ b/frontend/src/lib/components/MilestoneGroup.svelte @@ -9,6 +9,7 @@ import { import CardDisplay from "$lib/components/DataDisplay/CardDisplay.svelte"; import GalleryDisplay from "$lib/components/DataDisplay/GalleryDisplay.svelte"; import Breadcrumbs from "$lib/components/Navigation/Breadcrumbs.svelte"; +import { i18n } from "$lib/i18n.svelte"; import { currentChild } from "$lib/stores/childrenStore.svelte"; import { activeTabChildren } from "$lib/stores/componentStore"; import { contentStore } from "$lib/stores/contentStore.svelte"; @@ -17,7 +18,6 @@ import { RectangleListOutline, UserSettingsOutline, } from "flowbite-svelte-icons"; -import { _, locale } from "svelte-i18n"; import AlertMessage from "./AlertMessage.svelte"; function computeProgress( @@ -44,7 +44,7 @@ function computeProgress( } async function setup(): Promise { - if ($locale === undefined || $locale === null) { + if (i18n.locale === undefined || i18n.locale === null) { console.log("locale not set"); return []; } @@ -54,7 +54,7 @@ async function setup(): Promise { if (currentChild.id === null || currentChild.id === undefined) { console.log("Error when retrieving child data"); showAlert = true; - alertMessage = $_("childData.alertMessageRetrieving"); + alertMessage = i18n.tr.childData.alertMessageRetrieving; data = []; return data; } @@ -73,7 +73,7 @@ async function setup(): Promise { console.log("Error when retrieving answer data"); showAlert = true; alertMessage = - $_("milestone.alertMessageRetrieving") + answerSession.error.detail; + i18n.tr.milestone.alertMessageRetrieving + answerSession.error.detail; data = []; return data; } @@ -82,15 +82,15 @@ async function setup(): Promise { console.log("Error when retrieving milestone group data"); showAlert = true; alertMessage = - $_("milestone.alertMessageRetrieving") + milestonegroups.error.detail; + i18n.tr.milestone.alertMessageRetrieving + milestonegroups.error.detail; data = []; return data; } data = milestonegroups.data.map((item) => { const res = { - header: item.text ? item.text[$locale].title : undefined, - summary: item.text?.[$locale]?.desc, + header: item.text ? item.text[i18n.locale].title : undefined, + summary: item.text?.[i18n.locale]?.desc, image: null, progress: computeProgress(item.milestones, answerSession.data), events: { @@ -116,7 +116,7 @@ const breadcrumbdata: any[] = [ }, }, { - label: $_("milestone.groupOverviewLabel"), + label: i18n.tr.milestone.groupOverviewLabel, symbol: RectangleListOutline, }, ]; @@ -127,7 +127,7 @@ function searchByStatus(data: any[], key: string): any[] { } return data.filter((item) => { // button label contains info about completion status => use for search - if (key === $_("search.complete")) { + if (key === i18n.tr.search.complete) { return item.progress === 1; } return item.progress < 1; @@ -188,30 +188,30 @@ let promise = $state(setup()); let data: any[] = $state([]); const searchData: any[] = [ { - label: $_("search.allLabel"), - placeholder: $_("search.allPlaceholder"), + label: i18n.tr.search.allLabel, + placeholder: i18n.tr.search.allPlaceholder, filterFunction: searchAll, }, { - label: $_("search.descriptionLabel"), - placeholder: $_("search.descriptionPlaceholder"), + label: i18n.tr.search.descriptionLabel, + placeholder: i18n.tr.search.descriptionPlaceholder, filterFunction: searchBySurveyDescription, }, { - label: $_("search.surveyLabel"), - placeholder: $_("search.surveyPlaceholder"), + label: i18n.tr.search.surveyLabel, + placeholder: i18n.tr.search.surveyPlaceholder, filterFunction: searchBySurveyTitle, }, { - label: $_("search.statusLabel"), - placeholder: $_("search.statusPlaceholder"), + label: i18n.tr.search.statusLabel, + placeholder: i18n.tr.search.statusPlaceholder, filterFunction: searchByStatus, }, ]; {#await promise} - {$_("userData.loadingMessage")} + {i18n.tr.userData.loadingMessage} {:then data} @@ -226,7 +226,7 @@ const searchData: any[] = [ {:catch error} - { + { activeTabChildren.set("milestoneOverview"); showAlert = false; }}/> diff --git a/frontend/src/lib/components/MilestoneOverview.svelte b/frontend/src/lib/components/MilestoneOverview.svelte index e16a6620..2a103e1e 100644 --- a/frontend/src/lib/components/MilestoneOverview.svelte +++ b/frontend/src/lib/components/MilestoneOverview.svelte @@ -8,6 +8,7 @@ import AlertMessage from "$lib/components/AlertMessage.svelte"; import CardDisplay from "$lib/components/DataDisplay/CardDisplay.svelte"; import GalleryDisplay from "$lib/components/DataDisplay/GalleryDisplay.svelte"; import Breadcrumbs from "$lib/components/Navigation/Breadcrumbs.svelte"; +import { i18n } from "$lib/i18n.svelte"; import { currentChild } from "$lib/stores/childrenStore.svelte"; import { activeTabChildren } from "$lib/stores/componentStore"; import { contentStore } from "$lib/stores/contentStore.svelte"; @@ -18,7 +19,6 @@ import { RectangleListOutline, UserSettingsOutline, } from "flowbite-svelte-icons"; -import { _, locale } from "svelte-i18n"; function searchStatus(data: any[], key: string): any[] { if (key === "") { @@ -26,7 +26,7 @@ function searchStatus(data: any[], key: string): any[] { } return data.filter((item) => { // button label contains info about completion status => use for search - if (key === $_("milestone.complete").toLowerCase()) { + if (key === i18n.tr.milestone.complete.toLowerCase()) { return item.complete === true; } return item.complete === false; @@ -76,9 +76,9 @@ function searchAll(data: any[], key: string): any[] { async function setup(): Promise { console.log("setup overview"); - if ($locale === undefined || $locale === null) { + if (i18n.locale === undefined || i18n.locale === null) { showAlert = true; - alertMessage = $_("userData.alertMessageError"); + alertMessage = i18n.tr.userData.alertMessageError; console.log("No locale"); return; } @@ -93,7 +93,7 @@ async function setup(): Promise { contentStore.milestoneGroupData, ); showAlert = true; - alertMessage = $_("milestone.alertMessageRetrieving"); + alertMessage = i18n.tr.milestone.alertMessageRetrieving; } else { let milestoneAnswerSession = undefined; const response = await getCurrentMilestoneAnswerSession({ @@ -103,7 +103,7 @@ async function setup(): Promise { if (response.error) { console.log("Error when retrieving milestone answer session"); showAlert = true; - alertMessage = `${$_("milestone.alertMessageRetrieving")} ${response.error.detail}`; + alertMessage = `${i18n.tr.milestone.alertMessageRetrieving} ${response.error.detail}`; return; } @@ -120,9 +120,9 @@ async function setup(): Promise { answer.answer !== undefined && answer.answer >= 0; return { - header: item?.text?.[$locale]?.title ?? "", + header: item?.text?.[i18n.locale]?.title ?? "", complete: complete, - summary: item?.text?.[$locale]?.desc ?? "", + summary: item?.text?.[i18n.locale]?.desc ?? "", events: { onclick: () => { activeTabChildren.set("milestone"); @@ -156,34 +156,34 @@ function createStyle(data: any[]) { } let showAlert = $state(false); -let alertMessage = $state($_("milestoneGroup.alertMessageError")); +let alertMessage = $state(i18n.tr.milestone.alertMessageError); const promise = setup(); let data = $state([]); const searchData = [ { - label: $_("search.allLabel"), - placeholder: $_("search.allPlaceholder"), + label: i18n.tr.search.allLabel, + placeholder: i18n.tr.search.allPlaceholder, filterFunction: searchAll, }, { - label: $_("search.statusLabel"), - placeholder: $_("search.statusPlaceholder"), + label: i18n.tr.search.statusLabel, + placeholder: i18n.tr.search.statusPlaceholder, filterFunction: searchStatus, }, { - label: $_("search.answerLabel"), - placeholder: $_("search.answerPlaceholder"), + label: i18n.tr.search.answerLabel, + placeholder: i18n.tr.search.answerPlaceholder, filterFunction: searchAnswer, }, { - label: $_("search.nameLabel"), - placeholder: $_("search.namePlaceholder"), + label: i18n.tr.search.nameLabel, + placeholder: i18n.tr.search.namePlaceholder, filterFunction: searchTitle, }, { - label: $_("search.descriptionLabel"), - placeholder: $_("search.descriptionPlaceholder"), + label: i18n.tr.search.descriptionLabel, + placeholder: i18n.tr.search.descriptionPlaceholder, filterFunction: searchDescription, }, ]; @@ -197,14 +197,14 @@ const breadcrumbdata: any[] = [ symbol: UserSettingsOutline, }, { - label: $_("milestone.groupOverviewLabel"), + label: i18n.tr.milestone.groupOverviewLabel, onclick: () => { activeTabChildren.set("milestoneGroup"); }, symbol: RectangleListOutline, }, { - label: contentStore.milestoneGroupData.text[$locale].title, + label: contentStore.milestoneGroupData.text[i18n.locale].title, onclick: () => { activeTabChildren.set("milestoneOverview"); }, @@ -214,7 +214,7 @@ const breadcrumbdata: any[] = [ {#await promise} - {$_("userData.loadingMessage")} + {i18n.tr.userData.loadingMessage} {:then} {#if showAlert} diff --git a/frontend/src/lib/components/Navigation/Footer.svelte b/frontend/src/lib/components/Navigation/Footer.svelte index 5b2888cc..9222daac 100644 --- a/frontend/src/lib/components/Navigation/Footer.svelte +++ b/frontend/src/lib/components/Navigation/Footer.svelte @@ -1,5 +1,6 @@
{item}
{$_("userData.loadingMessage")}
{i18n.tr.userData.loadingMessage}
- {$_("childData.overviewSummary")} + {i18n.tr.childData.overviewSummary}
{$_("childData.loadingMessage")}
{i18n.tr.childData.loadingMessage}
- {$_("childData.imageOfChildChangeDelete")} + {i18n.tr.childData.imageOfChildChangeDelete}
{$_('milestone.submit-image-text')}
{i18n.tr.milestone.submitImageText}
{$_("frontpageAbout.summary1")}
{$_("frontpageAbout.summary2")}
{i18n.tr.frontpageAbout.summary1}
{i18n.tr.frontpageAbout.summary2}
{@html $_('frontpageAccordion.summary1')}
{@html i18n.tr.frontpageAccordion.summary1}
{@html $_('frontpageAccordion.summary2')}
{@html i18n.tr.frontpageAccordion.summary2}
{$_("frontpage.summary")}
{i18n.tr.frontpage.summary}
{currentMilestone.text[$locale].desc}
{currentMilestone.text[i18n.locale].desc}
- {currentMilestone.text[$locale].obs} + {currentMilestone.text[i18n.locale].obs}
- {currentMilestone.text[$locale].help} + {currentMilestone.text[i18n.locale].help}
- {$_('milestone.submit-image-text')} + {i18n.tr.milestone.submitImageText}
{$_('milestone.autonext')}
{i18n.tr.milestone.autoNext}