Page MenuHomePhabricator

ApiQueryContentTranslation: Serve the saved translation from cxc_corpora table
Closed, ResolvedPublic

Description

ApiQueryContentTranslation should check if there is a saved data for the given translation id in cxc_corpora table. If so access the data from there , aggregate the sections in their linear order and return it.
If the data is not present in corpora table, check that in drafts table and fetch it.

We will require some changes in section restore logic to accommodate this data. we can try to send the data as close to what we would send from drafts table

Event Timeline

santhosh created this task.Feb 3 2016, 4:21 AM
santhosh claimed this task.
santhosh raised the priority of this task from to High.
santhosh updated the task description. (Show Details)
santhosh added subscribers: Unhammer, He7d3r, KuboF and 12 others.
santhosh updated the task description. (Show Details)Feb 3 2016, 4:50 AM
santhosh set Security to None.
Amire80 moved this task from Needs Triage to CX8 on the ContentTranslation board.Feb 3 2016, 6:05 AM
santhosh removed santhosh as the assignee of this task.Feb 3 2016, 10:55 AM
santhosh claimed this task.Feb 5 2016, 11:24 AM

Change 268645 had a related patch set uploaded (by Santhosh):
WIP: ApiQueryContentTranslation: Serve the saved translation from cxc_corpora table

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

KuboF removed a subscriber: KuboF.Feb 6 2016, 4:31 PM
santhosh moved this task from Backlog to In Progress on the LE-CX8-Sprint 2 board.Feb 8 2016, 11:18 AM

If the data is not present in corpora table, check that in drafts table and fetch it.

It turns out there is a bug in our current translaiton.storage module. What is saved is $section.html() instead of $section[0].outerHTML. So we have to use the otherway. That is:

If the data is not present in drafts table, check that in corpora table and fetch it. and use T125622: While saving the data to corpora table, remove the corresponding entry from drafts table

Change 268645 merged by jenkins-bot:
Restore the saved translation from cxc_corpora table

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

Nikerabbit moved this task from Blocked to QA on the LE-CX8-Sprint 3 board.Feb 26 2016, 5:35 PM
Arrbee closed this task as Resolved.Mar 4 2016, 7:37 AM
Arrbee moved this task from QA to Done on the LE-CX8-Sprint 3 board.