From f5738c1f59390a1a618b3df971a3144328165641 Mon Sep 17 00:00:00 2001 From: Diego Date: Fri, 7 Jun 2024 17:16:36 -0400 Subject: [PATCH] add transifex --- .../Map-mapbox/MapControls/CheckPolygonControl.tsx | 8 +++++--- .../elements/Map-mapbox/MapControls/ImageControl.tsx | 2 +- .../elements/Map-mapbox/MapControls/PolygonCheck.tsx | 5 ++++- .../elements/Map-mapbox/MapControls/SiteStatus.tsx | 4 +++- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/components/elements/Map-mapbox/MapControls/CheckPolygonControl.tsx b/src/components/elements/Map-mapbox/MapControls/CheckPolygonControl.tsx index 6006e968f..c8e1c9dfc 100644 --- a/src/components/elements/Map-mapbox/MapControls/CheckPolygonControl.tsx +++ b/src/components/elements/Map-mapbox/MapControls/CheckPolygonControl.tsx @@ -1,3 +1,4 @@ +import { useT } from "@transifex/react"; import classNames from "classnames"; import { useEffect, useState } from "react"; @@ -36,6 +37,7 @@ const CheckPolygonControl = (props: CheckSitePolygonProps) => { const [clickedValidation, setClickedValidation] = useState(false); const context = useSitePolygonData(); const sitePolygonData = context?.sitePolygonData; + const t = useT(); const { data: currentValidationSite, refetch: reloadSitePolygonValidation } = useGetV2TerrafundValidationSite< CheckedPolygon[] >( @@ -96,13 +98,13 @@ const CheckPolygonControl = (props: CheckSitePolygonProps) => { return (
- Your polygons have been updated + {t("Your polygons have been updated")}
@@ -114,7 +116,7 @@ const CheckPolygonControl = (props: CheckSitePolygonProps) => { className="flex items-center justify-between" > - Polygon Checks + {t("Polygon Checks")} - Uploaded Files + {t("Uploaded Files")} } onClose={closeModal} diff --git a/src/components/elements/Map-mapbox/MapControls/PolygonCheck.tsx b/src/components/elements/Map-mapbox/MapControls/PolygonCheck.tsx index 3b399fa5d..738685541 100644 --- a/src/components/elements/Map-mapbox/MapControls/PolygonCheck.tsx +++ b/src/components/elements/Map-mapbox/MapControls/PolygonCheck.tsx @@ -1,8 +1,11 @@ +import { useT } from "@transifex/react"; + import Icon, { IconNames } from "@/components/extensive/Icon/Icon"; import Text from "../../Text/Text"; const PolygonCheck = () => { + const t = useT(); const polygonCheckData = [ { id: "1", @@ -55,7 +58,7 @@ const PolygonCheck = () => {
- Polygon Checks + {t("Polygon Checks")} {polygonCheckData.map(polygon => (
diff --git a/src/components/elements/Map-mapbox/MapControls/SiteStatus.tsx b/src/components/elements/Map-mapbox/MapControls/SiteStatus.tsx index 046c4a327..ae96844f0 100644 --- a/src/components/elements/Map-mapbox/MapControls/SiteStatus.tsx +++ b/src/components/elements/Map-mapbox/MapControls/SiteStatus.tsx @@ -1,3 +1,4 @@ +import { useT } from "@transifex/react"; import { useState } from "react"; import ModalConfirm from "@/components/extensive/Modal/ModalConfirm"; @@ -37,6 +38,7 @@ const dropdownOptions = [ const SiteStatus = ({ record, refresh }: { record: any; refresh: any }) => { const { openModal, closeModal } = useModalContext(); const [confirmChange, setConfirmChange] = useState(true); + const t = useT(); const openFormModalHandler = (indexes: any[]) => { const optionSelected = dropdownOptions.find(option => option.value === indexes[0]); @@ -46,7 +48,7 @@ const SiteStatus = ({ record, refresh }: { record: any; refresh: any }) => { commentArea content={ - Are you sure you want to change the site status to {optionSelected?.title}? + {t("Are you sure you want to change the site status to")} {optionSelected?.title}? } onClose={closeModal}