Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update react-i18next config #3010

Merged
merged 2 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
"elliptic": "^6.5.4",
"events": "^3.3.0",
"html5-qrcode": "^2.3.8",
"i18next": "^22.5.1",
"i18next-browser-languagedetector": "^7.1.0",
"i18next": "^23.8.2",
"i18next-browser-languagedetector": "^7.2.0",
"liquidjs-lib": "^6.0.2-liquid.29",
"lnmessage": "^0.2.3",
"lodash.merge": "^4.6.2",
Expand All @@ -69,7 +69,7 @@
"react-confetti": "^6.1.0",
"react-dom": "^18.2.0",
"react-hot-toast": "^2.4.1",
"react-i18next": "^12.3.1",
"react-i18next": "^14.0.1",
"react-loading-skeleton": "^3.3.1",
"react-modal": "^3.16.1",
"react-qr-code": "^2.0.12",
Expand Down
1 change: 1 addition & 0 deletions src/app/components/PasswordForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export default function PasswordForm<
<TextField
autoFocus={autoFocus}
id="password"
// @ts-ignore/currently ignore
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reneaaron i was able to correct other breaking changes but this one, not yet. it always throw type safe errors. any idea why this happening?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't explain it either, must be caused by the keyPrefix being passed to the component. 🤷‍♂️

label={t("choose_password.label")}
type={passwordViewVisible ? "text" : "password"}
required
Expand Down
2 changes: 1 addition & 1 deletion src/app/screens/Bitcoin/ConfirmSignPsbt/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ function AddressPreview({
amount,
t,
}: Address & {
t: TFunction<"translation", "bitcoin.confirm_sign_psbt", "translation">;
t: TFunction<"translation", "bitcoin.confirm_sign_psbt">;
}) {
const { getFormattedSats } = useSettings();
return (
Expand Down
2 changes: 1 addition & 1 deletion src/app/screens/Liquid/ConfirmSignPset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function AddressPreview({
t,
}: LiquidAddress & {
assetInfos?: EsploraAssetInfos;
t: TFunction<"translation", "confirm_sign_pset", "translation">;
t: TFunction<"translation", "confirm_sign_pset">;
}) {
// if assetInfos is not provided, we fallback to a custom ticker based on the asset hash
const ticker = assetInfos?.ticker ?? asset.slice(0, 5).toUpperCase();
Expand Down
2 changes: 1 addition & 1 deletion src/i18next.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { resources, defaultNS } from "./i18n/i18nConfig";
import { defaultNS, resources } from "./i18n/i18nConfig";

declare module "i18next" {
interface CustomTypeOptions {
Expand Down
44 changes: 28 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,20 @@
core-js-pure "^3.20.2"
regenerator-runtime "^0.13.4"

"@babel/runtime@^7.10.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.19.4", "@babel/runtime@^7.20.6", "@babel/runtime@^7.9.2":
"@babel/runtime@^7.10.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.9.2":
version "7.20.7"
resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.7.tgz"
integrity sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==
dependencies:
regenerator-runtime "^0.13.11"

"@babel/runtime@^7.22.5", "@babel/runtime@^7.23.2":
version "7.23.9"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.9.tgz#47791a15e4603bb5f905bc0753801cf21d6345f7"
integrity sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==
dependencies:
regenerator-runtime "^0.14.0"

"@babel/template@^7.18.6", "@babel/template@^7.3.3":
version "7.18.6"
resolved "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz"
Expand Down Expand Up @@ -5387,19 +5394,19 @@ husky@^8.0.3:
resolved "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz"
integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==

i18next-browser-languagedetector@^7.1.0:
version "7.1.0"
resolved "https://registry.npmjs.org/i18next-browser-languagedetector/-/i18next-browser-languagedetector-7.1.0.tgz"
integrity sha512-cr2k7u1XJJ4HTOjM9GyOMtbOA47RtUoWRAtt52z43r3AoMs2StYKyjS3URPhzHaf+mn10hY9dZWamga5WPQjhA==
i18next-browser-languagedetector@^7.2.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/i18next-browser-languagedetector/-/i18next-browser-languagedetector-7.2.0.tgz#de0321cba6881be37d82e20e4d6f05aa75f6e37f"
integrity sha512-U00DbDtFIYD3wkWsr2aVGfXGAj2TgnELzOX9qv8bT0aJtvPV9CRO77h+vgmHFBMe7LAxdwvT/7VkCWGya6L3tA==
dependencies:
"@babel/runtime" "^7.19.4"
"@babel/runtime" "^7.23.2"

i18next@^22.5.1:
version "22.5.1"
resolved "https://registry.npmjs.org/i18next/-/i18next-22.5.1.tgz"
integrity sha512-8TGPgM3pAD+VRsMtUMNknRz3kzqwp/gPALrWMsDnmC1mKqJwpWyooQRLMcbTwq8z8YwSmuj+ZYvc+xCuEpkssA==
i18next@^23.8.2:
version "23.8.2"
resolved "https://registry.yarnpkg.com/i18next/-/i18next-23.8.2.tgz#f3ff6ea929e0927d9717f0ed195ae46d05919900"
integrity sha512-Z84zyEangrlERm0ZugVy4bIt485e/H8VecGUZkZWrH7BDePG6jT73QdL9EA1tRTTVVMpry/MgWIP1FjEn0DRXA==
dependencies:
"@babel/runtime" "^7.20.6"
"@babel/runtime" "^7.23.2"

iconv-lite@0.4.24, iconv-lite@^0.4.24:
version "0.4.24"
Expand Down Expand Up @@ -8201,12 +8208,12 @@ react-hot-toast@^2.4.1:
dependencies:
goober "^2.1.10"

react-i18next@^12.3.1:
version "12.3.1"
resolved "https://registry.npmjs.org/react-i18next/-/react-i18next-12.3.1.tgz"
integrity sha512-5v8E2XjZDFzK7K87eSwC7AJcAkcLt5xYZ4+yTPDAW1i7C93oOY1dnr4BaQM7un4Hm+GmghuiPvevWwlca5PwDA==
react-i18next@^14.0.1:
version "14.0.1"
resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-14.0.1.tgz#75351b25be076ad7391360b5a111b59ca87e0b63"
integrity sha512-TMV8hFismBmpMdIehoFHin/okfvgjFhp723RYgIqB4XyhDobVMyukyM3Z8wtTRmajyFMZrBl/OaaXF2P6WjUAw==
dependencies:
"@babel/runtime" "^7.20.6"
"@babel/runtime" "^7.22.5"
html-parse-stringify "^3.0.1"

react-is@^16.13.1:
Expand Down Expand Up @@ -8404,6 +8411,11 @@ regenerator-runtime@^0.13.11, regenerator-runtime@^0.13.4:
resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz"
integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==

regenerator-runtime@^0.14.0:
version "0.14.1"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f"
integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==

regexp.prototype.flags@^1.4.3, regexp.prototype.flags@^1.5.0:
version "1.5.0"
resolved "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz"
Expand Down
Loading