mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
cluster deploy extension: Add localization support and fix " to ' strings (#4332)
* Add localization support and fix " to ' strings
* Fix ${ usage
This commit is contained in:
@@ -5,12 +5,15 @@
|
||||
'use strict';
|
||||
|
||||
import vscode = require('vscode');
|
||||
import * as nls from 'vscode-nls';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
import { MainController } from './mainController';
|
||||
|
||||
import { fs } from './utility/fs';
|
||||
|
||||
import { host } from './kubectl/host';
|
||||
import { sqlserverbigdataclusterchannel } from './kubectl/SqlServerBigDataClusterChannel';
|
||||
import { sqlserverbigdataclusterchannel } from './kubectl/sqlServerBigDataClusterChannel';
|
||||
import { shell, Shell } from './utility/shell';
|
||||
import { CheckPresentMessageMode, create as kubectlCreate } from './kubectl/kubectl';
|
||||
import { installKubectl } from './installer/installer';
|
||||
@@ -36,22 +39,22 @@ export async function installDependencies() {
|
||||
|
||||
|
||||
const installPromises = [
|
||||
installDependency("kubectl", gotKubectl, installKubectl),
|
||||
installDependency('kubectl', gotKubectl, installKubectl)
|
||||
];
|
||||
|
||||
await Promise.all(installPromises);
|
||||
|
||||
sqlserverbigdataclusterchannel.showOutput("Done");
|
||||
sqlserverbigdataclusterchannel.showOutput(localize('done', 'Done'));
|
||||
}
|
||||
|
||||
async function installDependency(name: string, alreadyGot: boolean, installFunc: (shell: Shell) => Promise<Errorable<null>>): Promise<void> {
|
||||
if (alreadyGot) {
|
||||
sqlserverbigdataclusterchannel.showOutput(`Already got ${name}...`);
|
||||
sqlserverbigdataclusterchannel.showOutput(localize('dependencyInstalled', '{0} already installed...', name));
|
||||
} else {
|
||||
sqlserverbigdataclusterchannel.showOutput(`Installing ${name}...`);
|
||||
sqlserverbigdataclusterchannel.showOutput(localize('installingDependency', 'Installing {0}...', name));
|
||||
const result = await installFunc(shell);
|
||||
if (failed(result)) {
|
||||
sqlserverbigdataclusterchannel.showOutput(`Unable to install ${name}: ${result.error[0]}`);
|
||||
sqlserverbigdataclusterchannel.showOutput(localize('installingDependencyFailed', 'Unable to install {0}: {1}', name, result.error[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user