Skip to content

Commit 35c255a

Browse files
committed
fix: remove fallback English strings from MCP error translations
As requested by @mrubens, removed the || operator and fallback English strings from: - t("mcp:errors.disconnect_servers_partial") - t("mcp:errors.refresh_after_disable") - t("mcp:errors.refresh_after_enable") The translation system will now rely solely on the localized strings without fallbacks.
1 parent 30cbce4 commit 35c255a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/services/mcp/McpHub.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,8 +1775,7 @@ export class McpHub {
17751775
t("mcp:errors.disconnect_servers_partial", {
17761776
count: disconnectionErrors.length,
17771777
errors: errorSummary,
1778-
}) ||
1779-
`Failed to disconnect ${disconnectionErrors.length} MCP server(s). Check the output for details.`,
1778+
}),
17801779
)
17811780
}
17821781

@@ -1785,19 +1784,15 @@ export class McpHub {
17851784
await this.refreshAllConnections()
17861785
} catch (error) {
17871786
console.error(`Failed to refresh MCP connections after disabling: ${error}`)
1788-
vscode.window.showErrorMessage(
1789-
t("mcp:errors.refresh_after_disable") || "Failed to refresh MCP connections after disabling",
1790-
)
1787+
vscode.window.showErrorMessage(t("mcp:errors.refresh_after_disable"))
17911788
}
17921789
} else {
17931790
// If MCP is being enabled, reconnect all servers
17941791
try {
17951792
await this.refreshAllConnections()
17961793
} catch (error) {
17971794
console.error(`Failed to refresh MCP connections after enabling: ${error}`)
1798-
vscode.window.showErrorMessage(
1799-
t("mcp:errors.refresh_after_enable") || "Failed to refresh MCP connections after enabling",
1800-
)
1795+
vscode.window.showErrorMessage(t("mcp:errors.refresh_after_enable"))
18011796
}
18021797
}
18031798
}

0 commit comments

Comments
 (0)