Yeah, that is my best attempt for title. The less cryptic explanation as follows:
- Translator starts a translation t1. Translates sections t1-s1, t1-s2, t1-s3, t1-s4
- Translator decides to delete this translation. Does so from CX dashboard.
- Translator wants to translate t1 again from scratch. The newly started translation is t2
- Translator translates 2 sections. t2-s1, t2-s2. Saves it
- Translator returns and resumes t2. t2-s1, t2-s2 are restored as expected. In addition to this t1-s3, t1-s4 are also restored. That is wierd.
Internally what happens is, t1, t2 get same translation id since its SourceLanguage-TargetLanguage-SourceTitle pair is same. With this translation Id, sections are stored in corpora table.
When t2 started, we are not fetching this from table because it is a fresh translation. But when t2 is restored, All sections from corpora table which match the translation id is restored. They are t2-s1, t2-s2, t1-s3, t1-s4
So this is an edge case. When t2 started while t1 exist with deleted status, we probably want to clear sections associated with it from corpora table while doing deleted->draft transition.
Or, does it help the translator by providing the old saved sections? (+cc @Pginer-WMF )