For example: "Template:Citation needed" is mapped with "ઢાંચો:સંદર્ભ" for Gujarati language and despite of that, CX puts [citation needed] in translation. Also, same happens with en-eo.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Templates: Fixes for inline template adaptation | mediawiki/extensions/ContentTranslation | master | +15 -7 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T102107 Enable Content Translation in Catalan Wikipedia for all logged-in users | |||
Open | None | T102964 [Epic] Better support for templates in Content Translation | |||
Resolved | Amire80 | T95655 CX Phase 2 deployment issues (tracking) | |||
Resolved | • santhosh | T95391 ContentTranslation doesn't adapt templates that are redirects in target wiki |
Event Timeline
gives
{"pages":{},"redirects":[{"from":"\u0aa2\u0abe\u0a82\u0a9a\u0acb:Citation needed","to":"\u0aa2\u0abe\u0a82\u0a9a\u0acb:\u0ab8\u0a82\u0aa6\u0ab0\u0acd\u0aad"}]}
This is a redirect. The template adaptation code is not taking care of redirect. That is the root cause
I changed the title to reflect the general issue. While analysing I found that getTargetTemplate method in template tool module is unused now. It can be removed
There are multiple issues here:
As the partial fix for this patch says ( https://gerrit.wikimedia.org/r/#/c/306188/ )
- When the template is missing template data and is a redirect like Template:Citation needed in gu.wikipedia, the template mapping will not have 'title' key causing the entire template not mapped. This commit fixes it
- When the target template does not accept any params, while source template has params, consider the template adaptation successful This also happens in the case of gu.wikipedia citation needed template. In English, this template accepts date parameter, while gu.wikipedia does not accept any params.
With the above fix, the template will start to get adapted, but when published, it wont appear in published article because, in publish module, we are blindly removing <link> tags saying they are useless.
But, the HTML for citation need template in gu wiki is like
<link about="#mwt9" data-mw="{"parts":[{"template":{"target":{"wt":"સંદર્ભ","href":"./Template:Citation_needed"},"params":{},"i":0}}]}" href="./Category:All_articles_with_unsourced_statements" id="mwLw" rel="mw:PageProp/Category" contenteditable="false" typeof="mw:Transclusion"><link about="#mwt9" href="./Category:Articles_with_unsourced_statements_from_December_2011" rel="mw:PageProp/Category" contenteditable="false"><sup about="#mwt9" class="noprint Inline-Template Template-Fact" id="mwMA" style="white-space:nowrap;" contenteditable="false"><span typeof="mw:Entity">[</span><i><a class="cx-link cx-source-link cx-target-link" data-linkid="148" href="વિકિપીડિયા:Citation needed" rel="mw:WikiLink" title="વિકિપીડિયા:Citation needed"><span title="This claim needs references to reliable sources. (December 2011)">citation needed</span></a></i><span typeof="mw:Entity">]</span></sup></span></p>
The template definition is in <link> tag. Removing it makes the whole template a non-template. That need fix too
Change 306188 had a related patch set uploaded (by Santhosh):
Templates: Fixes for inline template adaptation