Bug fix for import translations on blanks

This commit is contained in:
kngako
2023-01-13 22:13:58 +02:00
parent f3e5337498
commit 85b2391587

View File

@@ -1482,11 +1482,12 @@ module.exports = function (options) {
const translationChunkCell = sheet[`D${i}`]
if (translationChunkCell) {
lastTranslationChunkId = translationChunkCell.v
const translatedText = sheet[`C${i}`].v
const translatedCell = sheet[`C${i}`]
if (translatedCell) {
const translatedText = translatedCell.v
if (translatedText) {
console.log("Text: ", translatedText)
console.log("Chunk Id: ", lastTranslationChunkId)
// TODO: Get translationChunk and create translation...
const translationChunk = await db.TranslationChunk.findByPk(lastTranslationChunkId, {
include: [
@@ -1516,6 +1517,11 @@ module.exports = function (options) {
}
}
}
} else {
console.log(`${sheetName}: Couldn't find a translated cell C${i}: `, translatedCell)
console.log("Chunk Id: ", lastTranslationChunkId)
}
i++
}