Skip to content

Commit

Permalink
Merge pull request #387 from phaumer/polish-incorrect-profile-message
Browse files Browse the repository at this point in the history
Update incorrect profile message
  • Loading branch information
Colin-Stone authored Dec 11, 2019
2 parents 86c16bc + cf7dd34 commit ea6c44a
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 15 deletions.
4 changes: 2 additions & 2 deletions i18n/sample/src/DatasetTree.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"initializeFavorites.log.debug": "initializing favorites",
"initializeFavorites.error.profile1": "Error: You have Zowe Data Set favorites that refer to a non-existent CLI profile named: ",
"intializeFavorites.error.profile2": ". To resolve this, you can create a profile with this name, ",
"initializeFavorites.error.profile3": "or remove the favorites with this profile name from the Zowe-DS-Persistent setting, ",
"initializeFavorites.error.profile4": "which can be found in your VS Code user settings.",
"initializeFavorites.error.profile3": "or remove the favorites with this profile name from the Zowe-DS-Persistent setting, which can be found in your ",
"initializeFavorites.error.profile4": " user settings.",
"loadNamedProfile.error.profileName": "Initialization Error: Could not find profile named: ",
"loadNamedProfile.error.period": ".",
"initializeFavorites.fileCorrupted": "Favorites file corrupted: ",
Expand Down
4 changes: 2 additions & 2 deletions i18n/sample/src/USSTree.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"initializeUSSFavorites.lines.title": "Open",
"initializeUSSFavorites.error.profile1": "Error: You have Zowe USS favorites that refer to a non-existent CLI profile named: ",
"intializeUSSFavorites.error.profile2": ". To resolve this, you can create a profile with this name, ",
"initializeUSSFavorites.error.profile3": "or remove the favorites with this profile name from the Zowe-USS-Persistent setting, ",
"initializeUSSFavorites.error.profile4": "which can be found in your VS Code user settings."
"initializeUSSFavorites.error.profile3": "or remove the favorites with this profile name from the Zowe-USS-Persistent setting, which can be found in your ",
"initializeUSSFavorites.error.profile4": " user settings."
}
4 changes: 2 additions & 2 deletions i18n/sample/src/ZosJobsProvider.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"initializeFavorites.log.debug": "initializing favorites",
"initializeJobsFavorites.error.profile1": "Error: You have Jobs favorites that refer to a non-existent CLI profile named: ",
"initializeJobsFavorites.error.profile2": ". To resolve this, you can create a profile with this name, ",
"initializeJobsFavorites.error.profile3": "or remove the favorites with this profile name from the Zowe-Jobs-Persistent setting, ",
"initializeJobsFavorites.error.profile4": "which can be found in your VS Code user settings.",
"initializeJobsFavorites.error.profile3": "or remove the favorites with this profile name from the Zowe-Jobs-Persistent setting, which can be found in your ",
"initializeJobsFavorites.error.profile4": " user settings.",
"searchHistory.options.prompt": "Select a filter",
"enterPattern.pattern": "No selection made.",
"jobsFilterPrompt.option.prompt.owner": "Enter the Job Owner. Default is *.",
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
6 changes: 3 additions & 3 deletions src/DatasetTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import * as nls from "vscode-nls";
import * as extension from "../src/extension";
import { PersistentFilters } from "./PersistentFilters";
import { Profiles } from "./Profiles";
import { sortTreeItems, applyIcons, FilterDescriptor, FilterItem, resolveQuickPickHelper } from "./utils";
import { sortTreeItems, applyIcons, FilterDescriptor, FilterItem, getAppName, resolveQuickPickHelper } from "./utils";
import { IZoweTree } from "./ZoweTree";
import { ZoweNode } from "./ZoweNode";
const localize = nls.config({ messageFormat: nls.MessageFormat.file })();
Expand Down Expand Up @@ -104,8 +104,8 @@ export class DatasetTree implements IZoweTree<ZoweNode> {
localize("intializeFavorites.error.profile2",
". To resolve this, you can create a profile with this name, ") +
localize("initializeFavorites.error.profile3",
"or remove the favorites with this profile name from the Zowe-DS-Persistent setting, ") +
localize("initializeFavorites.error.profile4", "which can be found in your VS Code user settings."));
"or remove the favorites with this profile name from the Zowe-DS-Persistent setting, which can be found in your ") +
getAppName(extension.ISTHEIA) + localize("initializeFavorites.error.profile4", " user settings."));
continue;
}
} else if (favoriteSearchPattern.test(line)) {
Expand Down
6 changes: 3 additions & 3 deletions src/USSTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import * as zowe from "@brightside/core";
// tslint:disable-next-line: no-implicit-dependencies
import { IProfileLoaded, Logger } from "@brightside/imperative";
import { applyIcons, FilterItem, FilterDescriptor, resolveQuickPickHelper, sortTreeItems } from "./utils";
import { applyIcons, FilterItem, FilterDescriptor, getAppName, resolveQuickPickHelper, sortTreeItems } from "./utils";
import * as vscode from "vscode";
import { IZoweTree } from "./ZoweTree";
import { ZoweUSSNode } from "./ZoweUSSNode";
Expand Down Expand Up @@ -466,8 +466,8 @@ export class USSTree implements IZoweTree<ZoweUSSNode> {
localize("intializeUSSFavorites.error.profile2",
". To resolve this, you can create a profile with this name, ") +
localize("initializeUSSFavorites.error.profile3",
"or remove the favorites with this profile name from the Zowe-USS-Persistent setting, ") +
localize("initializeUSSFavorites.error.profile4", "which can be found in your VS Code user settings."));
"or remove the favorites with this profile name from the Zowe-USS-Persistent setting, which can be found in your ") +
getAppName(extension.ISTHEIA) + localize("initializeUSSFavorites.error.profile4", " user settings."));
return;
}
});
Expand Down
15 changes: 12 additions & 3 deletions src/ZosJobsProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,17 @@ import { IProfileLoaded, Logger } from "@brightside/imperative";
import { Profiles } from "./Profiles";
import { PersistentFilters } from "./PersistentFilters";
import { Job } from "./ZoweJobNode";
import {
OwnerFilterDescriptor,
JobIdFilterDescriptor,
applyIcons,
FilterItem,
FilterDescriptor,
getAppName,
resolveQuickPickHelper,
sortTreeItems
} from "./utils";
import { IZoweTree } from "./ZoweTree";
import { OwnerFilterDescriptor, JobIdFilterDescriptor, applyIcons, FilterItem, FilterDescriptor, resolveQuickPickHelper, sortTreeItems } from "./utils";
import * as extension from "../src/extension";
import * as nls from "vscode-nls";
const localize = nls.config({ messageFormat: nls.MessageFormat.file })();
Expand Down Expand Up @@ -258,8 +267,8 @@ export class ZosJobsProvider implements IZoweTree<Job> {
localize("initializeJobsFavorites.error.profile2",
". To resolve this, you can create a profile with this name, ") +
localize("initializeJobsFavorites.error.profile3",
"or remove the favorites with this profile name from the Zowe-Jobs-Persistent setting, ") +
localize("initializeJobsFavorites.error.profile4", "which can be found in your VS Code user settings."));
"or remove the favorites with this profile name from the Zowe-Jobs-Persistent setting, which can be found in your ") +
getAppName(extension.ISTHEIA) + localize("initializeJobsFavorites.error.profile4", " user settings."));
return;
}
});
Expand Down
7 changes: 7 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,10 @@ export function concatChildNodes(nodes: ZoweNode[]) {

return allNodes;
}

/*************************************************************************************************************
* Determine IDE name to display based on app environment
*************************************************************************************************************/
export function getAppName(isTheia: boolean) {
return isTheia? "Theia" : "VS Code";
}

0 comments on commit ea6c44a

Please sign in to comment.