SubtitleEdit / subtitleedit

the subtitle editor :)
http://www.nikse.dk/SubtitleEdit/Help
GNU General Public License v3.0
8.4k stars 891 forks source link

[Feature] Add max merge attempts for auto-translate and ensure translation success #8840

Open LakeishaKowalczyk opened 1 week ago

LakeishaKowalczyk commented 1 week ago

Hello, I've noticed that merging translations leads to much better results compared to translating line by line, since the translation engine gets more context. I’d like to suggest adding an option: Max merge attempts (always=-1, never=0) with a fallback to forceSingleLineMode if it exceeds the allowed number of attempts.

When Max merge attempts = -1, the translation engine will always use the merge mode to ensure the best translation quality. When Max merge attempts = [positive integer], it will switch to SingleLineMode if the number of failed merge attempts goes over this value (this threshold is fixed at 20 now). When Max merge attempts = 0, merging translations will be completely disabled, working just like the "Translate each line separately" option.

I've also noticed that when using unreliable translation services or dealing with network issues,auto-translate often results in fragmented and nearly unusable output that require manual fixes. To handle this, I’m suggesting a confirmation step for SingleLineMode translations, it should only move to the next line if the translation result isn’t empty. Otherwise, it will keep retrying until a proper result is returned.

图片