Skip to content

Commit 427cbfa

Browse files
committed
feat: enhance i18n support in CustomTooltip component with translations for buttons
1 parent 56cfab4 commit 427cbfa

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

DashAI/front/src/components/tour/CustomTooltip.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from "react";
22
import { Box, Button, Typography } from "@mui/material";
3+
import { useTranslation } from "react-i18next";
34

45
export const CustomTooltip = ({
56
continuous,
@@ -12,6 +13,7 @@ export const CustomTooltip = ({
1213
size,
1314
isLastStep,
1415
}) => {
16+
const { t } = useTranslation(["common"]);
1517
const isInteractive = step.isInteractive;
1618

1719
return (
@@ -78,7 +80,7 @@ export const CustomTooltip = ({
7880
},
7981
}}
8082
>
81-
Back
83+
{t("common:back")}
8284
</Button>
8385
)}
8486
</Box>{" "}
@@ -95,7 +97,7 @@ export const CustomTooltip = ({
9597
},
9698
}}
9799
>
98-
Skip Tour
100+
{t("common:skipTour")}
99101
</Button>
100102
)}
101103

@@ -128,7 +130,7 @@ export const CustomTooltip = ({
128130
gap: 1,
129131
}}
130132
>
131-
{isLastStep ? "Finish" : "Next"}
133+
{isLastStep ? t("common:finish") : t("common:next")}
132134
{continuous && (
133135
<Typography
134136
component="span"

0 commit comments

Comments
 (0)