Skip to content

Commit

Permalink
Update prompt to eliminate extra "No" value, and fix localization of …
Browse files Browse the repository at this point in the history
…Zowe Resources table items selected count.

Signed-off-by: Andrew W. Harn <[email protected]>
  • Loading branch information
awharn committed Nov 26, 2024
1 parent 3075ed7 commit 0ee66b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3053,15 +3053,15 @@ 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) {
dataSets.push({ dsn: "TEST.DATA.SET." + i.toString() });
i++;
}

infoMessageSpy.mockResolvedValue("Yes");
infoMessageSpy.mockResolvedValue("Continue");
const result = await (DatasetActions as any).continueSearchPrompt(dataSets);

expect(infoMessageSpy).toHaveBeenCalledTimes(1);
Expand Down
4 changes: 2 additions & 2 deletions packages/zowe-explorer/src/trees/dataset/DatasetActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<zosfiles.ISearchResponse> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const ActionsBar = (props: ActionsProps) => {
<span style={{ display: "flex", alignItems: "center", marginBottom: "0.25em" }}>
<p style={{ fontSize: "0.9em", paddingTop: "2px", marginRight: "0.75em" }}>
{props.selectionCount === 0 ? l10n.t("No") : props.selectionCount}
{props.selectionCount > 1 || props.selectionCount === 0 ? l10n.t("items") : l10n.t("item")} {l10n.t("selected")}
&nbsp;{props.selectionCount > 1 || props.selectionCount === 0 ? l10n.t("items") : l10n.t("item")} {l10n.t("selected")}
</p>
{props.actions
.filter((action) => (props.itemCount > 1 ? action.callback.typ === "multi-row" : action.callback.typ.endsWith("row")))
Expand Down

0 comments on commit 0ee66b0

Please sign in to comment.