Page MenuHomePhabricator

If references list is not present in source article and references are added to translation, publishing will fail
Closed, ResolvedPublic

Description

https://en.wikipedia.org/w/index.php?title=Samsung_Galaxy_A7&oldid=668069510 has a references list section as follows(resulted from a mobile edit, apparently)

<ul about="#mwt6" typeof="mw:Transclusion" id="mwIQ" data-mw="{&quot;parts&quot;:[&quot;* [http://www.techofy.com/samsung-galaxy-a7-slim-and-metallic Samsung A7 Pros and Cons]\n*&quot;,{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;Reflist&quot;,&quot;href&quot;:&quot;./Template:Reflist&quot;},&quot;params&quot;:{},&quot;i&quot;:0}}]}">
<li> <a rel="mw:ExtLink" href="http://www.techofy.com/samsung-galaxy-a7-slim-and-metallic">Samsung A7 Pros and Cons</a></li>
<li><div class="reflist " style=""></div></li>
</ul>

CX currently cannot process this kind of mw:Transcusion element with multiple da-mw.parts and just removes it from source. But when we do that, there is no references list to adapt to translation, causing a reference existing without reference list, causing publising failure.

We should do a validation for these cases and remove the references in sections as a fix for now.

Event Timeline

santhosh claimed this task.
santhosh raised the priority of this task from to Medium.
santhosh updated the task description. (Show Details)
santhosh subscribed.

Change 223249 had a related patch set uploaded (by Santhosh):
While adapting references, Validate whether the source has references list

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

A long term solution for all these edge cases can be
(a) Improve our template adaptation
(b) Have a validator in each tool module that detect this kind of anomalies before publising and try to fix or give a hint to translator

Change 223249 merged by jenkins-bot:
While adapting references, validate whether the source has references list

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