Skip to content

Commit

Permalink
Localize delete prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonYeMSFT committed Jan 23, 2024
1 parent 48418ec commit 562e42d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/docdb/tree/DocDBTriggerTreeItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { AzExtTreeItem, DialogResponses, IActionContext, TreeItemIconPath } from
import * as vscode from "vscode";
import { IEditableTreeItem } from '../../DatabasesFileSystem';
import { ext } from '../../extensionVariables';
import { localize } from '../../utils/localize';
import { nonNullProp } from '../../utils/nonNull';
import { DocDBTriggersTreeItem, getTriggerOperation, getTriggerType } from './DocDBTriggersTreeItem';
import { IDocDBTreeRoot } from './IDocDBTreeRoot';
Expand Down Expand Up @@ -86,7 +87,7 @@ export class DocDBTriggerTreeItem extends AzExtTreeItem implements IEditableTree
}

public async deleteTreeItemImpl(context: IActionContext): Promise<void> {
const message: string = `Are you sure you want to delete trigger '${this.label}'?`;
const message: string = localize("deleteCosmosTrigger", `Are you sure you want to delete trigger '{0}'?`, this.label);
await context.ui.showWarningMessage(message, { modal: true, stepName: 'deleteTrigger' }, DialogResponses.deleteResponse);
const client = this.root.getCosmosClient();
await this.parent.getContainerClient(client).scripts.trigger(this.id).delete();
Expand Down

0 comments on commit 562e42d

Please sign in to comment.