Change Details

CX2 wraps every source and target translatable sections in <section> tag. Currently this wrapping is done at client side. It would be ideal if the /page/:language/:title/:revision? api does this in cxserver itself.
Also, Parsoid is planning to do section wrapping for the HTML output as documented at https://www.mediawiki.org/wiki/Parsing/Notes/Section_Wrapping. This section wrapping is different from the section concept of CX. In CX, basically every immediate child of body is section - headings, paragraphs, images, tables etc. They make the CX translation units. To make CX abstract this difference, cxserver should unwrap the parsoid added sections and add the sections to match CX's concept of sections.
CX1 Does not know about sections at all. So we should be careful not to break CX1.
[X] Refactor pageloader so that page fetch, segmentation, parsoid section strip, CX section wrapping can be grouped to a single class
[x] Strip section tags from parsoid. CX1 and CX2 does not need these tags
[] Wrap every immediate child of body under CX section tag - For CX2 alone. Might require api versioning

CX2 wraps every source and target translatable sections in <section> tag. Currently this wrapping is done at client side. It would be ideal if the /page/:language/:title/:revision? api does this in cxserver itself.
Also, Parsoid is planning to do section wrapping for the HTML output as documented at https://www.mediawiki.org/wiki/Parsing/Notes/Section_Wrapping. This section wrapping is different from the section concept of CX. In CX, basically every immediate child of body is section - headings, paragraphs, images, tables etc. They make the CX translation units. To make CX abstract this difference, cxserver should unwrap the parsoid added sections and add the sections to match CX's concept of sections.
CX1 Does not know about sections at all. So we should be careful not to break CX1.
[X] Refactor pageloader so that page fetch, segmentation, parsoid section strip, CX section wrapping can be grouped to a single class
[x] Strip section tags from parsoid. CX1 and CX2 does not need these tags
[x] Wrap every immediate child of body under CX section tag - For CX2 alone. Might require api versioning

CX2 wraps every source and target translatable sections in <section> tag. Currently this wrapping is done at client side. It would be ideal if the /page/:language/:title/:revision? api does this in cxserver itself.
Also, Parsoid is planning to do section wrapping for the HTML output as documented at https://www.mediawiki.org/wiki/Parsing/Notes/Section_Wrapping. This section wrapping is different from the section concept of CX. In CX, basically every immediate child of body is section - headings, paragraphs, images, tables etc. They make the CX translation units. To make CX abstract this difference, cxserver should unwrap the parsoid added sections and add the sections to match CX's concept of sections.
CX1 Does not know about sections at all. So we should be careful not to break CX1.
[X] Refactor pageloader so that page fetch, segmentation, parsoid section strip, CX section wrapping can be grouped to a single class
[x] Strip section tags from parsoid. CX1 and CX2 does not need these tags
[x] Wrap every immediate child of body under CX section tag - For CX2 alone. Might require api versioning