refactor: move from next-international to next-intl (#1368)

* refactor: move from next-international to next-intl

* refactor: restructure translation package,

* chore: change i18n-allay framework to next-intl

* fix: add missing bold html tag to translation

* fix: format issue

* fix: address deepsource issues

* fix: remove international-types dependency

* fix: lint and typecheck issues

* fix: typecheck issue

* fix: typecheck issue

* fix: issue with translations
This commit is contained in:
Meier Lukas
2024-10-26 22:46:14 +02:00
committed by GitHub
parent db198c6dab
commit 4502569223
33 changed files with 331 additions and 160 deletions

99
pnpm-lock.yaml generated
View File

@@ -1389,15 +1389,24 @@ importers:
packages/translation:
dependencies:
'@homarr/common':
specifier: workspace:^0.1.0
version: link:../common
dayjs:
specifier: ^1.11.13
version: 1.11.13
mantine-react-table:
specifier: 2.0.0-beta.7
version: 2.0.0-beta.7(@mantine/core@7.13.4(@mantine/hooks@7.13.4(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/dates@7.13.4(@mantine/core@7.13.4(@mantine/hooks@7.13.4(react@18.3.1))(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.13.4(react@18.3.1))(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@mantine/hooks@7.13.4(react@18.3.1))(@tabler/icons-react@3.20.0(react@18.3.1))(clsx@2.1.1)(dayjs@1.11.13)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
next-international:
specifier: ^1.2.4
version: 1.2.4
next:
specifier: ^14.2.16
version: 14.2.16(@babel/core@7.25.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.80.4)
next-intl:
specifier: 3.23.2
version: 3.23.2(next@14.2.16(@babel/core@7.25.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.80.4))(react@18.3.1)
react:
specifier: ^18.3.1
version: 18.3.1
devDependencies:
'@homarr/eslint-config':
specifier: workspace:^0.2.0
@@ -2654,6 +2663,21 @@ packages:
'@floating-ui/utils@0.2.8':
resolution: {integrity: sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==}
'@formatjs/ecma402-abstract@2.2.0':
resolution: {integrity: sha512-IpM+ev1E4QLtstniOE29W1rqH9eTdx5hQdNL8pzrflMj/gogfaoONZqL83LUeQScHAvyMbpqP5C9MzNf+fFwhQ==}
'@formatjs/fast-memoize@2.2.1':
resolution: {integrity: sha512-XS2RcOSyWxmUB7BUjj3mlPH0exsUzlf6QfhhijgI941WaJhVxXQ6mEWkdUFIdnKi3TuTYxRdelsgv3mjieIGIA==}
'@formatjs/icu-messageformat-parser@2.8.0':
resolution: {integrity: sha512-r2un3fmF9oJv3mOkH+wwQZ037VpqmdfahbcCZ9Lh+p6Sx+sNsonI7Zcr6jNMm1s+Si7ejQORS4Ezlh05mMPAXA==}
'@formatjs/icu-skeleton-parser@1.8.4':
resolution: {integrity: sha512-LMQ1+Wk1QSzU4zpd5aSu7+w5oeYhupRwZnMQckLPRYhSjf2/8JWQ882BauY9NyHxs5igpuQIXZDgfkaH3PoATg==}
'@formatjs/intl-localematcher@0.5.5':
resolution: {integrity: sha512-t5tOGMgZ/i5+ALl2/offNqAQq/lfUnKLEw0mXQI4N4bqpedhrSE+fyKLpwnd22sK0dif6AV+ufQcTsKShB9J1g==}
'@hapi/bourne@3.0.0':
resolution: {integrity: sha512-Waj1cwPXJDucOib4a3bAISsKJVb15MKi9IvmTI/7ssVEm6sywXGjVJDhl6/umt1pK1ZS7PacXU3A1PmFKHEZ2w==}
@@ -5472,8 +5496,8 @@ packages:
resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==}
engines: {node: '>= 0.4'}
international-types@0.8.1:
resolution: {integrity: sha512-tajBCAHo4I0LIFlmQ9ZWfjMWVyRffzuvfbXCd6ssFt5u1Zw15DN0UBpVTItXdNa1ls+cpQt3Yw8+TxsfGF8JcA==}
intl-messageformat@10.7.1:
resolution: {integrity: sha512-xQuJW2WcyzNJZWUu5xTVPOmNSA1Sowuu/NKFdUid5Fxx/Yl6/s4DefTU/y7zy+irZLDmFGmTLtnM8FqpN05wlA==}
invariant@2.2.4:
resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==}
@@ -6128,8 +6152,11 @@ packages:
nodemailer:
optional: true
next-international@1.2.4:
resolution: {integrity: sha512-JQvp+h2iSgA/t8hu5S/Lwow1ZErJutQRdpnplxjv4VTlCiND8T95fYih8BjkHcVhQbtM+Wu9Mb1CM32wD9hlWQ==}
next-intl@3.23.2:
resolution: {integrity: sha512-SCYEG2i0kYz+OupN6+qH9T+GDRfLCmJuT835uI9ac7AOlYCUbBizj28cti+oGhDkIjueZrweVw7iEiTkqCpKpQ==}
peerDependencies:
next: ^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0
react: ^16.8.0 || ^17.0.0 || ^18.0.0
next@14.2.16:
resolution: {integrity: sha512-LcO7WnFu6lYSvCzZoo1dB+IO0xXz5uEv52HF1IUN0IqVTUIZGHuuR10I5efiLadGt+4oZqTcNZyVVEem/TM5nA==}
@@ -7008,9 +7035,6 @@ packages:
serialize-javascript@6.0.2:
resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==}
server-only@0.0.1:
resolution: {integrity: sha512-qepMx2JxAa5jjfzxG79yPPq+8BuFToHd1hm7kI+Z4zAq1ftQiP7HcxMhDDItrbtwVeLg/cY2JnKnrcFkmiswNA==}
set-blocking@2.0.0:
resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==}
@@ -7717,6 +7741,11 @@ packages:
peerDependencies:
react: '>=16.13'
use-intl@3.23.2:
resolution: {integrity: sha512-lrKb5M6zr9YoHK+OuUsRApPPNEMHX8ntx0PDGZ0fxlMmj6W2u/3y++UB4uE/o0C8Jyn7oiHCjShYjgPjDaB1cg==}
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0
use-isomorphic-layout-effect@1.1.2:
resolution: {integrity: sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==}
peerDependencies:
@@ -8767,6 +8796,31 @@ snapshots:
'@floating-ui/utils@0.2.8': {}
'@formatjs/ecma402-abstract@2.2.0':
dependencies:
'@formatjs/fast-memoize': 2.2.1
'@formatjs/intl-localematcher': 0.5.5
tslib: 2.7.0
'@formatjs/fast-memoize@2.2.1':
dependencies:
tslib: 2.7.0
'@formatjs/icu-messageformat-parser@2.8.0':
dependencies:
'@formatjs/ecma402-abstract': 2.2.0
'@formatjs/icu-skeleton-parser': 1.8.4
tslib: 2.7.0
'@formatjs/icu-skeleton-parser@1.8.4':
dependencies:
'@formatjs/ecma402-abstract': 2.2.0
tslib: 2.7.0
'@formatjs/intl-localematcher@0.5.5':
dependencies:
tslib: 2.7.0
'@hapi/bourne@3.0.0': {}
'@homarr/gridstack@1.0.3': {}
@@ -12168,7 +12222,12 @@ snapshots:
hasown: 2.0.2
side-channel: 1.0.6
international-types@0.8.1: {}
intl-messageformat@10.7.1:
dependencies:
'@formatjs/ecma402-abstract': 2.2.0
'@formatjs/fast-memoize': 2.2.1
'@formatjs/icu-messageformat-parser': 2.8.0
tslib: 2.7.0
invariant@2.2.4:
dependencies:
@@ -12796,11 +12855,13 @@ snapshots:
next: 14.2.16(@babel/core@7.25.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.80.4)
react: 18.3.1
next-international@1.2.4:
next-intl@3.23.2(next@14.2.16(@babel/core@7.25.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.80.4))(react@18.3.1):
dependencies:
client-only: 0.0.1
international-types: 0.8.1
server-only: 0.0.1
'@formatjs/intl-localematcher': 0.5.5
negotiator: 0.6.3
next: 14.2.16(@babel/core@7.25.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.80.4)
react: 18.3.1
use-intl: 3.23.2(react@18.3.1)
next@14.2.16(@babel/core@7.25.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass@1.80.4):
dependencies:
@@ -13815,8 +13876,6 @@ snapshots:
dependencies:
randombytes: 2.1.0
server-only@0.0.1: {}
set-blocking@2.0.0: {}
set-function-length@1.2.2:
@@ -14631,6 +14690,12 @@ snapshots:
dequal: 2.0.3
react: 18.3.1
use-intl@3.23.2(react@18.3.1):
dependencies:
'@formatjs/fast-memoize': 2.2.1
intl-messageformat: 10.7.1
react: 18.3.1
use-isomorphic-layout-effect@1.1.2(@types/react@18.3.12)(react@18.3.1):
dependencies:
react: 18.3.1