-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix VTT issues #341
Fix VTT issues #341
Conversation
@@ -45,7 +45,9 @@ def parse(self, content, **kwargs): | |||
self.transcriber.copy_until(len(source)) | |||
|
|||
template = self.transcriber.get_destination() | |||
if not template.startswith("WEBVTT"): | |||
if len(stringset) == 0: | |||
raise ParseError("There are no strings to translate") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented issue 6 from QA spreadsheet: system should fail if source content consists of only WEBVTT signature
@@ -101,10 +103,6 @@ def _parse_section(self, offset, section): | |||
|
|||
# Content | |||
string_to_translate = "\n".join(src_strings[timings_index + 1 :]) | |||
if string_to_translate == "": | |||
raise ParseError( | |||
f"Subtitle is empty on line {self.transcriber.line_number + 2}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implemented issue 3 from QA spreadsheet: system should allow uploading (parsing) even if some subtitles are empty
@kbairak In short: At openformats level, we don't have info during Please let us know your thoughts on this. |
@kbairak added fixes for AE-45 + checked for scenarios you mentioned:
Testable were 1 and 2. 3 is only testable outside openformats testbed |
Hey @dsavinov-actionengine, thanks for the update. I will start checking. This
however, is not true. You can do/write a test like this: handler = VttHandler()
template, stringset = handler.parse(...) # A source text with 3 strings
compiled = handler.compile(template, stringset[:2]) # skip the 3rd string
assertEqual(compiled, ...) |
Problem and/or solution
VTT fixes for issues found during the 1st QA pass
How to test
Reviewer checklist
Code:
PR: