Skip to content

Commit

Permalink
Fix #42448
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Feb 5, 2018
1 parent 81d6d82 commit b60fe98
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/vs/platform/localizations/common/localizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ export function isValidLocalization(localization: ILocalization): boolean {
ExtensionsRegistry.registerExtensionPoint('localizations', [], {
description: localize('vscode.extension.contributes.localizations', "Contributes localizations to the editor"),
type: 'array',
default: [],
items: {
type: 'object',
required: ['languageId', 'translations'],
defaultSnippets: [{ body: { languageId: '', languageName: '', languageNameLocalized: '', translations: [{ id: 'vscode', path: '' }] } }],
properties: {
languageId: {
description: localize('vscode.extension.contributes.localizations.languageId', 'Id of the language into which the display strings are translated.'),
Expand All @@ -70,9 +73,10 @@ ExtensionsRegistry.registerExtensionPoint('localizations', [], {
translations: {
description: localize('vscode.extension.contributes.localizations.translations', 'List of translations associated to the language.'),
type: 'array',
default: [],
default: [{ id: 'vscode', path: '' }],
items: {
type: 'object',
required: ['id', 'path'],
properties: {
id: {
type: 'string',
Expand All @@ -84,8 +88,9 @@ ExtensionsRegistry.registerExtensionPoint('localizations', [], {
type: 'string',
description: localize('vscode.extension.contributes.localizations.translations.path', "A relative path to a file containing translations for the language.")
}
}
}
},
defaultSnippets: [{ body: { id: '', path: '' } }],
},
}
}
}
Expand Down

0 comments on commit b60fe98

Please sign in to comment.