Skip to content

Commit 7b527ee

Browse files
committed
add space in chinese & japanese langauges for word wrap in hardcode
1 parent 990e714 commit 7b527ee

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

genSRT.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ for (i = 1; i <= 114; i++) {
5454
vttArr.push(j)
5555
textArr.push(srtTimings[counter])
5656
vttArr.push(srtTimings[counter].replace(/,/gi,".")+verticalTopPosition)
57+
if(file.startsWith('jpn')||file.startsWith('zho'))
58+
textArr.push(tranArr[counter].replace(//gi,'。 ').replace(//gi,', '))
59+
else
5760
textArr.push(tranArr[counter])
5861
vttArr.push(tranArr[counter])
5962
textArr.push("")

0 commit comments

Comments
 (0)