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 )

santhosh created this task.Feb 26 2016, 5:10 AM
santhosh updated the task description. (Show Details)
Amire80 moved this task from Backlog to CX8 on the ContentTranslation board.Mar 3 2016, 7:28 AM
santhosh moved this task from Backlog to In Progress on the LE-CX8-Sprint 4 board.Mar 22 2016, 6:45 AM

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

Nikerabbit moved this task from In Review to Blocked on the LE-CX8-Sprint 4 board.Mar 22 2016, 8:39 AM
Nikerabbit moved this task from Blocked to Done on the LE-CX8-Sprint 4 board.

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

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

Arrbee closed this task as Resolved.Mar 29 2016, 7:49 AM