Page MenuHomePhabricator

CX2: Templates are not adapted after source page inpect mode integration
Closed, ResolvedPublic

Description

While investigating T198911: ContentTranslation substitutes some templates in the references a regression on template adaptation was found. After the integration of source page inspect mode feature, the data sent to cxserver for adaptation has an empty data-cx. The template node has data-cx="{}" along with data-mw.

cxserver understand this type of data as nodes that are already adapted because of the presense of data-cx attribute and skips from adaptation. Resulting all inline templates not adapted.

To test: Translate "Tradícia_(zvyky)" from Slovak (sk) to Czech (cs). Translate the first paragraph starting with "Tradícia je antropologický" using an MT service like Google. The reference after "medzigeneračného prenosu." is a template. You can see that it is not adapted even though the target template exists. According to Wikidata ( https://www.wikidata.org/wiki/Q6242419#sitelinks-wikipedia ) the equivalent of sk:Harvbz is cs:Harvnb. But you can see that the target template is still sk:Harvbz

Event Timeline

santhosh triaged this task as High priority.
santhosh moved this task from Needs Triage to CX2 on the ContentTranslation board.

Change 495177 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/services/cxserver@master] Adaptation: Enhance the validation for already adapted nodes

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

Change 495178 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/extensions/ContentTranslation@master] ve.dm.CXTransclusionNode: Do not set empty data-cx in DOM nodes

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

Change 495177 merged by jenkins-bot:
[mediawiki/services/cxserver@master] Adaptation: Enhance the validation for already adapted nodes

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

Mentioned in SAL (#wikimedia-operations) [2019-03-11T03:30:51Z] <kartik@deploy1001> Finished deploy [cxserver/deploy@101bebd]: Update cxserver to 5a26308 (T216044, T217878) (duration: 04m 01s)

Change 495178 merged by Santhosh:
[mediawiki/extensions/ContentTranslation@master] ve.dm.CXTransclusionNode: Do not set empty data-cx in DOM nodes

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

Etonkovidova subscribed.

Checked in cx2-testing - <ref>{{Harvnb|Shils}}</ref> is correctly present in the published article.