Skip to content

Commit

Permalink
Address phrases and sentenses (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
RupengLiu authored Oct 14, 2020
1 parent a65f212 commit 77df31b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@
"azureApiManagement.generateKubernetesDeployment": "Generate Kubernetes Deployment File",
"azureApiManagement.generateNewGatewayToken": "Generate New Gateway Token",
"azureApiManagement.debugPolicy": "Start Policy Debugging",
"azureApiManagement.generateFunctions": "Generate Azure Functions",
"azureApiManagement.enableCreateFunctionApp": "Enables creating function app from API"
"azureApiManagement.generateFunctions": "Scaffold Azure Functions",
"azureApiManagement.enableCreateFunctionApp": "(Experimental Feature) Enables scaffolding Azure Functions functionality"
}
12 changes: 6 additions & 6 deletions src/commands/generateFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export async function generateFunctions(node?: ApiTreeItem): Promise<void> {
languages.map((s) => {return { label: s, description: '', detail: '' }; }), { placeHolder: "Select language", canPickMany: false});

if (!await checkEnvironmentInstalled(language.label)) {
throw new Error(`You haven't installed '${language.label}' on your machine, please install '${language.label}' to continue.`);
throw new Error(`'${language.label}' is not installed on your machine, please install '${language.label}' to continue.`);
}

let namespace = "";
Expand All @@ -67,20 +67,20 @@ export async function generateFunctions(node?: ApiTreeItem): Promise<void> {
await window.withProgress(
{
location: ProgressLocation.Notification,
title: localize("openAPI", `Downloading OpenAPI Document for API '${node.apiContract.name}'...`),
title: localize("openAPI", `Downloading OpenAPI Specification for API '${node.apiContract.name}'...`),
cancellable: false
},
async () => {
await fse.writeFile(openAPIFilePath, openAPIDocString);
}
).then(async () => {
window.showInformationMessage(localize("openAPIDownloaded", `Downloaded OpenAPI Document for API '${node!.apiContract.name} successfully.`));
window.showInformationMessage(localize("openAPIDownloaded", `Downloaded OpenAPI Specification for API '${node!.apiContract.name} successfully.`));
});

await window.withProgress(
{
location: ProgressLocation.Notification,
title: localize("generateFunctions", `Generating functions for API '${node.apiContract.name}'...`),
title: localize("generateFunctions", `Scaffolding Azure Functions for API '${node.apiContract.name}'...`),
cancellable: false
},
async () => {
Expand All @@ -107,15 +107,15 @@ export async function generateFunctions(node?: ApiTreeItem): Promise<void> {
args.push('--no-async');
break;
default:
throw new Error(localize("notSupported", "Not a supported language. We currently support C#, Java, Python, and Typescript"));
throw new Error(localize("notSupported", "Only C#, Java, Python, and Typescript are supported"));
}

ext.outputChannel.show();
await cpUtils.executeCommand(ext.outputChannel, undefined, 'autorest', ...args);
await promptOpenFileFolder(uris[0].fsPath);
}
).then(async () => {
window.showInformationMessage(localize("openAPIDownloaded", `Generated Azure Functions app for API '${node!.apiContract.name} successfully.`));
window.showInformationMessage(localize("openAPIDownloaded", `Scaffolded Azure Functions for API '${node!.apiContract.name} successfully.`));
});
}

Expand Down

0 comments on commit 77df31b

Please sign in to comment.