Page MenuHomePhabricator

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

Description 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;* [ 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="">Samsung A7 Pros and Cons</a></li>
<li><div class="reflist " style=""></div></li>

CX currently cannot process this kind of mw:Transcusion element with multiple 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 added a subscriber: santhosh.

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

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