Page MenuHomePhabricator

Resuming a re-translated deleted translation will cause restoring the sections from old deleted translation
Closed, ResolvedPublic

Description

Yeah, that is my best attempt for title. The less cryptic explanation as follows:

  1. Translator starts a translation t1. Translates sections t1-s1, t1-s2, t1-s3, t1-s4
  2. Translator decides to delete this translation. Does so from CX dashboard.
  3. Translator wants to translate t1 again from scratch. The newly started translation is t2
  4. Translator translates 2 sections. t2-s1, t2-s2. Saves it
  5. 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 )

Event Timeline

Change 278845 had a related patch set uploaded (by Santhosh):
While deleting unplished translation, delete the items from cx_corpora

https://gerrit.wikimedia.org/r/278845

Change 278845 merged by jenkins-bot:
While deleting unpublished translation, delete the items from cx_corpora

https://gerrit.wikimedia.org/r/278845