From 9eab084ffebeeb3e955a9e2adf5c325fca09788c Mon Sep 17 00:00:00 2001 From: Daniel Jakab Date: Tue, 5 Nov 2024 11:19:15 +0100 Subject: [PATCH] Fix public folder not copied to build --- src/i18n.ts | 2 +- src/pages/Deployment/index.tsx | 4 ++-- src/{ => public}/locales/en/common.json | 0 src/{ => public}/locales/en/deployment.json | 2 +- src/{ => public}/locales/en/error.json | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename src/{ => public}/locales/en/common.json (100%) rename src/{ => public}/locales/en/deployment.json (89%) rename src/{ => public}/locales/en/error.json (100%) diff --git a/src/i18n.ts b/src/i18n.ts index 80ada17..1ae33e8 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -11,7 +11,7 @@ i18n fallbackLng: "en", ns: ["common", "error", "deployment"], backend: { - loadPath: "./locales/{{lng}}/{{ns}}.json", + loadPath: "/locales/{{lng}}/{{ns}}.json", }, }); diff --git a/src/pages/Deployment/index.tsx b/src/pages/Deployment/index.tsx index 93b5ce9..1cf2033 100644 --- a/src/pages/Deployment/index.tsx +++ b/src/pages/Deployment/index.tsx @@ -1,17 +1,17 @@ import StudyPageLayout from "@Components/Layout/StudyPageLayout"; import StudyHeader from "@Components/StudyHeader"; +import { useTranslation } from "react-i18next"; import BasicInfo from "./BasicInfo"; import Participants from "./Participants"; import InformedConsentCard from "./InformedConsentCard"; import Devices from "./Devices"; -import { useTranslation } from "react-i18next"; const Deployment = () => { const { t } = useTranslation(); const sectionName = ["Deployments", "Deployment"]; const description = t("deployment:page_description"); - + return ( diff --git a/src/locales/en/common.json b/src/public/locales/en/common.json similarity index 100% rename from src/locales/en/common.json rename to src/public/locales/en/common.json diff --git a/src/locales/en/deployment.json b/src/public/locales/en/deployment.json similarity index 89% rename from src/locales/en/deployment.json rename to src/public/locales/en/deployment.json index 58f7e98..8936906 100644 --- a/src/locales/en/deployment.json +++ b/src/public/locales/en/deployment.json @@ -28,5 +28,5 @@ "confirm": "I'm sure I want to stop it", "stop": "Stop" }, - "page_description": "\"See the detailed data of the Deployment. Select the participant for further individual data." + "page_description": "See the detailed data of the Deployment. Select the participant for further individual data." } diff --git a/src/locales/en/error.json b/src/public/locales/en/error.json similarity index 100% rename from src/locales/en/error.json rename to src/public/locales/en/error.json