in Extensions/Common/lib/vsts-task-lib/task.js [84:106]
function loadLocStrings(resourceFile) {
var locStrings = {};
if (resourceFile && fs.existsSync(resourceFile)) {
debug('load loc strings from: ' + resourceFile);
var resourceJson = require(resourceFile);
if (resourceJson && resourceJson.hasOwnProperty('messages')) {
for (var key in resourceJson.messages) {
if (typeof (resourceJson.messages[key]) === 'object') {
if (resourceJson.messages[key].loc && resourceJson.messages[key].loc.toString().length > 0) {
locStrings[key] = resourceJson.messages[key].loc.toString();
}
else if (resourceJson.messages[key].fallback) {
locStrings[key] = resourceJson.messages[key].fallback.toString();
}
}
else if (typeof (resourceJson.messages[key]) === 'string') {
locStrings[key] = resourceJson.messages[key];
}
}
}
}
return locStrings;
}