Strings localizations

This commit is contained in:
Br0wnHammer committed 2025-07-04 22:24:59 +05:30
1 parent 8a4fba056b
commit 847c7630ec
2 files changed
+9 -2

No files matched your search

+5 -2
View File
@@ -1,6 +1,7 @@
import { useState, useEffect } from "react";
import { networkService } from "../main";
import { createToast } from "../Utils/toastUtils";
import { useTranslation } from "react-i18next";
const useFetchChecksTeam = ({
status,
@@ -164,6 +165,7 @@ const useFetchChecksSummaryByTeamId = ({ updateTrigger } = {}) => {
const useResolveIncident = () => {
const [isLoading, setIsLoading] = useState(false);
const { t } = useTranslation();
const resolveIncident = async (checkId, setUpdateTrigger) => {
try {
@@ -174,7 +176,7 @@ const useResolveIncident = () => {
});
setUpdateTrigger((prev) => !prev);
} catch (error) {
createToast({ body: "Failed to resolve incident." });
createToast({ body: t("checkHooks.failureResolveOne") });
} finally {
setIsLoading(false);
}
@@ -185,6 +187,7 @@ const useResolveIncident = () => {
const useAckAllChecks = () => {
const [isLoading, setIsLoading] = useState(false);
const { t } = useTranslation();
const ackAllChecks = async (setUpdateTrigger) => {
try {
@@ -192,7 +195,7 @@ const useAckAllChecks = () => {
await networkService.updateAllChecksStatus({ ack: true });
setUpdateTrigger((prev) => !prev);
} catch (error) {
createToast({ body: "Failed to resolve all incidents." });
createToast({ body: t("checkHooks.failureResolveAll") });
} finally {
setIsLoading(false);
}
+4
View File
@@ -516,6 +516,10 @@
"monitorStatusUp": "Monitor {name} ({url}) is now UP and responding",
"monitors": "monitors",
"monitorsToApply": "Monitors to apply maintenance window to",
"checkHooks": {
"failureResolveOne": "Failed to resolve incident.",
"failureResolveAll": "Failed to resolve all incidents."
},
"ms": "ms",
"navControls": "Controls",
"nextWindow": "Next window",