Skip to content

Commit

Permalink
add transifex
Browse files Browse the repository at this point in the history
  • Loading branch information
diego-morales-flores-1996 committed Jun 7, 2024
1 parent de4f2bf commit f5738c1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useT } from "@transifex/react";
import classNames from "classnames";
import { useEffect, useState } from "react";

Expand Down Expand Up @@ -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[]
>(
Expand Down Expand Up @@ -96,13 +98,13 @@ const CheckPolygonControl = (props: CheckSitePolygonProps) => {
return (
<div className="grid gap-2">
<div className="rounded-lg bg-[#ffffff26] p-3 text-center text-white backdrop-blur-md">
<Text variant="text-10-light">Your polygons have been updated</Text>
<Text variant="text-10-light">{t("Your polygons have been updated")}</Text>
<Button
variant="text"
className="text-10-bold my-2 flex w-full justify-center rounded-lg border border-tertiary-600 bg-tertiary-600 p-2 hover:border-white"
onClick={() => setClickedValidation(true)}
>
Check Polygons
{t("Check Polygons")}
</Button>
</div>
<div className="relative flex w-[231px] flex-col gap-2 rounded-xl p-3">
Expand All @@ -114,7 +116,7 @@ const CheckPolygonControl = (props: CheckSitePolygonProps) => {
className="flex items-center justify-between"
>
<Text variant="text-10-bold" className="text-white">
Polygon Checks
{t("Polygon Checks")}
</Text>
<Icon
name={IconNames.CHEVRON_DOWN}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const ImageControl = ({
descriptionInput="Drag and drop a geotagged or non-geotagged PNG, GIF or JPEG for your site Tannous/Brayton Road.."
descriptionList={
<Text variant="text-12-bold" className="mt-9 ">
Uploaded Files
{t("Uploaded Files")}
</Text>
}
onClose={closeModal}
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -55,7 +58,7 @@ const PolygonCheck = () => {
<div className="relative flex w-[231px] flex-col gap-2 rounded-xl p-3">
<div className="absolute top-0 left-0 -z-10 h-full w-full rounded-xl bg-[#FFFFFF33] backdrop-blur-md" />
<Text variant="text-10-bold" className="text-white">
Polygon Checks
{t("Polygon Checks")}
</Text>
{polygonCheckData.map(polygon => (
<div key={polygon.id} className="flex items-center gap-2">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useT } from "@transifex/react";
import { useState } from "react";

import ModalConfirm from "@/components/extensive/Modal/ModalConfirm";
Expand Down Expand Up @@ -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]);
Expand All @@ -46,7 +48,7 @@ const SiteStatus = ({ record, refresh }: { record: any; refresh: any }) => {
commentArea
content={
<Text variant="text-14-light" className="text-center">
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}?
</Text>
}
onClose={closeModal}
Expand Down

0 comments on commit f5738c1

Please sign in to comment.