Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
poFiles.forEach((poFile) => {
let poContents = fs.readFileSync(poFile, {
encoding: 'utf-8'
}).toString()
let data = po2json(poContents)
let lang = data.headers.Language
if (!translationData[lang]) {
translationData[lang] = data.messages
} else {
Object.assign(translationData[lang], data.messages)
}
})