Clarify parameters with backticks in error messages

Also add missing 'id' to the duplicateView2 message
This commit is contained in:
Dániel Tar
2017-09-27 18:51:37 +02:00
committed by GitHub
parent 98b1318a91
commit eb57f03d65

View File

@@ -113,11 +113,11 @@ ExtensionsRegistry.registerExtensionPoint<{ [loc: string]: schema.IUserFriendlyV
// validate
if (viewIds.indexOf(viewDescriptor.id) !== -1) {
collector.error(localize('duplicateView1', "Cannot register multiple views with same id {0} in the location {1}", viewDescriptor.id, viewDescriptor.location.id));
collector.error(localize('duplicateView1', "Cannot register multiple views with same id `{0}` in the location `{1}`", viewDescriptor.id, viewDescriptor.location.id));
return null;
}
if (registeredViews.some(v => v.id === viewDescriptor.id)) {
collector.error(localize('duplicateView2', "A view with {0} is already registered in the location {1}", viewDescriptor.id, viewDescriptor.location.id));
collector.error(localize('duplicateView2', "A view with id `{0}` is already registered in the location `{1}`", viewDescriptor.id, viewDescriptor.location.id));
return null;
}
@@ -127,4 +127,4 @@ ExtensionsRegistry.registerExtensionPoint<{ [loc: string]: schema.IUserFriendlyV
ViewsRegistry.registerViews(viewDescriptors);
});
}
});
});