diff --git a/locales/config.js b/locales/config.js index ee952cb7..96ae9fc7 100644 --- a/locales/config.js +++ b/locales/config.js @@ -25,7 +25,8 @@ i18n debug: true, interpolation: { escapeValue: false // react already safes from xss - } + }, + // react: { useSuspense: false }, }); export default i18n; diff --git a/package-lock.json b/package-lock.json index 34b601e4..4ec8acc6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "js-base64": "^3.7.7", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-i18next": "^14.1.2", + "react-i18next": "^15.1.1", "react-resizable-layout": "^0.7.2" }, "devDependencies": { @@ -2628,9 +2628,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -4569,9 +4569,9 @@ } }, "node_modules/npm-run-all/node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz", + "integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==", "dev": true, "dependencies": { "nice-try": "^1.0.4", @@ -5001,11 +5001,11 @@ } }, "node_modules/react-i18next": { - "version": "14.1.3", - "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-14.1.3.tgz", - "integrity": "sha512-wZnpfunU6UIAiJ+bxwOiTmBOAaB14ha97MjOEnLGac2RJ+h/maIYXZuTHlmyqQVX1UVHmU1YDTQ5vxLmwfXTjw==", + "version": "15.1.1", + "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-15.1.1.tgz", + "integrity": "sha512-R/Vg9wIli2P3FfeI8o1eNJUJue5LWpFsQePCHdQDmX0Co3zkr6kdT8gAseb/yGeWbNz1Txc4bKDQuZYsC0kQfw==", "dependencies": { - "@babel/runtime": "^7.23.9", + "@babel/runtime": "^7.25.0", "html-parse-stringify": "^3.0.1" }, "peerDependencies": { diff --git a/package.json b/package.json index d60d775d..3a3ee0c2 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "js-base64": "^3.7.7", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-i18next": "^14.1.2", + "react-i18next": "^15.1.1", "react-resizable-layout": "^0.7.2" }, "devDependencies": { diff --git a/src-ui/app/App.jsx b/src-ui/app/App.jsx index ab8f49a0..dfabbafc 100644 --- a/src-ui/app/App.jsx +++ b/src-ui/app/App.jsx @@ -1,4 +1,6 @@ import { useEffect, useRef } from "react"; +import { useTranslation } from "react-i18next"; + import { useStartPython } from "@logics/useStartPython"; import { WindowTitleBar } from "./window_title_bar/WindowTitleBar"; import { MainPage } from "./main_page/MainPage"; @@ -11,6 +13,7 @@ import { useIsBackendReady } from "@logics_common"; export const App = () => { const { currentIsBackendReady } = useIsBackendReady(); const { WindowGeometryController } = useWindow(); + const { i18n } = useTranslation(); return (