diff --git a/ui/litellm-dashboard/src/components/mcp_tools/MCPSubmissionsTab.tsx b/ui/litellm-dashboard/src/components/mcp_tools/MCPSubmissionsTab.tsx index 5395c888f74..ded4f4095c5 100644 --- a/ui/litellm-dashboard/src/components/mcp_tools/MCPSubmissionsTab.tsx +++ b/ui/litellm-dashboard/src/components/mcp_tools/MCPSubmissionsTab.tsx @@ -28,29 +28,32 @@ import { } from "./MCPStandardsSettings"; import NotificationsManager from "@/components/molecules/notifications_manager"; import { useTranslation } from "react-i18next"; +import { TFunction } from "i18next"; type MCPStatus = "active" | "pending_review" | "rejected"; -const STATUS_CONFIG: Record = { +const getStatusConfig = ( + t: TFunction, +): Record => ({ active: { - label: "Active", + label: t("mcpTools.mCPSubmissionsTab.statusActive"), bg: "bg-green-50", text: "text-green-700", dot: "bg-green-500", }, pending_review: { - label: "Pending Review", + label: t("mcpTools.mCPSubmissionsTab.statusPendingReview"), bg: "bg-yellow-50", text: "text-yellow-700", dot: "bg-yellow-500", }, rejected: { - label: "Rejected", + label: t("mcpTools.mCPSubmissionsTab.statusRejected"), bg: "bg-red-50", text: "text-red-700", dot: "bg-red-500", }, -}; +}); function formatDate(value: string | null | undefined): string { if (!value) return "—"; @@ -80,11 +83,12 @@ type ConfirmDialogProps = { }; function ConfirmDialog({ action, serverName, isCurrentlyActive, onConfirm, onCancel }: ConfirmDialogProps) { + const { t } = useTranslation(); const [reviewNotes, setReviewNotes] = useState(""); const isApprove = action === "approve"; const rejectBody = isCurrentlyActive - ? "This server is currently live. Rejecting it will immediately remove it from the proxy runtime." - : "This will mark the submission as rejected."; + ? t("mcpTools.mCPSubmissionsTab.rejectBodyActive") + : t("mcpTools.mCPSubmissionsTab.rejectBodyInactive"); return (
@@ -100,15 +104,18 @@ function ConfirmDialog({ action, serverName, isCurrentlyActive, onConfirm, onCan )}

- {isApprove ? "Approve MCP Server" : "Reject MCP Server"} + {isApprove + ? t("mcpTools.mCPSubmissionsTab.confirmApproveMcpServer") + : t("mcpTools.mCPSubmissionsTab.confirmRejectMcpServer")}

- Are you sure you want to {action} "{serverName}"?{" "} - {isApprove ? "This will make it active and available for use." : rejectBody} + {t("mcpTools.mCPSubmissionsTab.confirmAreYouSure", { action })}{" "} + "{serverName}"?{" "} + {isApprove ? t("mcpTools.mCPSubmissionsTab.confirmApproveBody") : rejectBody}

{!isApprove && (