sinedie / SRTranslator

SRT files translator
Do What The F*ck You Want To Public License
219 stars 27 forks source link

Removes line break from multiline subtitle #23

Closed Vrejf closed 1 year ago

Vrejf commented 1 year ago

All subtitle entries with multiple lines becomes just one line after the translation.

00:01:34,736 --> 00:01:37,719
- Alt i orden?
- Ja, jeg ville bare høre fra dig.

Becomes ------>

00:01:34,736 --> 00:01:37,719
- Everything okay? - Yes, I just wanted to hear
from you.

I've been trying to find the source of this and it seems to be sub.content = sub.content.strip().replace("\n", " ") in srt_file.py

sinedie commented 1 year ago

Yeah, it is intentional, cause when a sentence is break into two or more, the translation isn't too good.

Also, number of character doesn't stay the the same, that's why there is a "wrap line" mechanism.

Tho, I see why would you could like to be two lines if dialog starts with "-".