From f11db110d420e1540e59d17fe7c82a2daa7e25fc Mon Sep 17 00:00:00 2001 From: NaeemDosh Date: Wed, 19 Aug 2026 08:52:37 +0500 Subject: [PATCH] =?UTF-8?q?i18n:=20fix=20type=20error=20=E2=80=94=20add=20?= =?UTF-8?q?useTranslation=20hook=20to=20MCPServerCard?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Build failed type-check: AgentEditorPage.tsx MCPServerCard used t() without the useTranslation() hook (Cannot find name 't'). Added the hook. Scanned every function the patch touches for the same class; MCPServerCard was the only real one. --- branding/i18n/end-user-i18n.patch | 64 +++++++++++++++++-------------- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/branding/i18n/end-user-i18n.patch b/branding/i18n/end-user-i18n.patch index 847414e..885143a 100644 --- a/branding/i18n/end-user-i18n.patch +++ b/branding/i18n/end-user-i18n.patch @@ -14237,7 +14237,7 @@ index 0a8b2597..24140167 100644 )} diff --git a/web/src/views/AgentEditorPage.tsx b/web/src/views/AgentEditorPage.tsx -index 9325a2e0..74847c22 100644 +index 9325a2e0..48049521 100644 --- a/web/src/views/AgentEditorPage.tsx +++ b/web/src/views/AgentEditorPage.tsx @@ -1,6 +1,7 @@ @@ -14265,7 +14265,15 @@ index 9325a2e0..74847c22 100644 , null,
-@@ -373,7 +375,7 @@ function MCPServerCard({ +@@ -311,6 +313,7 @@ function MCPServerCard({ + tools: enabledTools, + isLoading, + }: MCPServerCardProps) { ++ const { t } = useTranslation(); + const [isFolded, setIsFolded] = useState(false); + const { values, setFieldValue, getFieldMeta } = useFormikContext(); + const serverFieldName = `mcp_server_${server.id}`; +@@ -373,7 +376,7 @@ function MCPServerCard({ return ( { const rf = allRecentFiles.find( -@@ -1296,7 +1299,7 @@ export default function AgentEditorPage({ +@@ -1296,7 +1300,7 @@ export default function AgentEditorPage({ {deleteAgentModal.isOpen && ( Delete Agent -@@ -1319,7 +1322,7 @@ export default function AgentEditorPage({ +@@ -1319,7 +1323,7 @@ export default function AgentEditorPage({ @@ -14340,7 +14348,7 @@ index 9325a2e0..74847c22 100644
-@@ -1377,21 +1382,28 @@ export default function AgentEditorPage({ +@@ -1377,21 +1383,28 @@ export default function AgentEditorPage({ alignItems="start" > @@ -14374,7 +14382,7 @@ index 9325a2e0..74847c22 100644 /> -@@ -1399,7 +1411,7 @@ export default function AgentEditorPage({ +@@ -1399,7 +1412,7 @@ export default function AgentEditorPage({ -@@ -1414,13 +1426,13 @@ export default function AgentEditorPage({ +@@ -1414,13 +1427,13 @@ export default function AgentEditorPage({ } -@@ -1429,9 +1441,9 @@ export default function AgentEditorPage({ +@@ -1429,9 +1442,9 @@ export default function AgentEditorPage({ -@@ -1496,15 +1508,15 @@ export default function AgentEditorPage({ +@@ -1496,15 +1509,15 @@ export default function AgentEditorPage({ height="auto" >