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:
Charles Gagnon
2019-07-25 10:35:14 -07:00
committed by GitHub
parent 69845b29ef
commit b2b2840990
141 changed files with 651 additions and 630 deletions

View File

@@ -26,11 +26,11 @@ let notebookProviderType: IJSONSchema = {
default: { provider: '', fileExtensions: [], standardKernels: [] },
properties: {
provider: {
description: localize('carbon.extension.contributes.notebook.provider', 'Identifier of the notebook provider.'),
description: localize('carbon.extension.contributes.notebook.provider', "Identifier of the notebook provider."),
type: 'string'
},
fileExtensions: {
description: localize('carbon.extension.contributes.notebook.fileExtensions', 'What file extensions should be registered to this notebook provider'),
description: localize('carbon.extension.contributes.notebook.fileExtensions', "What file extensions should be registered to this notebook provider"),
oneOf: [
{ type: 'string' },
{
@@ -42,7 +42,7 @@ let notebookProviderType: IJSONSchema = {
]
},
standardKernels: {
description: localize('carbon.extension.contributes.notebook.standardKernels', 'What kernels should be standard with this notebook provider'),
description: localize('carbon.extension.contributes.notebook.standardKernels', "What kernels should be standard with this notebook provider"),
oneOf: [
{
type: 'object',
@@ -101,19 +101,19 @@ let notebookLanguageMagicType: IJSONSchema = {
default: { magic: '', language: '', kernels: [], executionTarget: null },
properties: {
magic: {
description: localize('carbon.extension.contributes.notebook.magic', 'Name of the cell magic, such as "%%sql".'),
description: localize('carbon.extension.contributes.notebook.magic', "Name of the cell magic, such as '%%sql'."),
type: 'string'
},
language: {
description: localize('carbon.extension.contributes.notebook.language', 'The cell language to be used if this cell magic is included in the cell'),
description: localize('carbon.extension.contributes.notebook.language', "The cell language to be used if this cell magic is included in the cell"),
type: 'string'
},
executionTarget: {
description: localize('carbon.extension.contributes.notebook.executionTarget', 'Optional execution target this magic indicates, for example Spark vs SQL'),
description: localize('carbon.extension.contributes.notebook.executionTarget', "Optional execution target this magic indicates, for example Spark vs SQL"),
type: 'string'
},
kernels: {
description: localize('carbon.extension.contributes.notebook.kernels', 'Optional set of kernels this is valid for, e.g. python3, pyspark3, sql'),
description: localize('carbon.extension.contributes.notebook.kernels', "Optional set of kernels this is valid for, e.g. python3, pyspark3, sql"),
oneOf: [
{ type: 'string' },
{

View File

@@ -348,7 +348,7 @@ export class NotebookService extends Disposable implements INotebookService {
async getOrCreateNotebookManager(providerId: string, uri: URI): Promise<INotebookManager> {
if (!uri) {
throw new Error(localize('notebookUriNotDefined', 'No URI was passed when creating a notebook manager'));
throw new Error(localize('notebookUriNotDefined', "No URI was passed when creating a notebook manager"));
}
let uriString = uri.toString();
let managers: INotebookManager[] = this._managersMap.get(uriString);
@@ -472,7 +472,7 @@ export class NotebookService extends Disposable implements INotebookService {
// Should never happen, but if default wasn't registered we should throw
if (!instance) {
throw new Error(localize('notebookServiceNoProvider', 'Notebook provider does not exist'));
throw new Error(localize('notebookServiceNoProvider', "Notebook provider does not exist"));
}
return instance;
}

View File

@@ -8,8 +8,8 @@ import { localize } from 'vs/nls';
import { FutureInternal } from 'sql/workbench/parts/notebook/node/models/modelInterfaces';
import { ConnectionProfile } from 'sql/platform/connection/common/connectionProfile';
export const noKernel: string = localize('noKernel', 'No Kernel');
const runNotebookDisabled = localize('runNotebookDisabled', 'Cannot run cells as no kernel has been configured');
export const noKernel: string = localize('noKernel', "No Kernel");
const runNotebookDisabled = localize('runNotebookDisabled', "Cannot run cells as no kernel has been configured");
let noKernelSpec: nb.IKernelSpec = ({
name: noKernel,
@@ -210,7 +210,7 @@ export class EmptyFuture implements FutureInternal {
msg_type: 'error'
},
content: <nb.IErrorResult>{
ename: localize('errorName', 'Error'),
ename: localize('errorName', "Error"),
evalue: runNotebookDisabled,
output_type: 'error'
},