From 0ee66b09ce79ed69bc7580906ade6532dbfb4cc6 Mon Sep 17 00:00:00 2001 From: "Andrew W. Harn" Date: Tue, 26 Nov 2024 10:58:40 -0500 Subject: [PATCH] Update prompt to eliminate extra "No" value, and fix localization of Zowe Resources table items selected count. Signed-off-by: Andrew W. Harn --- .../__unit__/trees/dataset/DatasetActions.unit.test.ts | 4 ++-- packages/zowe-explorer/src/trees/dataset/DatasetActions.ts | 4 ++-- .../zowe-explorer/src/webviews/src/table-view/ActionsBar.tsx | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/zowe-explorer/__tests__/__unit__/trees/dataset/DatasetActions.unit.test.ts b/packages/zowe-explorer/__tests__/__unit__/trees/dataset/DatasetActions.unit.test.ts index 0002866402..adabd33276 100644 --- a/packages/zowe-explorer/__tests__/__unit__/trees/dataset/DatasetActions.unit.test.ts +++ b/packages/zowe-explorer/__tests__/__unit__/trees/dataset/DatasetActions.unit.test.ts @@ -3053,7 +3053,7 @@ describe("Dataset Actions Unit Tests - function search", () => { expect(result).toEqual(true); }); - it("should return true if the user responds with yes", async () => { + it("should return true if the user responds with continue", async () => { let i = 1; const dataSets: zosfiles.IDataSet[] = []; while (i < 55) { @@ -3061,7 +3061,7 @@ describe("Dataset Actions Unit Tests - function search", () => { i++; } - infoMessageSpy.mockResolvedValue("Yes"); + infoMessageSpy.mockResolvedValue("Continue"); const result = await (DatasetActions as any).continueSearchPrompt(dataSets); expect(infoMessageSpy).toHaveBeenCalledTimes(1); diff --git a/packages/zowe-explorer/src/trees/dataset/DatasetActions.ts b/packages/zowe-explorer/src/trees/dataset/DatasetActions.ts index 330e31a8b5..8182b5a11f 100644 --- a/packages/zowe-explorer/src/trees/dataset/DatasetActions.ts +++ b/packages/zowe-explorer/src/trees/dataset/DatasetActions.ts @@ -1895,12 +1895,12 @@ export class DatasetActions { comment: "The number of data sets that are about to be searched", }), { - items: [vscode.l10n.t("Yes"), vscode.l10n.t("No")], + items: [vscode.l10n.t("Continue")], vsCodeOpts: { modal: true }, } ); - return resp === vscode.l10n.t("Yes"); + return resp === vscode.l10n.t("Continue"); } private static async performSearch(progress: any, token: vscode.CancellationToken, options: ISearchOptions): Promise { diff --git a/packages/zowe-explorer/src/webviews/src/table-view/ActionsBar.tsx b/packages/zowe-explorer/src/webviews/src/table-view/ActionsBar.tsx index dcf604dc61..afa315bd57 100644 --- a/packages/zowe-explorer/src/webviews/src/table-view/ActionsBar.tsx +++ b/packages/zowe-explorer/src/webviews/src/table-view/ActionsBar.tsx @@ -82,7 +82,7 @@ export const ActionsBar = (props: ActionsProps) => {

{props.selectionCount === 0 ? l10n.t("No") : props.selectionCount} - {props.selectionCount > 1 || props.selectionCount === 0 ? l10n.t("items") : l10n.t("item")} {l10n.t("selected")} +  {props.selectionCount > 1 || props.selectionCount === 0 ? l10n.t("items") : l10n.t("item")} {l10n.t("selected")}

{props.actions .filter((action) => (props.itemCount > 1 ? action.callback.typ === "multi-row" : action.callback.typ.endsWith("row")))