Page MenuHomePhabricator

CX2: ISBN doubled, one correctly formatted with {{ISBN}}, another incorrectly formatted with [[Special:BookSources]]
Open, NormalPublic

Description

I found this strange problem in several articles recently translated with CX2 : ISBN are added twice to the translation, the first one is correctly formatted with the {{ISBN}} template, the other is using [[Special:BookSources]] which should be avoided for readability.

Exampe on frwiki with Anarchisme explorateur, but I saw the same problem on other articles by different users (HMS Avon Vale (L06), Toxophilus...) and only recently (at most a few weeks).

{{ISBN|987-580-092-9}}  [[International Standard Book Number|ISBN]]   [[Special:BookSources/987-580-092-9|987-580-092-9]]

Related: T213255: CX2: Doesn't handle correctly ISBN, should not put nowiki tags around them

Details

Related Gerrit Patches:

Event Timeline

NicoV created this task.Mar 4 2019, 5:43 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 4 2019, 5:43 PM
NicoV updated the task description. (Show Details)Mar 4 2019, 5:45 PM
NicoV updated the task description. (Show Details)
Pginer-WMF updated the task description. (Show Details)Mar 18 2019, 3:42 PM
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptMar 18 2019, 3:42 PM
Pginer-WMF triaged this task as Normal priority.Mar 18 2019, 3:42 PM
Pginer-WMF updated the task description. (Show Details)
Pginer-WMF moved this task from Needs Triage to CX2 on the ContentTranslation board.
NicoV added a comment.May 18 2019, 6:44 PM

Any news on this one?
CX2 continues to produce doubled ISBN number on articles in production wikis.

Example of recent fix on frwiki: Château de Takashima, Château de Nagaoka, Bridget Cleary...

NicoV added a comment.Sep 10 2019, 8:06 AM

Still happening, see for example Little Gidding (poème)

Pginer-WMF added a subscriber: Pginer-WMF.EditedSep 10 2019, 9:29 AM

Still happening, see for example Little Gidding (poème)

Checking the translation in the translation debugger I see the startTimestamp: 20190514133948 value which seems to indicate the translation was started on May 14 2019. So it may contain contents added before the issue was fix, even if it has been published recently.
In any case, we may want to test the fix by translating "Little Gidding (poem)" form English to French and check if there are still issues with ISBNs

Jpita added a subscriber: Jpita.Sep 10 2019, 9:38 AM

I confirm this still happens in production, translating {{ISBN ends up as {{ISBN+ [[Special:BookSources/ on the target article
https://fr.wikipedia.org/w/index.php?title=Utilisateur:Test7206310/Little_Gidding_(poem)&action=edit

I confirm this still happens in production, translating {{ISBN ends up as {{ISBN+ [[Special:BookSources/ on the target article
https://fr.wikipedia.org/w/index.php?title=Utilisateur:Test7206310/Little_Gidding_(poem)&action=edit

Ok. I'll add it to the quarter board as a follow-up of T213255

Change 541772 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/services/cxserver@master] Do not remove transclusions when they are also template styles

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

Change 541772 merged by jenkins-bot:
[mediawiki/services/cxserver@master] Do not remove transclusions when they are also template styles

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

Petar.petkovic added a subscriber: Petar.petkovic.

@Jpita, the fix is not yet deployed to cxserver.

@Petar.petkovic @KartikMistry is this deployed on cx2-testing yet?

@Petar.petkovic @KartikMistry is this deployed on cx2-testing yet?

Yes.

Change 543386 had a related patch set uploaded (by KartikMistry; owner: KartikMistry):
[operations/deployment-charts@master] Update cxserver to 2019-10-15-091114-production

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

Jpita added a comment.Oct 16 2019, 9:37 AM

In production, translating this article https://en.wikipedia.org/wiki/User:Jpita23/test has this result


As you can see, the {{ISBN}} template is missing from the original article and the translation when loaded in cx.

Change 543386 merged by jenkins-bot:
[operations/deployment-charts@master] Update cxserver to 2019-10-15-091114-production

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

Mentioned in SAL (#wikimedia-operations) [2019-10-16T12:00:13Z] <kart_> Updated cxserver to 2019-10-15-091114-production (T234773, T217585)

Jpita added a comment.EditedOct 17 2019, 5:08 AM

It seems the duplication of the ISBN is still happening.
translating https://en.wikipedia.org/wiki/User:Jpita23/test

While the evolution of sex dates to the prokaryote or early eukaryote stage,<nowiki>Bernstein H and Bernstein C (2013). Evolutionary Origin and Adaptive Function of Meiosis. In Meiosis: Bernstein C and Bernstein H, editors. Chapter 3: pp. 41–75 </nowiki>{{ISBN|978-953-51-1197-9}}

ends up as

Mientras que la evolución del sexo data de la etapa procariota o eucariota temprana, o ln,,m,m.,m C (2013). Origen evolutivo y función adaptativa de la meiosis. En Meiosis: Bernstein C y Bernstein H, editores. Capítulo 3: págs. 41–75 {{ISBN|978-953-51-1197-9}} [[International Standard Book Number|ISBN]] &nbsp; [[Special:BookSources/978-953-51-1197-9|978-953-51-1197-9]]

Input:

<section id="cxTargetSection0" data-mw-cx-source="undefined">

<p id="mwAg">While the evolution of sex dates to the prokaryote or early eukaryote stage,
    <span typeof="mw:Nowiki" id="mwAw">
        Bernstein H and Bernstein C (2013). Evolutionary Origin and Adaptive Function of Meiosis. In Meiosis:
        Bernstein C and Bernstein H, editors. Chapter 3: pp. 41–75 </span>
    <span typeof="mw:Transclusion"
        data-mw="{&quot;parts&quot;:[{&quot;template&quot;:{&quot;target&quot;:{&quot;wt&quot;:&quot;ISBN&quot;,&quot;href&quot;:&quot;./Template:ISBN&quot;},&quot;params&quot;:{&quot;1&quot;:{&quot;wt&quot;:&quot;978-953-51-1197-9&quot;}},&quot;i&quot;:0}}]}"
        data-ve-no-generated-contents="true" about="#mwt2" data-mw-deduplicate="TemplateStyles:r886058088"
        id="mwBA">&nbsp;
    </span> <span data-segmentid="4" class="cx-segment">
        <a href="./International%20Standard%20Book%20Number" rel="mw:WikiLink" about="#mwt2" class="cx-link"
            data-linkid="5" title="International Standard Book Number">ISBN
        </a> <span about="#mwt2" typeof="mw:Entity">&nbsp;</span>
        <a href="./Special:BookSources/978-953-51-1197-9" rel="mw:WikiLink" data-linkid="6" about="#mwt2"
            class="cx-link" id="mwBQ" title="Special:BookSources/978-953-51-1197-9">978-953-51-1197-9
        </a> </span> </p>

</section>

Actual Output:

<section data-mw-cx-source="undefined" id="cxTargetSection0">
<p id="mwAg"> Enquanto a evolução do sexo data do estágio procarionte ou eucarionte inicial, <span id="mwAw" typeof="mw:Nowiki">Bernstein H e Bernstein C (2013). Origem Evolutiva e Função Adaptativa da Meiose. In Meiosis: Bernstein C e Bernstein H, editores. Capítulo 3: pp. 41–75</span>
<span class="cx-segment" data-segmentid="4">
<a about="#mwt2" class="cx-link" data-linkid="5" href="./International%20Standard%20Book%20Number" rel="mw:WikiLink" title="International Standard Book Number">ISBN</a>
<span about="#mwt2" typeof="mw:Entity"> </span>
<a about="#mwt2" class="cx-link" data-linkid="6" href="./Special:BookSources/978-953-51-1197-9" id="mwBQ" rel="mw:WikiLink" title="Special:BookSources/978-953-51-1197-9">978-953-51-1197-9</a></span>
</p>
</section>

Expected output

<section data-mw-cx-source="undefined" id="cxTargetSection0">
<p id="mwAg"> Enquanto a evolução do sexo data do estágio procarionte ou eucarionte inicial,
<span id="mwAw" typeof="mw:Nowiki">Bernstein H e Bernstein C (2013). Origem Evolutiva e Função Adaptativa da Meiose. In Meiosis: Bernstein C e Bernstein H, editores. Capítulo 3: pp. 41–75</span> <span about="#mwt2" data-cx="[{&#34;adapted&#34;:true,&#34;partial&#34;:false,&#34;targetExists&#34;:true}]" data-mw="{&#34;parts&#34;:[{&#34;template&#34;:{&#34;target&#34;:{&#34;wt&#34;:&#34;ISBN&#34;,&#34;href&#34;:&#34;./Predefinição:ISBN&#34;},&#34;params&#34;:{&#34;1&#34;:{&#34;wt&#34;:&#34;978-953-51-1197-9&#34;}},&#34;i&#34;:0}}]}" data-mw-deduplicate="TemplateStyles:r886058088" data-ve-no-generated-contents="true" id="mwBA" typeof="mw:Transclusion"> sds

</span>

<a about="#mwt2" class="cx-link" data-linkid="5" href="./International%20Standard%20Book%20Number" rel="mw:WikiLink" title="International Standard Book Number">ISBN</a> <span about="#mwt2" typeof="mw:Entity"> </span>
<a about="#mwt2" class="cx-link" data-linkid="6" href="./Special:BookSources/978-953-51-1197-9" id="mwBQ" rel="mw:WikiLink" title="Special:BookSources/978-953-51-1197-9">978-953-51-1197-9</a> &#60;/span&#62; </p>
</section>

There seems to be a bug in the lineardoc that cause missing the transclusion.

Change 544163 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/services/cxserver@master] LinearDoc: Do not allow to remove empty spans in expansion step

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

Screenshot after the above patch:

Change 547164 had a related patch set uploaded (by Santhosh; owner: Santhosh):
[mediawiki/services/cxserver@master] Do not consider style with transclusion content as textblock

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

Change 547164 merged by jenkins-bot:
[mediawiki/services/cxserver@master] Do not consider style with transclusion content as textblock

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

Change 544163 merged by jenkins-bot:
[mediawiki/services/cxserver@master] LinearDoc: Do not allow to remove empty spans in expansion step

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