Skip to content

Commit 4a68683

Browse files
committed
give localize() the string literal it desires
1 parent 6704c47 commit 4a68683

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Extension/src/LanguageServer/extension.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,11 +1489,10 @@ async function onCopilotHover(): Promise<void> {
14891489
}
14901490

14911491
async function reportCopilotFailure(copilotHoverProvider: CopilotHoverProvider, hoverDocument: vscode.TextDocument, hoverPosition: vscode.Position, customError?: string): Promise<void> {
1492-
const defaultError: string = "An error occurred while generating Copilot summary.";
1493-
const errorMessage = customError ? customError : defaultError;
1494-
telemetry.logLanguageServerEvent("CopilotHoverError", { errorMessage });
1492+
const errorMessage = customError ? customError : "";
1493+
telemetry.logLanguageServerEvent("CopilotHoverError", { "ErrorMessage": errorMessage });
14951494
// Display the localized default failure message in the hover.
1496-
await showCopilotContent(copilotHoverProvider, hoverDocument, hoverPosition, localize("copilot.hover.error", defaultError));
1495+
await showCopilotContent(copilotHoverProvider, hoverDocument, hoverPosition, localize("copilot.hover.error", "An error occurred while generating Copilot summary."));
14971496
}
14981497

14991498
async function showCopilotContent(copilotHoverProvider: CopilotHoverProvider, hoverDocument: vscode.TextDocument, hoverPosition: vscode.Position, content?: string): Promise<boolean> {

0 commit comments

Comments
 (0)