diff --git a/extensions/json/server/src/jsonParser.ts b/extensions/json/server/src/jsonParser.ts index e6579b8d8e2a03707b5d9bf30c93b4ffe7f5bb56..142d00cd8dabeac04b7e4a624c3b106c5a7c015b 100644 --- a/extensions/json/server/src/jsonParser.ts +++ b/extensions/json/server/src/jsonParser.ts @@ -106,7 +106,7 @@ export class ASTNode { if ((schema.type).indexOf(this.type) === -1) { validationResult.warnings.push({ location: { start: this.start, end: this.end }, - message: localize('typeArrayMismatchWarning', 'Incorrect type. Expected one of {0}', (schema.type).join(', ')) + message: schema.errorMessage || localize('typeArrayMismatchWarning', 'Incorrect type. Expected one of {0}', (schema.type).join(', ')) }); } } @@ -114,7 +114,7 @@ export class ASTNode { if (this.type !== schema.type) { validationResult.warnings.push({ location: { start: this.start, end: this.end }, - message: localize('typeMismatchWarning', 'Incorrect type. Expected "{0}"', schema.type) + message: schema.errorMessage || localize('typeMismatchWarning', 'Incorrect type. Expected "{0}"', schema.type) }); } } diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index cc25887091af21166637f96ea58b958ee3325835..181e347ca597cc70dc8ddfd14e1b2e486b7a3b85 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -752,12 +752,14 @@ configurationRegistry.registerConfiguration({ 'type': 'number', 'default': DEFAULT_INDENTATION.tabSize, 'minimum': 1, - 'description': nls.localize('tabSize', "The number of spaces a tab is equal to.") + 'description': nls.localize('tabSize', "The number of spaces a tab is equal to."), + 'errorMessage': nls.localize('tabSize.errorMessage', "Expected 'number'. Note that the value \"auto\" has been replaced by the `editor.detectIndentation` setting.") }, 'editor.insertSpaces' : { 'type': 'boolean', 'default': DEFAULT_INDENTATION.insertSpaces, - 'description': nls.localize('insertSpaces', "Insert spaces when pressing Tab.") + 'description': nls.localize('insertSpaces', "Insert spaces when pressing Tab."), + 'errorMessage': nls.localize('insertSpaces.errorMessage', "Expected 'boolean'. Note that the value \"auto\" has been replaced by the `editor.detectIndentation` setting.") }, 'editor.detectIndentation' : { 'type': 'boolean', diff --git a/src/vs/languages/json/common/parser/jsonParser.ts b/src/vs/languages/json/common/parser/jsonParser.ts index b8a8b4721075bb99923cffb1d9fd9b7ff1b41830..df73072da3bed999c9afe94b1c7a3394be1a3b8c 100644 --- a/src/vs/languages/json/common/parser/jsonParser.ts +++ b/src/vs/languages/json/common/parser/jsonParser.ts @@ -105,7 +105,7 @@ export class ASTNode { if (Arrays.contains( schema.type, this.type) === false) { validationResult.warnings.push({ location: { start: this.start, end: this.end }, - message: nls.localize('typeArrayMismatchWarning', 'Incorrect type. Expected one of {0}', ( schema.type).join()) + message: schema.errorMessage || nls.localize('typeArrayMismatchWarning', 'Incorrect type. Expected one of {0}', ( schema.type).join()) }); } } @@ -113,7 +113,7 @@ export class ASTNode { if (this.type !== schema.type) { validationResult.warnings.push({ location: { start: this.start, end: this.end }, - message: nls.localize('typeMismatchWarning', 'Incorrect type. Expected "{0}"', schema.type) + message: schema.errorMessage || nls.localize('typeMismatchWarning', 'Incorrect type. Expected "{0}"', schema.type) }); } }