Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Copilot code review fixes.
  • Loading branch information
sean-mcmanus committed Jun 26, 2026
commit 63112e1d53e88ecac5e3aea3793a8a85f1be30f2
8 changes: 4 additions & 4 deletions Extension/.scripts/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export async function checkPrep() {
failing = !await assertAnyFolder('dist/walkthrough') && (quiet || warn(`The walkthrough files are not in place.`)) || failing;
failing = !await assertAnyFolder('dist/html') && (quiet || warn(`The html files are not in place.`)) || failing;
failing = !await assertAnyFolder('dist/schema') && (quiet || warn(`The schema files are not in place.`)) || failing;
failing = !await assertAnyFile('l10n/bundle.l10n.json') && (quiet || warn(`The extension localization bundle '${$root}/l10n/bundle.l10n.json is missing.`)) || failing;
failing = !await assertAnyFile('l10n/bundle.l10n.json') && (quiet || warn(`The extension localization bundle '${$root}/l10n/bundle.l10n.json' is missing.`)) || failing;
failing = await checkDTS() || failing;

if (!failing) {
Expand All @@ -317,7 +317,7 @@ export async function checkPrep() {
export async function checkCompiled() {
let failing = false;
failing = await checkDTS() || failing;
failing = !await assertAnyFile('dist/src/main.js') && (quiet || warn(`The extension entry point '${$root}/dist/src/main.js is missing.`)) || failing;
failing = !await assertAnyFile('dist/src/main.js') && (quiet || warn(`The extension entry point '${$root}/dist/src/main.js' is missing.`)) || failing;

if (!failing) {
verbose('Compiled files appear to be in place.');
Expand All @@ -327,8 +327,8 @@ export async function checkCompiled() {

export async function checkDTS() {
let failing = false;
failing = !await assertAnyFile('vscode.d.ts') && (quiet || warn(`The VSCode import file '${$root}/dist/src/vscode.d.ts is missing.`)) || failing;
failing = !await assertAnyFile('vscode.proposed.terminalDataWriteEvent.d.ts') && (quiet || warn(`The VSCode import file '${$root}/dist/src/vscode.proposed.terminalDataWriteEvent.d.ts is missing.`)) || failing;
failing = !await assertAnyFile('vscode.d.ts') && (quiet || warn(`The VSCode import file '${$root}/dist/src/vscode.d.ts' is missing.`)) || failing;
failing = !await assertAnyFile('vscode.proposed.terminalDataWriteEvent.d.ts') && (quiet || warn(`The VSCode import file '${$root}/dist/src/vscode.proposed.terminalDataWriteEvent.d.ts' is missing.`)) || failing;

if (!failing) {
verbose('VSCode d.ts files appear to be in place.');
Expand Down
10 changes: 5 additions & 5 deletions Extension/.scripts/generateNativeStrings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ export async function main() {
}
typeScriptSwitchContent += ` if (stringArgs) {\n`;
if (hintValue) {
typeScriptSwitchContent += ` message = vscode.l10n.t({ message: ${JSON.stringify(stringValue)}, args: [${stringArgsList.join(", ")}], comment: [${JSON.stringify(hintValue)}] });\n break;\n }\n`;
typeScriptSwitchContent += ` message = l10n.t({ message: ${JSON.stringify(stringValue)}, args: [${stringArgsList.join(", ")}], comment: [${JSON.stringify(hintValue)}] });\n break;\n }\n`;
} else {
typeScriptSwitchContent += ` message = vscode.l10n.t(${JSON.stringify(stringValue)}, ${stringArgsList.join(", ")});\n break;\n }\n`;
typeScriptSwitchContent += ` message = l10n.t(${JSON.stringify(stringValue)}, ${stringArgsList.join(", ")});\n break;\n }\n`;
}
}
if (hintValue) {
typeScriptSwitchContent += ` message = vscode.l10n.t({ message: ${JSON.stringify(stringValue)}, comment: [${JSON.stringify(hintValue)}] });\n break;\n`;
typeScriptSwitchContent += ` message = l10n.t({ message: ${JSON.stringify(stringValue)}, comment: [${JSON.stringify(hintValue)}] });\n break;\n`;
} else {
typeScriptSwitchContent += ` message = vscode.l10n.t(${JSON.stringify(stringValue)});\n break;\n`;
typeScriptSwitchContent += ` message = l10n.t(${JSON.stringify(stringValue)});\n break;\n`;
}
}
++stringIndex;
Expand All @@ -80,7 +80,7 @@ export async function main() {

'use strict';

import * as vscode from 'vscode';
import { l10n } from 'vscode';

export const localizedStringCount: number = ${stringIndex};

Expand Down
702 changes: 351 additions & 351 deletions Extension/i18n/chs/bundle.l10n.json

Large diffs are not rendered by default.

702 changes: 351 additions & 351 deletions Extension/i18n/cht/bundle.l10n.json

Large diffs are not rendered by default.

702 changes: 351 additions & 351 deletions Extension/i18n/csy/bundle.l10n.json

Large diffs are not rendered by default.

702 changes: 351 additions & 351 deletions Extension/i18n/deu/bundle.l10n.json

Large diffs are not rendered by default.

702 changes: 351 additions & 351 deletions Extension/i18n/esn/bundle.l10n.json

Large diffs are not rendered by default.

702 changes: 351 additions & 351 deletions Extension/i18n/fra/bundle.l10n.json

Large diffs are not rendered by default.

702 changes: 351 additions & 351 deletions Extension/i18n/ita/bundle.l10n.json

Large diffs are not rendered by default.

702 changes: 351 additions & 351 deletions Extension/i18n/jpn/bundle.l10n.json

Large diffs are not rendered by default.

702 changes: 351 additions & 351 deletions Extension/i18n/kor/bundle.l10n.json

Large diffs are not rendered by default.

702 changes: 351 additions & 351 deletions Extension/i18n/plk/bundle.l10n.json

Large diffs are not rendered by default.

702 changes: 351 additions & 351 deletions Extension/i18n/ptb/bundle.l10n.json

Large diffs are not rendered by default.

702 changes: 351 additions & 351 deletions Extension/i18n/rus/bundle.l10n.json

Large diffs are not rendered by default.

702 changes: 351 additions & 351 deletions Extension/i18n/trk/bundle.l10n.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion Extension/src/Debugger/ParsedEnvironmentFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import * as vscode from 'vscode';
import * as fs from 'fs';
const l10n = vscode.l10n;

export interface Environment {
name: string;
Expand Down Expand Up @@ -69,7 +70,7 @@ export class ParsedEnvironmentFile {
// show error message if single lines cannot get parsed
let warning: string | undefined;
if (parseErrors.length !== 0) {
warning = vscode.l10n.t("Ignoring non-parsable lines in {0} {1}: ", "envFile", envFile);
warning = l10n.t("Ignoring non-parsable lines in {0} {1}: ", "envFile", envFile);
parseErrors.forEach(function (value, idx, array): void {
warning += "\"" + value + "\"" + ((idx !== array.length - 1) ? ", " : ".");
});
Expand Down
11 changes: 6 additions & 5 deletions Extension/src/Debugger/attachQuickPick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import * as vscode from 'vscode';
import * as util from '../common';
const l10n = vscode.l10n;

class RefreshButton implements vscode.QuickInputButton {
get iconPath(): { dark: vscode.Uri; light: vscode.Uri } {
Expand All @@ -18,7 +19,7 @@ class RefreshButton implements vscode.QuickInputButton {
}

get tooltip(): string {
return vscode.l10n.t("Refresh process list");
return l10n.t("Refresh process list");
}
}

Expand All @@ -31,11 +32,11 @@ export async function showQuickPick(getAttachItems: () => Promise<AttachItem[]>)
const processEntries: AttachItem[] = await getAttachItems();
return new Promise<string | undefined>((resolve, reject) => {
const quickPick: vscode.QuickPick<AttachItem> = vscode.window.createQuickPick<AttachItem>();
quickPick.title = vscode.l10n.t("Attach to process");
quickPick.title = l10n.t("Attach to process");
quickPick.canSelectMany = false;
quickPick.matchOnDescription = true;
quickPick.matchOnDetail = true;
quickPick.placeholder = vscode.l10n.t("Select the process to attach to");
quickPick.placeholder = l10n.t("Select the process to attach to");
quickPick.buttons = [new RefreshButton()];
quickPick.items = processEntries;
const disposables: vscode.Disposable[] = [];
Expand All @@ -44,7 +45,7 @@ export async function showQuickPick(getAttachItems: () => Promise<AttachItem[]>)

quickPick.onDidAccept(() => {
if (quickPick.selectedItems.length !== 1) {
reject(new Error(vscode.l10n.t("Process not selected.")));
reject(new Error(l10n.t("Process not selected.")));
}

const selectedId: string | undefined = quickPick.selectedItems[0].id;
Expand All @@ -59,7 +60,7 @@ export async function showQuickPick(getAttachItems: () => Promise<AttachItem[]>)
disposables.forEach(item => item.dispose());
quickPick.dispose();

reject(new Error(vscode.l10n.t("Process not selected.")));
reject(new Error(l10n.t("Process not selected.")));
}, undefined, disposables);

quickPick.show();
Expand Down
19 changes: 10 additions & 9 deletions Extension/src/Debugger/attachToProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import * as path from 'path';
import * as vscode from 'vscode';
import * as util from '../common';
import * as debugUtils from './utils';
const l10n = vscode.l10n;

export interface AttachItemsProvider {
getAttachItems(token?: vscode.CancellationToken): Promise<AttachItem[]>;
Expand Down Expand Up @@ -83,24 +84,24 @@ export class RemoteAttachPicker {
processes = await this.getRemoteOSAndProcesses(pipeCmd, quoteArgs);
} else if (!pipeTransport && useExtendedRemote) {
if (!miDebuggerPath || !miDebuggerServerAddress) {
throw new Error(vscode.l10n.t("{0} in debug configuration requires {1} and {2}", "useExtendedRemote", "miDebuggerPath", "miDebuggerServerAddress"));
throw new Error(l10n.t("{0} in debug configuration requires {1} and {2}", "useExtendedRemote", "miDebuggerPath", "miDebuggerServerAddress"));
}
processes = await this.getRemoteProcessesExtendedRemote(miDebuggerPath, miDebuggerServerAddress);
} else {
throw new Error(vscode.l10n.t("Chosen debug configuration does not contain {0} or {1}", "pipeTransport", "useExtendedRemote"));
throw new Error(l10n.t("Chosen debug configuration does not contain {0} or {1}", "pipeTransport", "useExtendedRemote"));
}

const attachPickOptions: vscode.QuickPickOptions = {
matchOnDetail: true,
matchOnDescription: true,
placeHolder: vscode.l10n.t("Select the process to attach to")
placeHolder: l10n.t("Select the process to attach to")
};

const item: AttachItem | undefined = await vscode.window.showQuickPick(processes, attachPickOptions);
if (item) {
return item.id;
} else {
throw new Error(vscode.l10n.t("Process not selected."));
throw new Error(l10n.t("Process not selected."));
}
}

Expand Down Expand Up @@ -152,7 +153,7 @@ export class RemoteAttachPicker {
// Processes will follow if listed
const lines: string[] = output.split(/\r?\n/);
if (lines.length === 0) {
throw new Error(vscode.l10n.t("Pipe transport failed to get OS and processes."));
throw new Error(l10n.t("Pipe transport failed to get OS and processes."));
} else {
const remoteOS: string = lines[0].replace(/[\r\n]+/g, '');

Expand All @@ -162,7 +163,7 @@ export class RemoteAttachPicker {

// Only got OS from uname
if (lines.length === 1) {
throw new Error(vscode.l10n.t("Transport attach could not obtain processes list."));
throw new Error(l10n.t("Transport attach could not obtain processes list."));
} else {
const processes: string[] = lines.slice(1);
return PsProcessParser.ParseProcessFromPsArray(processes)
Expand Down Expand Up @@ -197,16 +198,16 @@ export class RemoteAttachPicker {
}

if (!processListOutput.succeeded) {
throw new Error(vscode.l10n.t('Failed to make GDB connection: "{0}".', processListOutput.output));
throw new Error(l10n.t('Failed to make GDB connection: "{0}".', processListOutput.output));
}

if (processListOutput.outputError.length !== 0) {
throw new Error(vscode.l10n.t('Failed to make GDB connection: "{0}".', processListOutput.outputError));
throw new Error(l10n.t('Failed to make GDB connection: "{0}".', processListOutput.outputError));
}

const processes: AttachItem[] = this.parseProcessesFromInfoOsProcesses(processListOutput.output);
if (!processes || processes.length === 0) {
throw new Error(vscode.l10n.t('Failed to parse processes: "{0}".', processListOutput.output));
throw new Error(l10n.t('Failed to parse processes: "{0}".', processListOutput.output));
}
return processes;
}
Expand Down
Loading
Loading