DeepL translation works

This commit is contained in:
Guillaume Tâche
2024-08-25 19:48:55 +02:00
parent 728b563d8b
commit e93a47f4e2
3 changed files with 64 additions and 7 deletions

View File

@@ -133,7 +133,7 @@ public class JSONSubtitleConverter implements SubtitleConverter<SubtitleImpl> {
if (newLength > maxLineLength * maxLines) {
final var newSubtitle = new SubtitleImpl(builder.toString(), currentStart, currentEnd, null, null);
ret.add(newSubtitle);
builder.delete(0, builder.length());
builder.setLength(0);
builder.append(text);
currentStart = start == 0 ? currentEnd : start;
} else if (areDifferentLines(builder.length(), newLength, maxLineLength)) {