fixes #301
This commit is contained in:
parent
719e8b1a20
commit
ec09898a9f
1 changed files with 2 additions and 0 deletions
|
|
@ -49,6 +49,8 @@ class TokensAlignment:
|
|||
|
||||
def add_translation(self, segment: Segment) -> None:
|
||||
"""Append translated text segments that overlap with a segment."""
|
||||
if segment.translation is None:
|
||||
segment.translation = ''
|
||||
for ts in self.all_translation_segments:
|
||||
if ts.is_within(segment):
|
||||
segment.translation += ts.text + (self.sep if ts.text else '')
|
||||
|
|
|
|||
Loading…
Reference in a new issue