mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
update the strings (#5904)
* update the strings * PR comments and remove the workaround
This commit is contained in:
@@ -47,7 +47,6 @@ export enum ToolType {
|
||||
AzCli,
|
||||
KubeCtl,
|
||||
Docker,
|
||||
Python,
|
||||
MSSQLCtl
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ export class AzCliTool implements ITool {
|
||||
}
|
||||
|
||||
get description(): string {
|
||||
return localize('resourceDeployment.AzCLIDescription', 'Tool used for managing Azure services');
|
||||
return localize('resourceDeployment.AzCLIDescription', 'A command-line tool for managing Azure resources');
|
||||
}
|
||||
|
||||
get type(): ToolType {
|
||||
|
||||
@@ -13,7 +13,7 @@ export class DockerTool implements ITool {
|
||||
}
|
||||
|
||||
get description(): string {
|
||||
return localize('resourceDeployment.DockerDescription', 'Manages the containers');
|
||||
return localize('resourceDeployment.DockerDescription', 'Provides the ability to package and run an application in isolated containers');
|
||||
}
|
||||
|
||||
get type(): ToolType {
|
||||
|
||||
@@ -13,7 +13,7 @@ export class KubeCtlTool implements ITool {
|
||||
}
|
||||
|
||||
get description(): string {
|
||||
return localize('resourceDeployment.KubeCtlDescription', 'Tool used for managing the Kubernetes cluster');
|
||||
return localize('resourceDeployment.KubeCtlDescription', 'A command-line tool allows you to run commands against Kubernetes clusters');
|
||||
}
|
||||
|
||||
get type(): ToolType {
|
||||
|
||||
@@ -13,7 +13,7 @@ export class MSSQLCtlTool implements ITool {
|
||||
}
|
||||
|
||||
get description(): string {
|
||||
return localize('resourceDeployment.MssqlCtlDescription', 'Command-line tool for installing and managing the SQL Server big data cluster');
|
||||
return localize('resourceDeployment.MssqlCtlDescription', 'A command-line utility written in Python that enables cluster administrators to bootstrap and manage the big data cluster via REST APIs');
|
||||
}
|
||||
|
||||
get type(): ToolType {
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
import { ToolType, ITool } from '../../interfaces';
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
export class PythonTool implements ITool {
|
||||
get name(): string {
|
||||
return 'python';
|
||||
}
|
||||
|
||||
get description(): string {
|
||||
return localize('resourceDeployment.PythonDescription', 'Required by notebook feature');
|
||||
}
|
||||
|
||||
get type(): ToolType {
|
||||
return ToolType.Python;
|
||||
}
|
||||
|
||||
get displayName(): string {
|
||||
return localize('resourceDeployment.PythonDisplayName', 'Python');
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,6 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
import { ITool } from '../interfaces';
|
||||
import { PythonTool } from './tools/pythonTool';
|
||||
import { DockerTool } from './tools/dockerTool';
|
||||
import { AzCliTool } from './tools/azCliTool';
|
||||
import { MSSQLCtlTool } from './tools/mssqlCtlTool';
|
||||
@@ -16,7 +15,7 @@ export interface IToolsService {
|
||||
|
||||
export class ToolsService implements IToolsService {
|
||||
constructor() {
|
||||
this.SupportedTools = [new PythonTool(), new DockerTool(), new AzCliTool(), new MSSQLCtlTool(), new KubeCtlTool()];
|
||||
this.SupportedTools = [new DockerTool(), new AzCliTool(), new MSSQLCtlTool(), new KubeCtlTool()];
|
||||
}
|
||||
|
||||
private SupportedTools: ITool[];
|
||||
|
||||
@@ -20,8 +20,7 @@ suite('Tools Service Tests', function (): void {
|
||||
{ name: 'azcli', type: ToolType.AzCli },
|
||||
{ name: 'docker', type: ToolType.Docker },
|
||||
{ name: 'kubectl', type: ToolType.KubeCtl },
|
||||
{ name: 'mssqlctl', type: ToolType.MSSQLCtl },
|
||||
{ name: 'python', type: ToolType.Python }];
|
||||
{ name: 'mssqlctl', type: ToolType.MSSQLCtl }];
|
||||
|
||||
const missingTypes: string[] = [];
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ export class ResourceDeploymentDialog {
|
||||
private resourceTypeService: IResourceTypeService,
|
||||
resourceType: ResourceType) {
|
||||
this._selectedResourceType = resourceType;
|
||||
this._dialogObject = azdata.window.createModelViewDialog(localize('deploymentDialog.title', 'Select a configuration'), 'resourceDeploymentDialog', true);
|
||||
this._dialogObject = azdata.window.createModelViewDialog(localize('deploymentDialog.title', 'Select the deployment options'), 'resourceDeploymentDialog', true);
|
||||
this._dialogObject.cancelButton.onClick(() => this.onCancel());
|
||||
this._dialogObject.okButton.label = localize('deploymentDialog.OKButtonText', 'Select');
|
||||
this._dialogObject.okButton.label = localize('deploymentDialog.OKButtonText', 'Open Notebook');
|
||||
this._dialogObject.okButton.onClick(() => this.onComplete());
|
||||
}
|
||||
|
||||
@@ -89,11 +89,11 @@ export class ResourceDeploymentDialog {
|
||||
|
||||
const form = formBuilder.withLayout({ width: '100%' }).component();
|
||||
|
||||
if (this._selectedResourceType) {
|
||||
this.selectResourceType(this._selectedResourceType);
|
||||
}
|
||||
|
||||
return view.initializeModel(form);
|
||||
return view.initializeModel(form).then(() => {
|
||||
if (this._selectedResourceType) {
|
||||
this.selectResourceType(this._selectedResourceType);
|
||||
}
|
||||
});
|
||||
});
|
||||
this._dialogObject.content = [tab];
|
||||
}
|
||||
@@ -160,18 +160,13 @@ export class ResourceDeploymentDialog {
|
||||
}
|
||||
|
||||
private updateTools(): void {
|
||||
// do a 10 ms delay to workaround the issue of first time load:
|
||||
// during initialization this update to table will be processed prior to the table initialization update
|
||||
// as a result the data will be overwritten, introduce a short delay so that the order of updates can be maintained.
|
||||
setTimeout(() => {
|
||||
const tools = this.getCurrentProvider().requiredTools;
|
||||
const headerRowHeight = 28;
|
||||
this._toolsTable.height = 25 * tools.length + headerRowHeight;
|
||||
this._toolsTable.data = tools.map(toolRef => {
|
||||
const tool = this.toolsService.getToolByName(toolRef.name)!;
|
||||
return [tool.displayName, tool.description];
|
||||
});
|
||||
}, 10);
|
||||
const tools = this.getCurrentProvider().requiredTools;
|
||||
const headerRowHeight = 28;
|
||||
this._toolsTable.height = 25 * tools.length + headerRowHeight;
|
||||
this._toolsTable.data = tools.map(toolRef => {
|
||||
const tool = this.toolsService.getToolByName(toolRef.name)!;
|
||||
return [tool.displayName, tool.description];
|
||||
});
|
||||
}
|
||||
|
||||
private getCurrentProvider(): DeploymentProvider {
|
||||
|
||||
Reference in New Issue
Block a user