Localize button

This commit is contained in:
Andrew Branch
2025-04-28 10:08:33 -07:00
parent 5732011d9a
commit dc2c318570

View File

@@ -30,17 +30,17 @@ async function updateTsgoSetting(enable: boolean): Promise<void> {
const tsgoExtension = vscode.extensions.getExtension('typescript.typescript-lsp');
// Error if the TypeScript Go extension is not installed with a button to open the GitHub repo
if (!tsgoExtension) {
return vscode.window.showErrorMessage(
const selection = await vscode.window.showErrorMessage(
vscode.l10n.t('The TypeScript Go extension is not installed.'),
{
title: 'Open on GitHub',
title: vscode.l10n.t('Open on GitHub'),
isCloseAffordance: true,
}
).then(async (selection) => {
if (selection) {
await vscode.env.openExternal(vscode.Uri.parse('https://github.com/microsoft/typescript-go'));
}
});
);
if (selection) {
await vscode.env.openExternal(vscode.Uri.parse('https://github.com/microsoft/typescript-go'));
}
}
const tsConfig = vscode.workspace.getConfiguration('typescript');