Bug fix for import translations on blanks
This commit is contained in:
@@ -1482,11 +1482,12 @@ module.exports = function (options) {
|
|||||||
const translationChunkCell = sheet[`D${i}`]
|
const translationChunkCell = sheet[`D${i}`]
|
||||||
if (translationChunkCell) {
|
if (translationChunkCell) {
|
||||||
lastTranslationChunkId = translationChunkCell.v
|
lastTranslationChunkId = translationChunkCell.v
|
||||||
const translatedText = sheet[`C${i}`].v
|
const translatedCell = sheet[`C${i}`]
|
||||||
|
|
||||||
|
if (translatedCell) {
|
||||||
|
const translatedText = translatedCell.v
|
||||||
|
|
||||||
if (translatedText) {
|
if (translatedText) {
|
||||||
console.log("Text: ", translatedText)
|
|
||||||
console.log("Chunk Id: ", lastTranslationChunkId)
|
|
||||||
// TODO: Get translationChunk and create translation...
|
// TODO: Get translationChunk and create translation...
|
||||||
const translationChunk = await db.TranslationChunk.findByPk(lastTranslationChunkId, {
|
const translationChunk = await db.TranslationChunk.findByPk(lastTranslationChunkId, {
|
||||||
include: [
|
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++
|
i++
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user