Internationalization

This commit is contained in:
mohadeseh safari committed 2025-04-11 12:45:21 -04:00
1 parent 3748df9b64
commit db318c8ea8
4 files changed
+17 -6

No files matched your search

+5 -3
View File
@@ -8,6 +8,7 @@ import Check from "../Check/Check";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
import Alert from "../Alert"; import Alert from "../Alert";
import { useTranslation } from "react-i18next";
import "./index.css"; import "./index.css";
/** /**
@@ -25,12 +26,13 @@ const Fallback = ({ title, checks, link = "/", isAdmin, vowelStart = false }) =>
const theme = useTheme(); const theme = useTheme();
const navigate = useNavigate(); const navigate = useNavigate();
const mode = useSelector((state) => state.ui.mode); const mode = useSelector((state) => state.ui.mode);
const { t } = useTranslation();
// Custom warning message with clickable link // Custom warning message with clickable link
const renderWarningMessage = () => { const renderWarningMessage = () => {
return ( return (
<> <>
Warning: You haven't added a Google PageSpeed API key. Without it, the PageSpeed monitor won't function. {" "} {t("pageSpeedWarning")} {" "}
<Link <Link
href="https://docs.checkmate.so/users-guide/quickstart#env-vars-server" href="https://docs.checkmate.so/users-guide/quickstart#env-vars-server"
target="_blank" target="_blank"
@@ -43,9 +45,9 @@ const Fallback = ({ title, checks, link = "/", isAdmin, vowelStart = false }) =>
} }
}} }}
> >
Click here to learn {t("pageSpeedLearnMore")}
</Link> </Link>
{" "}how to add your API key. {" "} {t("pageSpeedAddApiKey")}
</> </>
); );
}; };
+4 -1
View File
@@ -375,5 +375,8 @@
"infrastructureMonitorUpdated": "Infrastructure monitor updated successfully!", "infrastructureMonitorUpdated": "Infrastructure monitor updated successfully!",
"errorInvalidTypeId": "Invalid notification type provided", "errorInvalidTypeId": "Invalid notification type provided",
"errorInvalidFieldId": "Invalid field ID 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": "", "uptimeCreate": "",
"uptimeCreateJsonPath": "", "uptimeCreateJsonPath": "",
"uptimeCreateJsonPathQuery": "", "uptimeCreateJsonPathQuery": "",
"maintenanceTableActionMenuDialogTitle": "" "maintenanceTableActionMenuDialogTitle": "",
"pageSpeedWarning": "Предупреждение: Вы не добавили ключ API Google PageSpeed. Без него монитор PageSpeed не будет работать.",
"pageSpeedLearnMore": "Нажмите здесь, чтобы узнать",
"pageSpeedAddApiKey": "как добавить ваш ключ API."
} }
+4 -1
View File
@@ -375,5 +375,8 @@
"infrastructureMonitorUpdated": "", "infrastructureMonitorUpdated": "",
"errorInvalidTypeId": "", "errorInvalidTypeId": "",
"errorInvalidFieldId": "", "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."
} }