The target categories that translator added or adapted from source article and decided to keep for publishing are never saved in back-end database. So, when a translation is restored, these edits in target categories are lost. This was not a big problem in CX1, since it was only automatic adaptation of categories and no feature to add/edit categories.
In CX2, we have these features and there should be a way to keep them between translation sessions. We can consider this as a metadata of an article to publish.
- Reuse existing cx_corpora table to store categories metadata about draft translation. Use special value for section id to distinguish categories from other translation data stored in cx_corpora table
- Develop the API, PHP classes to use the new table
- Translation restore should fetch this data
- Publishing should use the categories
- Any edit (add, remove, reorder) in the categories collection should get auto saved just like with any other translation section