@microsoft/vscode-azext-utils
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -8,3 +8,3 @@ "use strict"; | ||
exports.ExecuteActivity = void 0; | ||
const localize_1 = require("../../localize"); | ||
const vscode = require("vscode"); | ||
const GenericTreeItem_1 = require("../../tree/GenericTreeItem"); | ||
@@ -30,3 +30,3 @@ const Activity_1 = require("../Activity"); | ||
contextValue: 'executeResult', | ||
label: (0, localize_1.localize)("clickToView", "Click to view resource"), | ||
label: vscode.l10n.t("Click to view resource"), | ||
commandId: 'azureResourceGroups.revealResource', | ||
@@ -54,3 +54,3 @@ }); | ||
var _a; | ||
return (_a = this.context.activityTitle) !== null && _a !== void 0 ? _a : (0, localize_1.localize)('azureActivity', "Azure Activity"); | ||
return (_a = this.context.activityTitle) !== null && _a !== void 0 ? _a : vscode.l10n.t("Azure Activity"); | ||
} | ||
@@ -57,0 +57,0 @@ } |
@@ -20,5 +20,4 @@ "use strict"; | ||
const callWithTelemetryAndErrorHandling_1 = require("./callWithTelemetryAndErrorHandling"); | ||
const localize_1 = require("./localize"); | ||
const nonNull_1 = require("./utils/nonNull"); | ||
const unsupportedError = new Error((0, localize_1.localize)('notSupported', 'This operation is not supported.')); | ||
const unsupportedError = new Error(vscode_1.l10n.t('This operation is not supported.')); | ||
class AzExtTreeFileSystem { | ||
@@ -25,0 +24,0 @@ constructor() { |
@@ -20,3 +20,2 @@ "use strict"; | ||
const extensionVariables_1 = require("./extensionVariables"); | ||
const localize_1 = require("./localize"); | ||
const masking_1 = require("./masking"); | ||
@@ -166,7 +165,7 @@ const parseError_1 = require("./parseError"); | ||
// Always append the error to the output channel, but only 'show' the output channel for multiline errors | ||
extensionVariables_1.ext.outputChannel.appendLog((0, localize_1.localize)('outputError', 'Error: {0}', unMaskedMessage)); | ||
extensionVariables_1.ext.outputChannel.appendLog(vscode_1.l10n.t('Error: {0}', unMaskedMessage)); | ||
let message; | ||
if (unMaskedMessage.includes('\n')) { | ||
extensionVariables_1.ext.outputChannel.show(); | ||
message = (0, localize_1.localize)('multilineError', 'An error has occured. Check output window for more details.'); | ||
message = vscode_1.l10n.t('An error has occured. Check output window for more details.'); | ||
} | ||
@@ -173,0 +172,0 @@ else { |
@@ -9,4 +9,3 @@ "use strict"; | ||
const vscode_1 = require("vscode"); | ||
const localize_1 = require("./localize"); | ||
exports.learnMore = (0, localize_1.localize)('learnMore', "Learn more"); | ||
exports.learnMore = vscode_1.l10n.t("Learn more"); | ||
exports.azToolsPrefix = "azureTools"; | ||
@@ -13,0 +12,0 @@ exports.showContextValueSetting = "showContextValues"; |
@@ -9,5 +9,5 @@ "use strict"; | ||
const semver = require("semver"); | ||
const vscode = require("vscode"); | ||
const callWithTelemetryAndErrorHandling_1 = require("./callWithTelemetryAndErrorHandling"); | ||
const getPackageInfo_1 = require("./getPackageInfo"); | ||
const localize_1 = require("./localize"); | ||
function isAzureExtensionApiFactory(maybeAzureExtensionApiFactory) { | ||
@@ -19,3 +19,3 @@ return maybeAzureExtensionApiFactory.createApi !== undefined; | ||
if (!semver.valid(azExt.apiVersion)) { | ||
throw new Error((0, localize_1.localize)('invalidVersion', 'Invalid semver "{0}".', azExt.apiVersion)); | ||
throw new Error(vscode.l10n.t('Invalid semver "{0}".', azExt.apiVersion)); | ||
} | ||
@@ -66,3 +66,3 @@ } | ||
// This case will hopefully never happen if we maintain backwards compat | ||
message = (0, localize_1.localize)('notSupported', 'API version "{0}" for extension id "{1}" is no longer supported. Minimum version is "{2}".', apiVersionRange, extensionId, minApiVersion); | ||
message = vscode.l10n.t('API version "{0}" for extension id "{1}" is no longer supported. Minimum version is "{2}".', apiVersionRange, extensionId, minApiVersion); | ||
code = 'NoLongerSupported'; | ||
@@ -72,3 +72,3 @@ } | ||
// This case is somewhat likely - so keep the error message simple and just tell user to update their extenion | ||
message = (0, localize_1.localize)('updateExtension', 'Extension dependency with id "{0}" must be updated.', extensionId); | ||
message = vscode.l10n.t('Extension dependency with id "{0}" must be updated.', extensionId); | ||
code = 'NotYetSupported'; | ||
@@ -75,0 +75,0 @@ } |
@@ -8,18 +8,18 @@ "use strict"; | ||
exports.DialogResponses = void 0; | ||
const vscode_1 = require("vscode"); | ||
const constants = require("./constants"); | ||
const localize_1 = require("./localize"); | ||
var DialogResponses; | ||
(function (DialogResponses) { | ||
DialogResponses.yes = { title: (0, localize_1.localize)('yes', 'Yes') }; | ||
DialogResponses.no = { title: (0, localize_1.localize)('no', 'No') }; | ||
DialogResponses.cancel = { title: (0, localize_1.localize)('cancel', 'Cancel'), isCloseAffordance: true }; | ||
DialogResponses.deleteResponse = { title: (0, localize_1.localize)('delete', 'Delete') }; | ||
DialogResponses.yes = { title: vscode_1.l10n.t('Yes') }; | ||
DialogResponses.no = { title: vscode_1.l10n.t('No') }; | ||
DialogResponses.cancel = { title: vscode_1.l10n.t('Cancel'), isCloseAffordance: true }; | ||
DialogResponses.deleteResponse = { title: vscode_1.l10n.t('Delete') }; | ||
DialogResponses.learnMore = { title: constants.learnMore }; | ||
DialogResponses.dontWarnAgain = { title: (0, localize_1.localize)('dontWarnAgain', 'Don\'t warn again') }; | ||
DialogResponses.skipForNow = { title: (0, localize_1.localize)('skipForNow', 'Skip for now') }; | ||
DialogResponses.upload = { title: (0, localize_1.localize)('upload', "Upload") }; | ||
DialogResponses.alwaysUpload = { title: (0, localize_1.localize)('alwaysUpload', "Always upload") }; | ||
DialogResponses.dontUpload = { title: (0, localize_1.localize)('dontUpload', "Don't upload"), isCloseAffordance: true }; | ||
DialogResponses.reportAnIssue = { title: (0, localize_1.localize)('reportAnIssue', "Report an issue") }; | ||
DialogResponses.dontWarnAgain = { title: vscode_1.l10n.t('Don\'t warn again') }; | ||
DialogResponses.skipForNow = { title: vscode_1.l10n.t('Skip for now') }; | ||
DialogResponses.upload = { title: vscode_1.l10n.t("Upload") }; | ||
DialogResponses.alwaysUpload = { title: vscode_1.l10n.t("Always upload") }; | ||
DialogResponses.dontUpload = { title: vscode_1.l10n.t("Don't upload"), isCloseAffordance: true }; | ||
DialogResponses.reportAnIssue = { title: vscode_1.l10n.t("Report an issue") }; | ||
})(DialogResponses = exports.DialogResponses || (exports.DialogResponses = {})); | ||
//# sourceMappingURL=DialogResponses.js.map |
@@ -8,6 +8,6 @@ "use strict"; | ||
exports.NoResourceFoundError = exports.NotImplementedError = exports.GoBackError = exports.isUserCancelledError = exports.UserCancelledError = void 0; | ||
const localize_1 = require("./localize"); | ||
const vscode = require("vscode"); | ||
class UserCancelledError extends Error { | ||
constructor(stepName) { | ||
super((0, localize_1.localize)('userCancelledError', 'Operation cancelled.')); | ||
super(vscode.l10n.t('Operation cancelled.')); | ||
this._isUserCancelledError = true; | ||
@@ -27,3 +27,3 @@ this.stepName = stepName; | ||
constructor() { | ||
super((0, localize_1.localize)('backError', 'Go back.')); | ||
super(vscode.l10n.t('Go back.')); | ||
} | ||
@@ -34,3 +34,3 @@ } | ||
constructor(methodName, obj) { | ||
super((0, localize_1.localize)('notImplementedError', '"{0}" is not implemented on "{1}".', methodName, obj.constructor.name)); | ||
super(vscode.l10n.t('"{0}" is not implemented on "{1}".', methodName, obj.constructor.name)); | ||
} | ||
@@ -46,3 +46,3 @@ } | ||
else { | ||
super((0, localize_1.localize)('noResourcesError', 'No matching resources found.')); | ||
super(vscode.l10n.t('No matching resources found.')); | ||
} | ||
@@ -49,0 +49,0 @@ } |
@@ -21,7 +21,6 @@ "use strict"; | ||
const createTelemetryReporter_1 = require("./createTelemetryReporter"); | ||
const localize_1 = require("./localize"); | ||
const parseError_1 = require("./parseError"); | ||
class UninitializedExtensionVariables { | ||
constructor() { | ||
this._error = new Error((0, localize_1.localize)('uninitializedError', '"registerUIExtensionVariables" must be called before using the vscode-azureextensionui package.')); | ||
this._error = new Error(vscode_1.l10n.t('"registerUIExtensionVariables" must be called before using the vscode-azureextensionui package.')); | ||
} | ||
@@ -61,7 +60,7 @@ get context() { | ||
if ((0, parseError_1.parseError)(context.error).message === 'Entry not found in cache.') { | ||
context.error = new Error((0, localize_1.localize)('mustReload', 'Your VS Code window must be reloaded to perform this action.')); | ||
context.error = new Error(vscode_1.l10n.t('Your VS Code window must be reloaded to perform this action.')); | ||
context.errorHandling.suppressReportIssue = true; | ||
context.errorHandling.buttons = [ | ||
{ | ||
title: (0, localize_1.localize)('reloadWindow', 'Reload Window'), | ||
title: vscode_1.l10n.t('Reload Window'), | ||
callback: () => __awaiter(this, void 0, void 0, function* () { | ||
@@ -68,0 +67,0 @@ yield vscode_1.commands.executeCommand('workbench.action.reloadWindow'); |
@@ -10,4 +10,4 @@ "use strict"; | ||
const htmlToText = require("html-to-text"); | ||
const vscode = require("vscode"); | ||
const errors_1 = require("./errors"); | ||
const localize_1 = require("./localize"); | ||
const parseJson_1 = require("./utils/parseJson"); | ||
@@ -63,3 +63,3 @@ function parseError(error) { | ||
errorType || (errorType = typeof (error)); | ||
message || (message = (0, localize_1.localize)('unknownError', 'Unknown Error')); | ||
message || (message = vscode.l10n.t('Unknown Error')); | ||
message = parseIfHtml(message); | ||
@@ -87,3 +87,3 @@ // Azure storage SDK errors are presented in XML | ||
if (!isNaN(code)) { | ||
return (0, localize_1.localize)('failedWithCode', 'Failed with code "{0}".', code); | ||
return vscode.l10n.t('Failed with code "{0}".', code); | ||
} | ||
@@ -90,0 +90,0 @@ } |
@@ -17,7 +17,7 @@ "use strict"; | ||
exports.CompatibilityContextValueQuickPickStep = void 0; | ||
const vscode_azureresources_api_1 = require("@microsoft/vscode-azureresources-api"); | ||
const vscode_1 = require("vscode"); | ||
const isAzExtTreeItem_1 = require("../../../tree/isAzExtTreeItem"); | ||
const getLastNode_1 = require("../../getLastNode"); | ||
const ContextValueQuickPickStep_1 = require("../ContextValueQuickPickStep"); | ||
const getLastNode_1 = require("../../getLastNode"); | ||
const isAzExtTreeItem_1 = require("../../../tree/isAzExtTreeItem"); | ||
const vscode_azureresources_api_1 = require("@microsoft/vscode-azureresources-api"); | ||
const localize_1 = require("../../../localize"); | ||
/** | ||
@@ -48,3 +48,3 @@ * Provides compatability with {@link AzExtParentTreeItem.pickTreeItemImpl} | ||
if ((0, isAzExtTreeItem_1.isAzExtParentTreeItem)(lastPickedItemUnwrapped) && lastPickedItemUnwrapped.childTypeLabel) { | ||
this.promptOptions.placeHolder = (0, localize_1.localize)('selectTreeItem', 'Select {0}', lastPickedItemUnwrapped.childTypeLabel); | ||
this.promptOptions.placeHolder = vscode_1.l10n.t('Select {0}', lastPickedItemUnwrapped.childTypeLabel); | ||
} | ||
@@ -51,0 +51,0 @@ } |
@@ -17,8 +17,8 @@ "use strict"; | ||
exports.CompatibilityRecursiveQuickPickStep = void 0; | ||
const vscode_azureresources_api_1 = require("@microsoft/vscode-azureresources-api"); | ||
const vscode = require("vscode"); | ||
const errors_1 = require("../../../errors"); | ||
const isAzExtTreeItem_1 = require("../../../tree/isAzExtTreeItem"); | ||
const getLastNode_1 = require("../../getLastNode"); | ||
const CompatibilityContextValueQuickPickStep_1 = require("./CompatibilityContextValueQuickPickStep"); | ||
const localize_1 = require("../../../localize"); | ||
const errors_1 = require("../../../errors"); | ||
const isAzExtTreeItem_1 = require("../../../tree/isAzExtTreeItem"); | ||
const vscode_azureresources_api_1 = require("@microsoft/vscode-azureresources-api"); | ||
/** | ||
@@ -34,3 +34,4 @@ * Recursive step which is compatible which adds create picks based if the node has {@link types.CompatibleQuickPickOptions.createChild quickPickOptions.createChild} defined. | ||
if ((0, isAzExtTreeItem_1.isAzExtParentTreeItem)(lastPickedItemTi)) { | ||
this.promptOptions.placeHolder = (0, localize_1.localize)('selectTreeItem', 'Select {0}', lastPickedItemTi.childTypeLabel); | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
this.promptOptions.placeHolder = vscode.l10n.t('Select {0}', lastPickedItemTi.childTypeLabel); | ||
this.promptOptions.stepName = `treeItemPicker|${lastPickedItemTi.contextValue}`; | ||
@@ -43,3 +44,4 @@ this.promptOptions.noPicksMessage = (_a = wizardContext.noItemFoundErrorMessage) !== null && _a !== void 0 ? _a : this.promptOptions.noPicksMessage; | ||
callback: lastPickedItemTi.createChild.bind(lastPickedItemTi), | ||
label: (_b = lastPickedItemTi.createNewLabel) !== null && _b !== void 0 ? _b : (0, localize_1.localize)('createNewItem', '$(plus) Create new {0}...', lastPickedItemTi.childTypeLabel) | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
label: (_b = lastPickedItemTi.createNewLabel) !== null && _b !== void 0 ? _b : vscode.l10n.t('$(plus) Create new {0}...', lastPickedItemTi.childTypeLabel) | ||
} : undefined; | ||
@@ -123,3 +125,3 @@ const picks = yield this.getPicks(wizardContext); | ||
return { | ||
label: options.label || (0, localize_1.localize)('createQuickPickLabel', '$(add) Create...'), | ||
label: options.label || vscode.l10n.t('$(add) Create...'), | ||
data: options.callback, | ||
@@ -126,0 +128,0 @@ }; |
@@ -17,5 +17,5 @@ "use strict"; | ||
exports.GenericQuickPickStep = void 0; | ||
const vscode = require("vscode"); | ||
const AzureWizardPromptStep_1 = require("../wizard/AzureWizardPromptStep"); | ||
const getLastNode_1 = require("./getLastNode"); | ||
const AzureWizardPromptStep_1 = require("../wizard/AzureWizardPromptStep"); | ||
const localize_1 = require("../localize"); | ||
class GenericQuickPickStep extends AzureWizardPromptStep_1.AzureWizardPromptStep { | ||
@@ -27,3 +27,3 @@ constructor(treeDataProvider, pickOptions, promptOptions) { | ||
this.supportsDuplicateSteps = true; | ||
this.promptOptions = Object.assign({ noPicksMessage: (0, localize_1.localize)('noMatchingResources', 'No matching resources found.') }, promptOptions); | ||
this.promptOptions = Object.assign({ noPicksMessage: vscode.l10n.t('No matching resources found.') }, promptOptions); | ||
} | ||
@@ -30,0 +30,0 @@ prompt(wizardContext) { |
@@ -17,8 +17,8 @@ "use strict"; | ||
exports.QuickPickAzureResourceStep = void 0; | ||
const vscode = require("vscode"); | ||
const contextUtils_1 = require("../../utils/contextUtils"); | ||
const GenericQuickPickStep_1 = require("../GenericQuickPickStep"); | ||
const localize_1 = require("../../localize"); | ||
class QuickPickAzureResourceStep extends GenericQuickPickStep_1.GenericQuickPickStep { | ||
constructor(tdp, options, promptOptions) { | ||
super(tdp, options !== null && options !== void 0 ? options : {}, Object.assign({ placeHolder: (0, localize_1.localize)('selectResource', 'Select resource') }, promptOptions)); | ||
super(tdp, options !== null && options !== void 0 ? options : {}, Object.assign({ placeHolder: vscode.l10n.t('Select resource') }, promptOptions)); | ||
this.pickFilter = new AzureResourcePickFilter(this.pickOptions); | ||
@@ -25,0 +25,0 @@ } |
@@ -17,3 +17,3 @@ "use strict"; | ||
exports.QuickPickAzureSubscriptionStep = void 0; | ||
const localize_1 = require("../../localize"); | ||
const vscode = require("vscode"); | ||
const GenericQuickPickStepWithCommands_1 = require("../GenericQuickPickStepWithCommands"); | ||
@@ -23,4 +23,4 @@ class QuickPickAzureSubscriptionStep extends GenericQuickPickStepWithCommands_1.GenericQuickPickStepWithCommands { | ||
super(tdp, Object.assign(Object.assign({}, options), { skipIfOne: true }), { | ||
placeHolder: (0, localize_1.localize)('selectSubscription', 'Select subscription'), | ||
noPicksMessage: (0, localize_1.localize)('noSubscriptions', 'No subscriptions found'), | ||
placeHolder: vscode.l10n.t('Select subscription'), | ||
noPicksMessage: vscode.l10n.t('No subscriptions found'), | ||
}); | ||
@@ -27,0 +27,0 @@ this.pickFilter = new AzureSubscriptionPickFilter(); |
@@ -20,3 +20,3 @@ "use strict"; | ||
const relativeTime = require("dayjs/plugin/relativeTime"); | ||
const localize_1 = require("./localize"); | ||
const vscode = require("vscode"); | ||
const registerCommand_1 = require("./registerCommand"); | ||
@@ -60,6 +60,6 @@ const reportAnIssue_1 = require("./reportAnIssue"); | ||
picks.unshift({ | ||
label: (0, localize_1.localize)('emptyIssue', '$(keyboard) Manually enter error'), | ||
label: vscode.l10n.t('$(keyboard) Manually enter error'), | ||
data: undefined | ||
}); | ||
const placeHolder = (0, localize_1.localize)('selectError', 'Select the error you would like to report'); | ||
const placeHolder = vscode.l10n.t('Select the error you would like to report'); | ||
const issue = (yield context.ui.showQuickPick(picks, { placeHolder, stepName: 'reportIssue', suppressPersistence: true })).data; | ||
@@ -66,0 +66,0 @@ yield (0, reportAnIssue_1.reportAnIssue)(issue); |
@@ -20,3 +20,2 @@ "use strict"; | ||
const getPackageInfo_1 = require("./getPackageInfo"); | ||
const localize_1 = require("./localize"); | ||
const openUrl_1 = require("./utils/openUrl"); | ||
@@ -42,7 +41,7 @@ // Some browsers don't have very long URLs | ||
let body = ` | ||
<!-- ${(0, localize_1.localize)('reportIssue_removePrivateInfo', "IMPORTANT: Please be sure to remove any private information before submitting.")} --> | ||
<!-- ${vscode.l10n.t("IMPORTANT: Please be sure to remove any private information before submitting.")} --> | ||
${(0, localize_1.localize)('reportIssue_isItConsistent', "Does this occur consistently? <!-- TODO: Type Yes or No -->")} | ||
${vscode.l10n.t("Does this occur consistently? <!-- TODO: Type Yes or No -->")} | ||
Repro steps: | ||
<!-- ${(0, localize_1.localize)('reportIssue_enterReproSteps', "TODO: Share the steps needed to reliably reproduce the problem. Please include actual and expected results.")} --> | ||
<!-- ${vscode.l10n.t("TODO: Share the steps needed to reliably reproduce the problem. Please include actual and expected results.")} --> | ||
@@ -79,3 +78,3 @@ 1. | ||
yield vscode.env.clipboard.writeText(body); | ||
return createNewIssueLinkFromBody((0, localize_1.localize)('pasteIssue', "The issue text was copied to the clipboard. Please paste it into this window.")); | ||
return createNewIssueLinkFromBody(vscode.l10n.t("The issue text was copied to the clipboard. Please paste it into this window.")); | ||
}); | ||
@@ -82,0 +81,0 @@ } |
@@ -20,3 +20,2 @@ "use strict"; | ||
const errors_1 = require("../errors"); | ||
const localize_1 = require("../localize"); | ||
const randomUtils_1 = require("../utils/randomUtils"); | ||
@@ -66,3 +65,3 @@ const AzExtTreeItem_1 = require("./AzExtTreeItem"); | ||
creatingTreeItem = new GenericTreeItem_1.GenericTreeItem(this, { | ||
label: (0, localize_1.localize)('creatingLabel', 'Creating {0}...', label), | ||
label: vscode_1.l10n.t('Creating {0}...', label), | ||
contextValue: `azureextensionui.creating${label}`, | ||
@@ -106,3 +105,4 @@ iconPath: new vscode_1.ThemeIcon('loading~spin') | ||
} | ||
const placeHolder = (0, localize_1.localize)('selectTreeItem', 'Select {0}', this.childTypeLabel); | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
const placeHolder = vscode_1.l10n.t('Select {0}', this.childTypeLabel); | ||
const stepName = `treeItemPicker|${this.contextValue}`; | ||
@@ -169,3 +169,3 @@ let getTreeItem; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
context.loadingMessage || (context.loadingMessage = (0, localize_1.localize)('loadingTreeItem', 'Loading "{0}"...', this.label)); | ||
context.loadingMessage || (context.loadingMessage = vscode_1.l10n.t('Loading "{0}"...', this.label)); | ||
yield (0, runWithLoadingNotification_1.runWithLoadingNotification)(context, (cancellationToken) => __awaiter(this, void 0, void 0, function* () { | ||
@@ -223,3 +223,3 @@ do { | ||
// Display a generic error if there are any unknown items. Only the last error will be displayed | ||
const label = (0, localize_1.localize)('cantShowItems', 'Some items could not be displayed'); | ||
const label = vscode_1.l10n.t('Some items could not be displayed'); | ||
treeItems.push(new InvalidTreeItem(this, lastUnknownItemError, { | ||
@@ -277,3 +277,3 @@ label, | ||
if (!ti.commandId) { | ||
throw new Error((0, localize_1.localize)('noCommand', 'Failed to find commandId on generic tree item.')); | ||
throw new Error(vscode_1.l10n.t('Failed to find commandId on generic tree item.')); | ||
} | ||
@@ -299,7 +299,7 @@ else { | ||
if (this.createChildImpl && this.childTypeLabel && !context.suppressCreatePick) { | ||
const createNewLabel = this.createNewLabel || (0, localize_1.localize)('treePickerCreateNew', 'Create new {0}...', this.childTypeLabel); | ||
const createNewLabel = this.createNewLabel || vscode_1.l10n.t('Create new {0}...', this.childTypeLabel); | ||
if (this.supportsAdvancedCreation) { | ||
picks.unshift({ | ||
label: `$(plus) ${createNewLabel}`, | ||
description: (0, localize_1.localize)('advanced', 'Advanced'), | ||
description: vscode_1.l10n.t('Advanced'), | ||
data: () => __awaiter(this, void 0, void 0, function* () { return yield this.createChild(Object.assign(context, { advancedCreation: true })); }) | ||
@@ -345,3 +345,3 @@ }); | ||
this.data = options.data; | ||
this.description = options.description !== undefined ? options.description : (0, localize_1.localize)('invalid', 'Invalid'); | ||
this.description = options.description !== undefined ? options.description : vscode_1.l10n.t('Invalid'); | ||
} | ||
@@ -348,0 +348,0 @@ get id() { |
@@ -20,3 +20,2 @@ "use strict"; | ||
const errors_1 = require("../errors"); | ||
const localize_1 = require("../localize"); | ||
const parseError_1 = require("../parseError"); | ||
@@ -109,3 +108,3 @@ const addTreeItemValuesToMask_1 = require("./addTreeItemValuesToMask"); | ||
result.push(...duplicateChildren.map(c => { | ||
const message = (0, localize_1.localize)('elementWithId', 'An element with the following id already exists: {0}', c.fullId); | ||
const message = vscode_1.l10n.t('An element with the following id already exists: {0}', c.fullId); | ||
return new AzExtParentTreeItem_1.InvalidTreeItem(treeItem, new Error(message), { contextValue: 'azureextensionui.duplicate', label: c.label }); | ||
@@ -129,3 +128,3 @@ })); | ||
return [new GenericTreeItem_1.GenericTreeItem(arg, { | ||
label: (0, localize_1.localize)('errorTreeItem', 'Error: {0}', (0, parseError_1.parseError)(error).message), | ||
label: vscode_1.l10n.t('Error: {0}', (0, parseError_1.parseError)(error).message), | ||
contextValue: 'azureextensionui.error' | ||
@@ -132,0 +131,0 @@ })]; |
@@ -18,7 +18,6 @@ "use strict"; | ||
const vscode_1 = require("vscode"); | ||
const constants_1 = require("../constants"); | ||
const errors_1 = require("../errors"); | ||
const localize_1 = require("../localize"); | ||
const nonNull_1 = require("../utils/nonNull"); | ||
const settingUtils_1 = require("../utils/settingUtils"); | ||
const constants_1 = require("../constants"); | ||
const isAzExtTreeItem_1 = require("./isAzExtTreeItem"); | ||
@@ -111,3 +110,3 @@ class AzExtTreeItem { | ||
if (!result) { | ||
throw Error((0, localize_1.localize)('noSubscriptionFound', 'No Azure subscription found for this tree item.')); | ||
throw Error(vscode_1.l10n.t('No Azure subscription found for this tree item.')); | ||
} | ||
@@ -144,3 +143,3 @@ else { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
yield this.runWithTemporaryDescription(context, (0, localize_1.localize)('deleting', 'Deleting...'), () => __awaiter(this, void 0, void 0, function* () { | ||
yield this.runWithTemporaryDescription(context, vscode_1.l10n.t('Deleting...'), () => __awaiter(this, void 0, void 0, function* () { | ||
if (this.deleteTreeItemImpl) { | ||
@@ -147,0 +146,0 @@ yield this.deleteTreeItemImpl(context); |
@@ -18,7 +18,6 @@ "use strict"; | ||
const vscode_1 = require("vscode"); | ||
const localize_1 = require("../localize"); | ||
function runWithLoadingNotification(context, callback) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield vscode_1.window.withProgress({ location: vscode_1.ProgressLocation.Notification, cancellable: true }, (progress, cancellationToken) => __awaiter(this, void 0, void 0, function* () { | ||
const message = context.loadingMessage || (0, localize_1.localize)('loadingAll', 'Loading resources...'); | ||
const message = context.loadingMessage || vscode_1.l10n.t('Loading resources...'); | ||
const messageDelay = context.loadingMessageDelay !== undefined ? context.loadingMessageDelay : 2; | ||
@@ -25,0 +24,0 @@ const timer = setTimeout(() => progress.report({ message }), messageDelay * 1000); |
@@ -8,4 +8,4 @@ "use strict"; | ||
exports.loadMoreLabel = void 0; | ||
const localize_1 = require("../localize"); | ||
exports.loadMoreLabel = (0, localize_1.localize)('LoadMore', 'Load More...'); | ||
const vscode = require("vscode"); | ||
exports.loadMoreLabel = vscode.l10n.t('Load More...'); | ||
//# sourceMappingURL=treeConstants.js.map |
@@ -19,3 +19,2 @@ "use strict"; | ||
const createGenericElement_1 = require("./createGenericElement"); | ||
const localize_1 = require("../../localize"); | ||
class TreeElementStateManager { | ||
@@ -43,3 +42,3 @@ constructor() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
yield this.runWithTemporaryDescription(id, (0, localize_1.localize)('deleting', 'Deleting...'), callback, true); | ||
yield this.runWithTemporaryDescription(id, vscode.l10n.t('Deleting...'), callback, true); | ||
}); | ||
@@ -46,0 +45,0 @@ } |
@@ -21,3 +21,2 @@ "use strict"; | ||
const extensionVariables_1 = require("../extensionVariables"); | ||
const localize_1 = require("../localize"); | ||
const nonNull_1 = require("../utils/nonNull"); | ||
@@ -124,3 +123,3 @@ const openUrl_1 = require("../utils/openUrl"); | ||
if (options.canPickMany && options.placeHolder) { | ||
options.placeHolder += (0, localize_1.localize)('canPickManyInstructions', " (Press 'Space' to select and 'Enter' to confirm)"); | ||
options.placeHolder += vscode_1.l10n.t(" (Press 'Space' to select and 'Enter' to confirm)"); | ||
} | ||
@@ -191,3 +190,3 @@ // Copy settings that are common between options and quickPick | ||
if (!recentlyUsedItem.suppressPersistence) { | ||
const recentlyUsed = (0, localize_1.localize)('recentlyUsed', '(recently used)'); | ||
const recentlyUsed = vscode_1.l10n.t('(recently used)'); | ||
if (!recentlyUsedItem.description) { | ||
@@ -194,0 +193,0 @@ recentlyUsedItem.description = recentlyUsed; |
@@ -20,3 +20,2 @@ "use strict"; | ||
const errors_1 = require("../errors"); | ||
const localize_1 = require("../localize"); | ||
const openUrl_1 = require("../utils/openUrl"); | ||
@@ -32,3 +31,3 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
} | ||
const back = { title: (0, localize_1.localize)('back', 'Back') }; | ||
const back = { title: vscode_1.l10n.t('Back') }; | ||
if ((_a = context.ui.wizard) === null || _a === void 0 ? void 0 : _a.showBackButton) { | ||
@@ -35,0 +34,0 @@ args.push(back); |
@@ -17,3 +17,3 @@ "use strict"; | ||
exports.createSubscriptionContext = exports.createCredential = void 0; | ||
const localize_1 = require("../localize"); | ||
const vscode = require("vscode"); | ||
/** | ||
@@ -39,3 +39,3 @@ * Converts a VS Code authentication session to an Azure Track 1 & 2 compatible compatible credential. | ||
signRequest: () => __awaiter(this, void 0, void 0, function* () { | ||
throw new Error(((0, localize_1.localize)('signRequestError', 'Track 1 credentials are not (currently) supported.'))); | ||
throw new Error((vscode.l10n.t('Track 1 credentials are not (currently) supported.'))); | ||
}) | ||
@@ -42,0 +42,0 @@ }; |
@@ -17,3 +17,3 @@ "use strict"; | ||
exports.rejectOnTimeout = exports.valueOnTimeout = void 0; | ||
const localize_1 = require("../localize"); | ||
const vscode = require("vscode"); | ||
class TimeoutError extends Error { | ||
@@ -47,3 +47,3 @@ } | ||
timer = undefined; | ||
reject(new TimeoutError(callerTimeOutMessage || (0, localize_1.localize)('timeout', 'Execution timed out.'))); | ||
reject(new TimeoutError(callerTimeOutMessage || vscode.l10n.t('Execution timed out.'))); | ||
}, timeoutMs); | ||
@@ -50,0 +50,0 @@ let value; |
@@ -22,3 +22,2 @@ "use strict"; | ||
const errors_1 = require("../errors"); | ||
const localize_1 = require("../localize"); | ||
const parseError_1 = require("../parseError"); | ||
@@ -80,3 +79,3 @@ const showQuickPick_1 = require("../userInput/showQuickPick"); | ||
const loadingQuickPick = this._showLoadingPrompt ? (0, showQuickPick_1.createQuickPick)(this._context, { | ||
loadingPlaceHolder: (0, localize_1.localize)('loading', 'Loading...') | ||
loadingPlaceHolder: vscode.l10n.t('Loading...') | ||
}) : undefined; | ||
@@ -83,0 +82,0 @@ const disposables = []; |
@@ -17,3 +17,3 @@ "use strict"; | ||
exports.ConfirmPreviousInputStep = void 0; | ||
const localize_1 = require("../localize"); | ||
const vscode = require("vscode"); | ||
const AzureWizardPromptStep_1 = require("./AzureWizardPromptStep"); | ||
@@ -30,3 +30,3 @@ class ConfirmPreviousInputStep extends AzureWizardPromptStep_1.AzureWizardPromptStep { | ||
yield context.ui.showInputBox({ | ||
prompt: (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.prompt) !== null && _b !== void 0 ? _b : (0, localize_1.localize)('verifyPreviousInput', 'Please confirm by re-entering the previous value.'), | ||
prompt: (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.prompt) !== null && _b !== void 0 ? _b : vscode.l10n.t('Please confirm by re-entering the previous value.'), | ||
password: (_c = this.options) === null || _c === void 0 ? void 0 : _c.isPassword, | ||
@@ -41,3 +41,3 @@ validateInput: (value) => this.validateInput(context, value) | ||
validateInput(context, value) { | ||
const valueMismatch = (0, localize_1.localize)('valueMismatch', 'The entered value does not match the original.'); | ||
const valueMismatch = vscode.l10n.t('The entered value does not match the original.'); | ||
return (context[this.key] === (value === null || value === void 0 ? void 0 : value.trim())) ? undefined : valueMismatch; | ||
@@ -44,0 +44,0 @@ } |
{ | ||
"name": "@microsoft/vscode-azext-utils", | ||
"author": "Microsoft Corporation", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Common UI tools for developing Azure extensions for VS Code", | ||
@@ -42,3 +42,2 @@ "tags": [ | ||
"uuid": "^9.0.0", | ||
"vscode-nls": "^5.0.1", | ||
"vscode-tas-client": "^0.1.47", | ||
@@ -45,0 +44,0 @@ "vscode-uri": "^3.0.6" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9
397367
86
7721
- Removedvscode-nls@^5.0.1
- Removedvscode-nls@5.2.0(transitive)