mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Localize some missed status messages (#7076)
* Localize some missed status messages * More service text updates
This commit is contained in:
@@ -49,7 +49,7 @@ export class ServiceClient {
|
|||||||
const processStart = Date.now();
|
const processStart = Date.now();
|
||||||
client.onReady().then(() => {
|
client.onReady().then(() => {
|
||||||
const processEnd = Date.now();
|
const processEnd = Date.now();
|
||||||
this.statusView.text = localize('serviceStarted', 'Service Started');
|
this.statusView.text = localize('serviceStarted', "{0} Started", Constants.serviceName);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.statusView.hide();
|
this.statusView.hide();
|
||||||
}, 1500);
|
}, 1500);
|
||||||
@@ -61,13 +61,13 @@ export class ServiceClient {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.statusView.show();
|
this.statusView.show();
|
||||||
this.statusView.text = localize('serviceStarting', 'Starting service');
|
this.statusView.text = localize('serviceStarting', "Starting {0}", Constants.serviceName);
|
||||||
let disposable = client.start();
|
let disposable = client.start();
|
||||||
context.subscriptions.push(disposable);
|
context.subscriptions.push(disposable);
|
||||||
resolve(client);
|
resolve(client);
|
||||||
}, e => {
|
}, e => {
|
||||||
Telemetry.sendTelemetryEvent('ServiceInitializingFailed');
|
Telemetry.sendTelemetryEvent('ServiceInitializingFailed');
|
||||||
vscode.window.showErrorMessage(localize('flatFileImport.serviceStartFailed', 'Failed to start Import service{0}', e));
|
vscode.window.showErrorMessage(localize('flatFileImport.serviceStartFailed', "Failed to start {0}: {1}", Constants.serviceName, e));
|
||||||
// Just resolve to avoid unhandled promise. We show the error to the user.
|
// Just resolve to avoid unhandled promise. We show the error to the user.
|
||||||
resolve(undefined);
|
resolve(undefined);
|
||||||
});
|
});
|
||||||
@@ -113,16 +113,16 @@ export class ServiceClient {
|
|||||||
case Events.INSTALL_START:
|
case Events.INSTALL_START:
|
||||||
this.outputChannel.show(true);
|
this.outputChannel.show(true);
|
||||||
this.statusView.show();
|
this.statusView.show();
|
||||||
this.outputChannel.appendLine(localize('installingServiceDetailed', 'Installing {0} service to {1}', Constants.serviceName, args[0]));
|
this.outputChannel.appendLine(localize('installingServiceDetailed', "Installing {0} to {1}", Constants.serviceName, args[0]));
|
||||||
this.statusView.text = localize('installingService', 'Installing Service');
|
this.statusView.text = localize('installingService', "Installing {0} Service", Constants.serviceName);
|
||||||
break;
|
break;
|
||||||
case Events.INSTALL_END:
|
case Events.INSTALL_END:
|
||||||
this.outputChannel.appendLine(localize('serviceInstalled', 'Installed'));
|
this.outputChannel.appendLine(localize('serviceInstalled', "Installed {0}", Constants.serviceName));
|
||||||
break;
|
break;
|
||||||
case Events.DOWNLOAD_START:
|
case Events.DOWNLOAD_START:
|
||||||
this.outputChannel.appendLine(localize('downloadingService', 'Downloading {0}', args[0]));
|
this.outputChannel.appendLine(localize('downloadingService', "Downloading {0}", args[0]));
|
||||||
this.outputChannel.append(localize('downloadingServiceSize', '({0} KB)', Math.ceil(args[1] / 1024).toLocaleString(vscode.env.language)));
|
this.outputChannel.append(localize('downloadingServiceSize', "({0} KB)", Math.ceil(args[1] / 1024).toLocaleString(vscode.env.language)));
|
||||||
this.statusView.text = localize('downloadingServiceStatus', 'Downloading Service');
|
this.statusView.text = localize('downloadingServiceStatus', "Downloading {0}", Constants.serviceName);
|
||||||
break;
|
break;
|
||||||
case Events.DOWNLOAD_PROGRESS:
|
case Events.DOWNLOAD_PROGRESS:
|
||||||
let newDots = Math.ceil(args[0] / 5);
|
let newDots = Math.ceil(args[0] / 5);
|
||||||
@@ -132,7 +132,7 @@ export class ServiceClient {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Events.DOWNLOAD_END:
|
case Events.DOWNLOAD_END:
|
||||||
this.outputChannel.appendLine(localize('downloadingServiceComplete', 'Done!'));
|
this.outputChannel.appendLine(localize('downloadingServiceComplete', "Done downloading {0}", Constants.serviceName));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.error(`Unknown event from Server Provider ${e}`);
|
console.error(`Unknown event from Server Provider ${e}`);
|
||||||
|
|||||||
@@ -4,10 +4,8 @@
|
|||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
export const serviceName = 'SqlToolsService';
|
export const serviceName = 'SQL Tools Service';
|
||||||
export const providerId = 'MSSQL';
|
export const providerId = 'MSSQL';
|
||||||
export const serviceCrashMessage = 'SQL Tools Service component exited unexpectedly. Please restart Azure Data Studio.';
|
|
||||||
export const serviceCrashButton = 'View Known Issues';
|
|
||||||
export const serviceCrashLink = 'https://github.com/Microsoft/vscode-mssql/wiki/SqlToolsService-Known-Issues';
|
export const serviceCrashLink = 'https://github.com/Microsoft/vscode-mssql/wiki/SqlToolsService-Known-Issues';
|
||||||
export const extensionConfigSectionName = 'mssql';
|
export const extensionConfigSectionName = 'mssql';
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export class SqlToolsServer {
|
|||||||
const processStart = Date.now();
|
const processStart = Date.now();
|
||||||
this.client.onReady().then(() => {
|
this.client.onReady().then(() => {
|
||||||
const processEnd = Date.now();
|
const processEnd = Date.now();
|
||||||
statusView.text = 'Service Started';
|
statusView.text = localize('serviceStartedStatusMsg', "{0} Started", Constants.serviceName);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
statusView.hide();
|
statusView.hide();
|
||||||
}, 1500);
|
}, 1500);
|
||||||
@@ -58,13 +58,13 @@ export class SqlToolsServer {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
statusView.show();
|
statusView.show();
|
||||||
statusView.text = 'Starting service';
|
statusView.text = localize('startingServiceStatusMsg', "Starting {0}", Constants.serviceName);
|
||||||
this.client.start();
|
this.client.start();
|
||||||
await this.activateFeatures(context);
|
await this.activateFeatures(context);
|
||||||
return this.client;
|
return this.client;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Telemetry.sendTelemetryEvent('ServiceInitializingFailed');
|
Telemetry.sendTelemetryEvent('ServiceInitializingFailed');
|
||||||
vscode.window.showErrorMessage('Failed to start Sql tools service');
|
vscode.window.showErrorMessage(localize('failedToStartServiceErrorMsg', "Failed to start {0}", Constants.serviceName));
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -108,16 +108,16 @@ function generateHandleServerProviderEvent() {
|
|||||||
case Events.INSTALL_START:
|
case Events.INSTALL_START:
|
||||||
outputChannel.show(true);
|
outputChannel.show(true);
|
||||||
statusView.show();
|
statusView.show();
|
||||||
outputChannel.appendLine(localize('installingServiceChannelMsg', 'Installing {0} service to {1}', Constants.serviceName, args[0]));
|
outputChannel.appendLine(localize('installingServiceChannelMsg', "Installing {0} to {1}", Constants.serviceName, args[0]));
|
||||||
statusView.text = localize('installingServiceStatusMsg', 'Installing Service');
|
statusView.text = localize('installingServiceStatusMsg', "Installing {0}", Constants.serviceName);
|
||||||
break;
|
break;
|
||||||
case Events.INSTALL_END:
|
case Events.INSTALL_END:
|
||||||
outputChannel.appendLine(localize('installedServiceChannelMsg', 'Installed'));
|
outputChannel.appendLine(localize('installedServiceChannelMsg', "Installed {0}", Constants.serviceName));
|
||||||
break;
|
break;
|
||||||
case Events.DOWNLOAD_START:
|
case Events.DOWNLOAD_START:
|
||||||
outputChannel.appendLine(localize('downloadingServiceChannelMsg', 'Downloading {0}', args[0]));
|
outputChannel.appendLine(localize('downloadingServiceChannelMsg', "Downloading {0}", args[0]));
|
||||||
outputChannel.append(localize('downloadingServiceSizeChannelMsg', '({0} KB)', Math.ceil(args[1] / 1024).toLocaleString(vscode.env.language)));
|
outputChannel.append(localize('downloadingServiceSizeChannelMsg', "({0} KB)", Math.ceil(args[1] / 1024).toLocaleString(vscode.env.language)));
|
||||||
statusView.text = localize('downloadingServiceStatusMsg', 'Downloading Service');
|
statusView.text = localize('downloadingServiceStatusMsg', "Downloading {0}", Constants.serviceName);
|
||||||
break;
|
break;
|
||||||
case Events.DOWNLOAD_PROGRESS:
|
case Events.DOWNLOAD_PROGRESS:
|
||||||
let newDots = Math.ceil(args[0] / 5);
|
let newDots = Math.ceil(args[0] / 5);
|
||||||
@@ -127,7 +127,7 @@ function generateHandleServerProviderEvent() {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Events.DOWNLOAD_END:
|
case Events.DOWNLOAD_END:
|
||||||
outputChannel.appendLine(localize('downloadServiceDoneChannelMsg', 'Done!'));
|
outputChannel.appendLine(localize('downloadServiceDoneChannelMsg', "Done installing {0}", Constants.serviceName));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.error(`Unknown event from Server Provider ${e}`);
|
console.error(`Unknown event from Server Provider ${e}`);
|
||||||
|
|||||||
@@ -9,8 +9,10 @@ import { ErrorAction, ErrorHandler, Message, CloseAction } from 'vscode-language
|
|||||||
|
|
||||||
import * as Utils from './utils';
|
import * as Utils from './utils';
|
||||||
import * as Constants from './constants';
|
import * as Constants from './constants';
|
||||||
|
import { localize } from './localize';
|
||||||
|
|
||||||
const packageJson = require('../package.json');
|
const packageJson = require('../package.json');
|
||||||
|
const viewKnownIssuesAction = localize('viewKnownIssuesText', "View Known Issues");
|
||||||
|
|
||||||
export interface ITelemetryEventProperties {
|
export interface ITelemetryEventProperties {
|
||||||
[key: string]: string;
|
[key: string]: string;
|
||||||
@@ -125,9 +127,9 @@ export class LanguageClientErrorHandler implements ErrorHandler {
|
|||||||
showOnErrorPrompt(): void {
|
showOnErrorPrompt(): void {
|
||||||
Telemetry.sendTelemetryEvent(Constants.serviceName + 'Crash');
|
Telemetry.sendTelemetryEvent(Constants.serviceName + 'Crash');
|
||||||
vscode.window.showErrorMessage(
|
vscode.window.showErrorMessage(
|
||||||
Constants.serviceCrashMessage,
|
localize('serviceCrashMessage', "{0} component exited unexpectedly. Please restart Azure Data Studio.", Constants.serviceName),
|
||||||
Constants.serviceCrashButton).then(action => {
|
viewKnownIssuesAction).then(action => {
|
||||||
if (action && action === Constants.serviceCrashButton) {
|
if (action && action === viewKnownIssuesAction) {
|
||||||
vscode.env.openExternal(vscode.Uri.parse(Constants.serviceCrashLink));
|
vscode.env.openExternal(vscode.Uri.parse(Constants.serviceCrashLink));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user