Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor format of l10n strings to standard format #3137

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/zowe-explorer-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ All notable changes to the "zowe-explorer-api" extension will be documented in t

- Updated the `TableViewProvider.setTableView` function to show the Zowe Resources panel if a table is provided. If `null` is passed, the Zowe Resources panel will be hidden. [#3113](https://github.com/zowe/zowe-explorer-vscode/issues/3113)
- Fixed behavior of logout action when token is defined in both base profile and parent profile. [#3076](https://github.com/zowe/zowe-explorer-vscode/issues/3076)
- Fixed issue with object based parameter being passed to VS Code's localization API.

## `3.0.0-next.202409132122`

Expand Down
18 changes: 2 additions & 16 deletions packages/zowe-explorer-api/src/fs/BaseProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,7 @@ export class BaseProvider {
return;
}
await vscode.workspace.fs.writeFile(uri.with({ query: "forceUpload=true" }), fsEntry.data);
Gui.setStatusBarMessage(
vscode.l10n.t({
message: "$(check) Overwrite applied for {0}",
args: [fsEntry.name],
comment: "File name",
}),
this.FS_PROVIDER_UI_TIMEOUT
);
Gui.setStatusBarMessage(vscode.l10n.t("$(check) Overwrite applied for {0}", [fsEntry.name]), this.FS_PROVIDER_UI_TIMEOUT);
fsEntry.conflictData = null;
vscode.commands.executeCommand("workbench.action.closeActiveEditor");
}
Expand All @@ -79,14 +72,7 @@ export class BaseProvider {
if (!isDataEqual) {
await vscode.workspace.fs.writeFile(uri.with({ query: "forceUpload=true" }), fsEntry.conflictData.contents);
}
Gui.setStatusBarMessage(
vscode.l10n.t({
message: "$(discard) Used remote content for {0}",
args: [fsEntry.name],
comment: "File name",
}),
this.FS_PROVIDER_UI_TIMEOUT
);
Gui.setStatusBarMessage(vscode.l10n.t("$(discard) Used remote content for {0}", [fsEntry.name]), this.FS_PROVIDER_UI_TIMEOUT);
fsEntry.conflictData = null;
vscode.commands.executeCommand("workbench.action.closeActiveEditor");
}
Expand Down
1 change: 1 addition & 0 deletions packages/zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen
- Fixed behavior of logout action when token is defined in both base profile and parent profile. [#3076](https://github.com/zowe/zowe-explorer-vscode/issues/3076)
- Fixed bug that displayed obsolete profiles in the Zowe Explorer tree views after the associated team configuration file was deleted. [#3124](https://github.com/zowe/zowe-explorer-vscode/issues/3124)
- Fix issue with extender profiles not being included in fresh team configuration file. [#3122](https://github.com/zowe/zowe-explorer-vscode/issues/3122)
- Fixed issue with object based parameter being passed to VS Code's localization API.

## `3.0.0-next.202409132122`

Expand Down
850 changes: 110 additions & 740 deletions packages/zowe-explorer/l10n/bundle.l10n.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion packages/zowe-explorer/l10n/poeditor.json
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,6 @@
"Uploading to data set": "",
"No data sets selected for deletion, cancelling...": "",
"Deleting data set(s): {0}": "",
"Are you sure you want to delete the following {0} item(s)?\nThis will permanently remove these data sets and/or members from your system.\n\n{1}": "",
"Deleting items": "",
"The following {0} item(s) were deleted: {1}": "",
"Name of Member": "",
Expand Down
20 changes: 3 additions & 17 deletions packages/zowe-explorer/src/commands/MvsCommandHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,7 @@ export class MvsCommandHandler extends ZoweCommandProvider {
} catch (error) {
if (error.toString().includes("non-existing")) {
ZoweLogger.error(error);
Gui.errorMessage(
vscode.l10n.t({
message: "Not implemented yet for profile of type: {0}",
args: [profile.type],
comment: ["Profile type"],
})
);
Gui.errorMessage(vscode.l10n.t("Not implemented yet for profile of type: {0}", [profile.type]));
} else {
await AuthUtils.errorHandling(error, profile.name);
}
Expand All @@ -140,16 +134,8 @@ export class MvsCommandHandler extends ZoweCommandProvider {
const items: vscode.QuickPickItem[] = this.history.getSearchHistory().map((element) => new FilterItem({ text: element }));
const quickpick = Gui.createQuickPick();
quickpick.placeholder = alwaysEdit
? vscode.l10n.t({
message: "Select an MVS command to run against {0} (An option to edit will follow)",
args: [hostname],
comment: ["Host name"],
})
: vscode.l10n.t({
message: "Select an MVS command to run immediately against {0}",
args: [hostname],
comment: ["Host name"],
});
? vscode.l10n.t("Select an MVS command to run against {0} (An option to edit will follow)", [hostname])
: vscode.l10n.t("Select an MVS command to run immediately against {0}", [hostname]);

quickpick.items = [createPick, ...items];
quickpick.ignoreFocusOut = true;
Expand Down
20 changes: 3 additions & 17 deletions packages/zowe-explorer/src/commands/TsoCommandHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,7 @@ export class TsoCommandHandler extends ZoweCommandProvider {
} catch (error) {
if (error.toString().includes("non-existing")) {
ZoweLogger.error(error);
Gui.errorMessage(
vscode.l10n.t({
message: "Not implemented yet for profile of type: {0}",
args: [profile.type],
comment: ["Profile type"],
})
);
Gui.errorMessage(vscode.l10n.t("Not implemented yet for profile of type: {0}", [profile.type]));
} else {
await AuthUtils.errorHandling(error, profile.name);
}
Expand All @@ -148,16 +142,8 @@ export class TsoCommandHandler extends ZoweCommandProvider {
const items: vscode.QuickPickItem[] = this.history.getSearchHistory().map((element) => new FilterItem({ text: element }));
const quickpick = Gui.createQuickPick();
quickpick.placeholder = alwaysEdit
? vscode.l10n.t({
message: "Select a TSO command to run against {0} (An option to edit will follow)",
args: [hostname],
comment: ["Host name"],
})
: vscode.l10n.t({
message: "Select a TSO command to run immediately against {0}",
args: [hostname],
comment: ["Host name"],
});
? vscode.l10n.t("Select a TSO command to run against {0} (An option to edit will follow)", [hostname])
: vscode.l10n.t("Select a TSO command to run immediately against {0}", [hostname]);

quickpick.items = [createPick, ...items];
quickpick.ignoreFocusOut = true;
Expand Down
40 changes: 6 additions & 34 deletions packages/zowe-explorer/src/commands/UnixCommandHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,8 @@ export class UnixCommandHandler extends ZoweCommandProvider {
private serviceProf: imperative.IProfileLoaded = undefined;
private unixCmdMsgs = {
opCancelledMsg: vscode.l10n.t("Operation Cancelled"),
issueCmdNotSupportedMsg: vscode.l10n.t({
message: "Issuing commands is not supported for this profile type, {0}.",
args: [this.serviceProf?.type],
comment: ["Profile type"],
}),
issueUnixCmdNotSupportedMsg: vscode.l10n.t({
message: "Issuing UNIX commands is not supported for this profile type, {0}.",
args: [this.serviceProf?.type],
comment: ["Profile type"],
}),
issueCmdNotSupportedMsg: vscode.l10n.t("Issuing commands is not supported for this profile type, {0}.", [this.serviceProf?.type]),
issueUnixCmdNotSupportedMsg: vscode.l10n.t("Issuing UNIX commands is not supported for this profile type, {0}.", [this.serviceProf?.type]),
sshSessionErrorMsg: vscode.l10n.t("Error preparring SSH connection for issueing UNIX commands, please check SSH profile for correctness."),
sshProfNotFoundMsg: vscode.l10n.t("No SSH profile found. Please create an SSH profile."),
sshProfMissingInfoMsg: vscode.l10n.t("SSH profile missing connection details. Please update."),
Expand Down Expand Up @@ -98,13 +90,7 @@ export class UnixCommandHandler extends ZoweCommandProvider {
}
if (!ZoweExplorerApiRegister.getCommandApi(this.serviceProf).issueUnixCommand) {
ZoweLogger.error(this.unixCmdMsgs.issueUnixCmdNotSupportedMsg);
Gui.errorMessage(
vscode.l10n.t({
message: "Issuing UNIX commands is not supported for this profile type, {0}.",
args: [this.serviceProf?.type],
comment: ["Profile type"],
})
);
Gui.errorMessage(vscode.l10n.t("Issuing UNIX commands is not supported for this profile type, {0}.", [this.serviceProf?.type]));
this.serviceProf = undefined;
return;
}
Expand Down Expand Up @@ -157,13 +143,7 @@ export class UnixCommandHandler extends ZoweCommandProvider {
} catch (error) {
if (error.toString().includes("non-existing")) {
ZoweLogger.error(error);
Gui.errorMessage(
vscode.l10n.t({
message: "Not implemented yet for profile of type: {0}",
args: [this.serviceProf.type],
comment: ["Profile type"],
})
);
Gui.errorMessage(vscode.l10n.t("Not implemented yet for profile of type: {0}", [this.serviceProf.type]));
} else {
await AuthUtils.errorHandling(error, this.serviceProf.name);
}
Expand Down Expand Up @@ -304,16 +284,8 @@ export class UnixCommandHandler extends ZoweCommandProvider {
const items: vscode.QuickPickItem[] = this.history.getSearchHistory().map((element) => new FilterItem({ text: element }));
const quickpick = Gui.createQuickPick();
quickpick.placeholder = alwaysEdit
? vscode.l10n.t({
message: "Select a Unix command to run against {0} (An option to edit will follow)",
args: [cwd],
comment: ["Current work directory"],
})
: vscode.l10n.t({
message: "Select a Unix command to run immediately against {0}",
args: [cwd],
comment: ["Current work directory"],
});
? vscode.l10n.t("Select a Unix command to run against {0} (An option to edit will follow)", [cwd])
: vscode.l10n.t("Select a Unix command to run immediately against {0}", [cwd]);

quickpick.items = [createPick, ...items];
quickpick.ignoreFocusOut = true;
Expand Down
10 changes: 4 additions & 6 deletions packages/zowe-explorer/src/commands/ZoweCommandProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,10 @@ export class ZoweCommandProvider {
}

await AuthUtils.errorHandling(
vscode.l10n.t({
message:
"Profile Name {0} is inactive. Please check if your Zowe server is active or if the URL and port in your profile is correct.",
args: [profile.name],
comment: ["Profile name"],
})
vscode.l10n.t(
"Profile Name {0} is inactive. Please check if your Zowe server is active or if the URL and port in your profile is correct.",
[profile.name]
)
);
} else if (profileStatus.status === "active") {
if (
Expand Down
Loading
Loading