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 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 set Security to None.

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

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

Arrbee moved this task from QA to Done on the LE-CX8-Sprint 3 board.