diff --git a/frontend/astro-i18next.config.mjs b/frontend/astro-i18next.config.mjs index de2ac8a7f..74d81006d 100644 --- a/frontend/astro-i18next.config.mjs +++ b/frontend/astro-i18next.config.mjs @@ -5,7 +5,14 @@ const languages = getLanguages(false); /** @type {import('astro-i18next').AstroI18nextConfig} */ export default { locales: languages, - namespaces: ["about", "faq", "testimonials", "translation", "contribute"], + namespaces: [ + "about", + "faq", + "testimonials", + "translation", + "contribute", + "survey", + ], defaultNamespace: "translation", load: ["server", "client"], // load i18next server and client side i18nextServerPlugins: { diff --git a/frontend/public/locales/en/survey.json b/frontend/public/locales/en/survey.json new file mode 100644 index 000000000..72ff16e3a --- /dev/null +++ b/frontend/public/locales/en/survey.json @@ -0,0 +1,5 @@ +{ + "title": "Can we please ask you some questions?", + "body": "We are very curious how you experience the Clothing Loop! It only takes about five minutes to fill in our short survey. Your answers will be of great help to us.", + "btnSubmit": "Form" +} diff --git a/frontend/public/locales/nl/survey.json b/frontend/public/locales/nl/survey.json new file mode 100644 index 000000000..8cd580f0d --- /dev/null +++ b/frontend/public/locales/nl/survey.json @@ -0,0 +1,5 @@ +{ + "title": "Mogen we je een paar vragen stellen?", + "body": "We zijn erg benieuwd hoe jij de Clothing Loop ervaart! Het duurt slechts vijf minuten om onze korte enquête in te vullen. Jouw mening is belangrijk voor ons!", + "btnSubmit": "Enquête" +} diff --git a/frontend/src/components/react/components/PopupForm.tsx b/frontend/src/components/react/components/PopupForm.tsx index 27cae1092..45ed719d5 100644 --- a/frontend/src/components/react/components/PopupForm.tsx +++ b/frontend/src/components/react/components/PopupForm.tsx @@ -7,7 +7,7 @@ const maxDate = new Date(2024, 6, 1); const url = "http://google.com"; export default function PopupForm() { - const { t } = useTranslation(); + const { t } = useTranslation("survey"); const [open, setOpen] = useState(false); useEffect(() => { if (isSSR()) return; @@ -40,28 +40,23 @@ export default function PopupForm() {

- Lorem, ipsum dolor sit amet consectetur + {t("title")}

-

- Lorem, ipsum dolor sit amet consectetur adipisicing elit. Doloribus, - aperiam eligendi neque aliquam error voluptatibus commodi, - distinctio hic facere in vitae facilis vero magnam similique! - Mollitia saepe blanditiis veritatis magnam. -

+

{t("body")}