Spaces:
Sleeping
Sleeping
Eason Lu
commited on
Commit
·
fdce050
1
Parent(s):
6113bd9
ignore note in translation
Browse filesFormer-commit-id: c1fc8645ac6ebfe1ec09f78b8afdc93377a0f132
SRT.py
CHANGED
@@ -92,7 +92,13 @@ class SRT_script():
|
|
92 |
print(translate)
|
93 |
|
94 |
for i, seg in enumerate(self.segments[start_seg_id-1:end_seg_id]):
|
95 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
pass
|
97 |
|
98 |
def split_seg(self, seg_id):
|
|
|
92 |
print(translate)
|
93 |
|
94 |
for i, seg in enumerate(self.segments[start_seg_id-1:end_seg_id]):
|
95 |
+
# naive way to due with merge translation problem
|
96 |
+
# TODO: need a smarter solution
|
97 |
+
|
98 |
+
if i < len(lines):
|
99 |
+
if "(Note:" in lines[i]: # to avoid note
|
100 |
+
lines.remove(lines[i])
|
101 |
+
seg.translation = lines[i].split(":")[1]
|
102 |
pass
|
103 |
|
104 |
def split_seg(self, seg_id):
|