Internationalization

This commit is contained in:
mohadeseh safari
2025-04-11 12:45:21 -04:00
parent 3748df9b64
commit db318c8ea8
4 changed files with 17 additions and 6 deletions
+5 -3
View File
@@ -8,6 +8,7 @@ import Check from "../Check/Check";
import { useNavigate } from "react-router-dom";
import { useSelector } from "react-redux";
import Alert from "../Alert";
import { useTranslation } from "react-i18next";
import "./index.css";
/**
@@ -25,12 +26,13 @@ const Fallback = ({ title, checks, link = "/", isAdmin, vowelStart = false }) =>
const theme = useTheme();
const navigate = useNavigate();
const mode = useSelector((state) => state.ui.mode);
const { t } = useTranslation();
// Custom warning message with clickable link
const renderWarningMessage = () => {
return (
<>
Warning: You haven't added a Google PageSpeed API key. Without it, the PageSpeed monitor won't function. {" "}
{t("pageSpeedWarning")} {" "}
<Link
href="https://docs.checkmate.so/users-guide/quickstart#env-vars-server"
target="_blank"
@@ -43,9 +45,9 @@ const Fallback = ({ title, checks, link = "/", isAdmin, vowelStart = false }) =>
}
}}
>
Click here to learn
{t("pageSpeedLearnMore")}
</Link>
{" "}how to add your API key.
{" "} {t("pageSpeedAddApiKey")}
</>
);
};
+4 -1
View File
@@ -375,5 +375,8 @@
"infrastructureMonitorUpdated": "Infrastructure monitor updated successfully!",
"errorInvalidTypeId": "Invalid notification type provided",
"errorInvalidFieldId": "Invalid field ID provided",
"inviteNoTokenFound": "No invite token found"
"inviteNoTokenFound": "No invite token found",
"pageSpeedWarning": "Warning: You haven't added a Google PageSpeed API key. Without it, the PageSpeed monitor won't function.",
"pageSpeedLearnMore": "Click here to learn",
"pageSpeedAddApiKey": "how to add your API key."
}
+4 -1
View File
@@ -360,5 +360,8 @@
"uptimeCreate": "",
"uptimeCreateJsonPath": "",
"uptimeCreateJsonPathQuery": "",
"maintenanceTableActionMenuDialogTitle": ""
"maintenanceTableActionMenuDialogTitle": "",
"pageSpeedWarning": "Предупреждение: Вы не добавили ключ API Google PageSpeed. Без него монитор PageSpeed не будет работать.",
"pageSpeedLearnMore": "Нажмите здесь, чтобы узнать",
"pageSpeedAddApiKey": "как добавить ваш ключ API."
}
+4 -1
View File
@@ -375,5 +375,8 @@
"infrastructureMonitorUpdated": "",
"errorInvalidTypeId": "",
"errorInvalidFieldId": "",
"inviteNoTokenFound": ""
"inviteNoTokenFound": "",
"pageSpeedWarning": "Uyarı: Google PageSpeed API anahtarı eklemediniz. Bu olmadan, PageSpeed monitörü çalışmayacaktır.",
"pageSpeedLearnMore": "API anahtarınızı nasıl ekleyeceğinizi",
"pageSpeedAddApiKey": "öğrenmek için buraya tıklayın."
}