mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add double quotes for localize hygiene check (#6492)
* Add localize single quote hygiene task * Update localize calls * Update comment * Fix build failures and remove test code
This commit is contained in:
@@ -26,7 +26,7 @@ export class NotebookConnection {
|
||||
|
||||
constructor(private _connectionProfile: IConnectionProfile) {
|
||||
if (!this._connectionProfile) {
|
||||
throw new Error(localize('connectionInfoMissing', 'connectionInfo is required'));
|
||||
throw new Error(localize('connectionInfoMissing', "connectionInfo is required"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,14 +29,14 @@ export class CellToggleMoreActions {
|
||||
constructor(
|
||||
@IInstantiationService private instantiationService: IInstantiationService) {
|
||||
this._actions.push(
|
||||
instantiationService.createInstance(DeleteCellAction, 'delete', localize('delete', 'Delete')),
|
||||
instantiationService.createInstance(AddCellFromContextAction, 'codeBefore', localize('codeBefore', 'Insert Code Before'), CellTypes.Code, false),
|
||||
instantiationService.createInstance(AddCellFromContextAction, 'codeAfter', localize('codeAfter', 'Insert Code After'), CellTypes.Code, true),
|
||||
instantiationService.createInstance(AddCellFromContextAction, 'markdownBefore', localize('markdownBefore', 'Insert Text Before'), CellTypes.Markdown, false),
|
||||
instantiationService.createInstance(AddCellFromContextAction, 'markdownAfter', localize('markdownAfter', 'Insert Text After'), CellTypes.Markdown, true),
|
||||
instantiationService.createInstance(DeleteCellAction, 'delete', localize('delete', "Delete")),
|
||||
instantiationService.createInstance(AddCellFromContextAction, 'codeBefore', localize('codeBefore', "Insert Code Before"), CellTypes.Code, false),
|
||||
instantiationService.createInstance(AddCellFromContextAction, 'codeAfter', localize('codeAfter', "Insert Code After"), CellTypes.Code, true),
|
||||
instantiationService.createInstance(AddCellFromContextAction, 'markdownBefore', localize('markdownBefore', "Insert Text Before"), CellTypes.Markdown, false),
|
||||
instantiationService.createInstance(AddCellFromContextAction, 'markdownAfter', localize('markdownAfter', "Insert Text After"), CellTypes.Markdown, true),
|
||||
instantiationService.createInstance(RunCellsAction, 'runAllBefore', localize('runAllBefore', "Run Cells Before"), false),
|
||||
instantiationService.createInstance(RunCellsAction, 'runAllAfter', localize('runAllAfter', "Run Cells After"), true),
|
||||
instantiationService.createInstance(ClearCellOutputAction, 'clear', localize('clear', 'Clear Output'))
|
||||
instantiationService.createInstance(ClearCellOutputAction, 'clear', localize('clear', "Clear Output"))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ export class OutputComponent extends AngularDisposable implements OnInit, AfterV
|
||||
this.errorText = undefined;
|
||||
if (!mimeType) {
|
||||
this.errorText = localize('noMimeTypeFound', "No {0}renderer could be found for output. It has the following MIME types: {1}",
|
||||
options.trusted ? '' : localize('safe', 'safe '),
|
||||
options.trusted ? '' : localize('safe', "safe "),
|
||||
Object.keys(options.data).join(', '));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -49,23 +49,23 @@ export class PlaceholderCellComponent extends CellView implements OnInit, OnChan
|
||||
}
|
||||
|
||||
get clickOn(): string {
|
||||
return localize('clickOn', 'Click on');
|
||||
return localize('clickOn', "Click on");
|
||||
}
|
||||
|
||||
get plusCode(): string {
|
||||
return localize('plusCode', '+ Code');
|
||||
return localize('plusCode', "+ Code");
|
||||
}
|
||||
|
||||
get or(): string {
|
||||
return localize('or', 'or');
|
||||
return localize('or', "or");
|
||||
}
|
||||
|
||||
get plusText(): string {
|
||||
return localize('plusText', '+ Text');
|
||||
return localize('plusText', "+ Text");
|
||||
}
|
||||
|
||||
get toAddCell(): string {
|
||||
return localize('toAddCell', 'to add a code or text cell');
|
||||
return localize('toAddCell', "to add a code or text cell");
|
||||
}
|
||||
|
||||
public addCell(cellType: string, event?: Event): void {
|
||||
|
||||
@@ -169,7 +169,7 @@ export class TextCellComponent extends CellView implements OnInit, OnChanges {
|
||||
if (trustedChanged || contentChanged) {
|
||||
this._lastTrustedMode = this.cellModel.trustedMode;
|
||||
if (!this.cellModel.source && !this.isEditMode) {
|
||||
this._content = localize('doubleClickEdit', 'Double-click to edit');
|
||||
this._content = localize('doubleClickEdit', "Double-click to edit");
|
||||
} else {
|
||||
this._content = this.cellModel.source;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ configurationRegistry.registerConfiguration({
|
||||
'notebook.useInProcMarkdown': {
|
||||
'type': 'boolean',
|
||||
'default': true,
|
||||
'description': localize('notebook.inProcMarkdown', 'Use in-process markdown viewer to render text cells more quickly (Experimental).')
|
||||
'description': localize('notebook.inProcMarkdown', "Use in-process markdown viewer to render text cells more quickly (Experimental).")
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -199,9 +199,9 @@ export abstract class MultiStateAction<T> extends Action {
|
||||
|
||||
export class TrustedAction extends ToggleableAction {
|
||||
// Constants
|
||||
private static readonly trustedLabel = localize('trustLabel', 'Trusted');
|
||||
private static readonly notTrustedLabel = localize('untrustLabel', 'Not Trusted');
|
||||
private static readonly alreadyTrustedMsg = localize('alreadyTrustedMsg', 'Notebook is already trusted.');
|
||||
private static readonly trustedLabel = localize('trustLabel', "Trusted");
|
||||
private static readonly notTrustedLabel = localize('untrustLabel', "Not Trusted");
|
||||
private static readonly alreadyTrustedMsg = localize('alreadyTrustedMsg', "Notebook is already trusted.");
|
||||
private static readonly baseClass = 'notebook-button';
|
||||
private static readonly trustedCssClass = 'icon-trusted';
|
||||
private static readonly notTrustedCssClass = 'icon-notTrusted';
|
||||
|
||||
@@ -287,7 +287,7 @@ export class CellModel implements ICellModel {
|
||||
} catch (error) {
|
||||
let message: string;
|
||||
if (error.message === 'Canceled') {
|
||||
message = localize('executionCanceled', 'Query execution was canceled');
|
||||
message = localize('executionCanceled', "Query execution was canceled");
|
||||
} else {
|
||||
message = getErrorMessage(error);
|
||||
}
|
||||
@@ -306,17 +306,17 @@ export class CellModel implements ICellModel {
|
||||
let model = this.options.notebook;
|
||||
let clientSession = model && model.clientSession;
|
||||
if (!clientSession) {
|
||||
this.sendNotification(notificationService, Severity.Error, localize('notebookNotReady', 'The session for this notebook is not yet ready'));
|
||||
this.sendNotification(notificationService, Severity.Error, localize('notebookNotReady', "The session for this notebook is not yet ready"));
|
||||
return undefined;
|
||||
} else if (!clientSession.isReady || clientSession.status === 'dead') {
|
||||
|
||||
this.sendNotification(notificationService, Severity.Info, localize('sessionNotReady', 'The session for this notebook will start momentarily'));
|
||||
this.sendNotification(notificationService, Severity.Info, localize('sessionNotReady', "The session for this notebook will start momentarily"));
|
||||
await clientSession.kernelChangeCompleted;
|
||||
}
|
||||
if (!clientSession.kernel) {
|
||||
let defaultKernel = model && model.defaultKernel && model.defaultKernel.name;
|
||||
if (!defaultKernel) {
|
||||
this.sendNotification(notificationService, Severity.Error, localize('noDefaultKernel', 'No kernel is available for this notebook'));
|
||||
this.sendNotification(notificationService, Severity.Error, localize('noDefaultKernel', "No kernel is available for this notebook"));
|
||||
return undefined;
|
||||
}
|
||||
await clientSession.changeKernel({
|
||||
|
||||
@@ -526,7 +526,7 @@ export interface ICellMagicMapper {
|
||||
export namespace notebookConstants {
|
||||
export const SQL = 'SQL';
|
||||
export const SQL_CONNECTION_PROVIDER = mssqlProviderName;
|
||||
export const sqlKernel: string = localize('sqlKernel', 'SQL');
|
||||
export const sqlKernel: string = localize('sqlKernel', "SQL");
|
||||
export const sqlKernelSpec: nb.IKernelSpec = ({
|
||||
name: sqlKernel,
|
||||
language: 'sql',
|
||||
|
||||
@@ -18,7 +18,7 @@ export class NotebookContexts {
|
||||
let defaultConnection: ConnectionProfile = <any>{
|
||||
providerName: mssqlProviderName,
|
||||
id: '-1',
|
||||
serverName: localize('selectConnection', 'Select Connection')
|
||||
serverName: localize('selectConnection', "Select Connection")
|
||||
};
|
||||
|
||||
return {
|
||||
@@ -32,7 +32,7 @@ export class NotebookContexts {
|
||||
let localConnection: ConnectionProfile = <any>{
|
||||
providerName: mssqlProviderName,
|
||||
id: '-1',
|
||||
serverName: localize('localhost', 'localhost')
|
||||
serverName: localize('localhost', "localhost")
|
||||
};
|
||||
|
||||
return {
|
||||
@@ -107,7 +107,7 @@ export class NotebookContexts {
|
||||
let newConnection = <ConnectionProfile><any>{
|
||||
providerName: 'SQL',
|
||||
id: '-2',
|
||||
serverName: localize('addConnection', 'Add New Connection')
|
||||
serverName: localize('addConnection', "Add New Connection")
|
||||
};
|
||||
activeConnections.push(newConnection);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user