feat: begin a translation from the document being read - #104
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The second slice of M2.6, decision 13: a translation is born from the document being read. New translation from source on the File menu makes the target from the source, every cue and every timing carried over with nothing written in them, and no file behind it until the first save, which asks where to put it exactly as it already does for a document that has never had one.
The emptying happens on a scratch session whose bytes are then parsed again, so the document handed over has nothing in its history: the first Ctrl+Z takes back the translator's own first word and can never bring the source's line back. That is what the third check is about.
One thing this slice undoes: S1 greyed Open source subtitle until a target was open, on the reasoning that a source is read beside a target. Decision 13 says the opposite about the moment a translation begins, so with nothing open at all that item is now alive and the command that makes the target is what waits for the source.
Two things found while running it, both fixed here. Every E2E run left about 77 MB in
/tmpand nothing removed it: 318 of them filled a 31 GB tmpfs and broke acargo testwith a quota error mid-session. The harness now removes the tree it made when the run passes, and keeps it when the run fails, because that tree is the evidence. And the runner fails one check per run, a different one every time:specFileRetriesis 1 whenCIis set and 0 here, which re-runs a whole spec file rather than softening anything, and the count guard now counts unique titles so a retry cannot inflate it.Changes
subtitle_new_translationandnew_translation, which build the target from the source on a scratch session and install it with no path.newTranslation, which applies the opened document the way an adopted transcription is applied.How to verify it by using the app
fixtures/subtitles/srt/clean/basic-lf.srtas the source. The status bar saysSource: SRT · 3 cues · LFand New translation from source wakes up.00:00:02.120to00:00:04.880on the first, with no text in any of them, and the Source column beside them showing what there is to translate.Verified on Linux: full gate green step by step, and the battery green at 35 spec files of 35 with 287 checks. Two mutations each reddened its own check first, a translation that keeps the source's words, and an emptying done on the real session so undo could reach back to them.