Skip to content

Commit

Permalink
Localized Code for i events strings
Browse files Browse the repository at this point in the history
Signed-off-by: Seb Julliand <[email protected]>
  • Loading branch information
sebjulliand committed Aug 19, 2024
1 parent 95cd3a4 commit 9ca19ca
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
8 changes: 7 additions & 1 deletion l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@
"Workspace folder not specified": "Workspace folder not specified",
"No source files selected to be migrated": "No source files selected to be migrated",
"Reveal in Explorer": "Reveal in Explorer",
"Load IBM i Project Explorer": "Load IBM i Project Explorer",
"Refresh IBM i Project Explorer after deploy": "Refresh IBM i Project Explorer after deploy",
"Refresh IBM i Project Explorer after deploy location changes": "Refresh IBM i Project Explorer after deploy location changes",
"Disconnect IBM i Projects": "Disconnect IBM i Projects",
"Failed to retrieve project": "Failed to retrieve project",
"Enter build command ({0} resolves to the base file name being edited. {1} resolves to the full IFS path corresponding to the source in the editor. {2} resolves to the IBM i hostname. {3} resolves to the user profile that the command will be executed under. {4} resolves to the name of the current git branch if this project is managed by git.)": "Enter build command ({0} resolves to the base file name being edited. {1} resolves to the full IFS path corresponding to the source in the editor. {2} resolves to the IBM i hostname. {3} resolves to the user profile that the command will be executed under. {4} resolves to the name of the current git branch if this project is managed by git.)",
"Build command": "Build command",
Expand Down Expand Up @@ -206,5 +210,7 @@
"Severity 40 or more": "Severity 40 or more",
"Severity 50 or more": "Severity 50 or more",
"Select Severity Level": "Select Severity Level",
"{0} Failed Object(s)": "{0} Failed Object(s)"
"{0} Failed Object(s)": "{0} Failed Object(s)",
"Run IBM i Project Explorer tests": "Run IBM i Project Explorer tests",
"Reset IBM i Project Explorer tests": "Reset IBM i Project Explorer tests"
}
6 changes: 3 additions & 3 deletions src/testing/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

import { env } from "process";
import { ExtensionContext, commands, window } from "vscode";
import { ExtensionContext, commands, l10n, window } from "vscode";
import { getInstance } from "../ibmi";
import { buildMapSuite } from "./suites/buildMap";
import { decorationProviderSuite } from "./suites/decorationProvider";
Expand Down Expand Up @@ -58,9 +58,9 @@ export async function initialise(context: ExtensionContext) {
await commands.executeCommand(`setContext`, `projectExplorer:testing`, true);
const ibmi = getInstance()!;
if (!individualTesting) {
ibmi.subscribe(context, `connected`, "Run IBM i Project Explorer tests", runTests);
ibmi.subscribe(context, `connected`, l10n.t("Run IBM i Project Explorer tests"), runTests);
}
ibmi.subscribe(context, `disconnected`, "Reset IBM i Project Explorer tests", resetTests);
ibmi.subscribe(context, `disconnected`, l10n.t("Reset IBM i Project Explorer tests"), resetTests);
testSuitesTreeProvider = new TestSuitesTreeProvider(suites);
const testSuitesTreeView = window.createTreeView(`testing`, { treeDataProvider: testSuitesTreeProvider, showCollapseAll: true });

Expand Down
8 changes: 4 additions & 4 deletions src/views/projectExplorer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default class ProjectExplorer implements TreeDataProvider<ProjectExplorer
constructor(context: ExtensionContext) {
const ibmi = getInstance();
let currentDeploymentStorage: DeploymentPath;
ibmi?.subscribe(context, `connected`, "Load IBM i Project Explorer", async () => {
ibmi?.subscribe(context, `connected`, l10n.t("Load IBM i Project Explorer"), async () => {
this.refresh();

currentDeploymentStorage = JSON.parse(JSON.stringify(ibmi?.getStorage().getDeployment()));
Expand All @@ -50,10 +50,10 @@ export default class ProjectExplorer implements TreeDataProvider<ProjectExplorer
await iProject.syncLiblVars();
}
});
ibmi?.subscribe(context, `deploy`, "Refresh IBM i Project Explorer after deploy", () => {
ibmi?.subscribe(context, `deploy`, l10n.t("Refresh IBM i Project Explorer after deploy"), () => {
this.refresh();
});
ibmi?.subscribe(context, `deployLocation`, "Refresh IBM i Project Explorer after deploy location changes", () => {
ibmi?.subscribe(context, `deployLocation`, l10n.t("Refresh IBM i Project Explorer after deploy location changes"), () => {
this.refresh();

const newDeploymentStorage = ibmi?.getStorage().getDeployment();
Expand All @@ -66,7 +66,7 @@ export default class ProjectExplorer implements TreeDataProvider<ProjectExplorer

currentDeploymentStorage = JSON.parse(JSON.stringify(newDeploymentStorage));
});
ibmi?.subscribe(context, `disconnected`, "Disconnect IBM i Projects", () => {
ibmi?.subscribe(context, `disconnected`, l10n.t("Disconnect IBM i Projects"), () => {
this.refresh();

for (const iProject of ProjectManager.getProjects()) {
Expand Down

0 comments on commit 9ca19ca

Please sign in to comment.