Fixes #126408: Support changes in vscode-nls-dev that allow hint comments in package.nls.json

This commit is contained in:
Dirk Baeumer
2021-06-16 11:53:10 +02:00
parent b724a7a6dc
commit 9c3a109adf
3 changed files with 10 additions and 6 deletions

View File

@@ -320,7 +320,7 @@ function translatePackageJSON(packageJSON, packageNLSPath) {
else if (typeof val === 'string' && val.charCodeAt(0) === CharCode_PC && val.charCodeAt(val.length - 1) === CharCode_PC) {
const translated = packageNls[val.substr(1, val.length - 2)];
if (translated) {
obj[key] = translated;
obj[key] = typeof translated === 'string' ? translated : (typeof translated.message === 'string' ? translated.message : val);
}
}
}