jenkins-bot has submitted this change and it was merged.
Change subject: Templates: Do not skip adapting inner templates if parent is
template
......................................................................
Templates: Do not skip adapting inner templates if parent is template
We were not adapting templates inside a template. Most of the cases
such complex template adaptation attempts will not succeed. But there
is a where this adaptation can succeed and required for references
This particular case was found while analysing the publishing error
for article Amblydoras from en to es.
Testplan:
Translate Amblydoras from en to es. Start adding sections from top
to bottom. You will see references section added. Try publishing it.
Publishing will pass. This is normal case. Now translate the same
again and start clicking sections from bottom to top. That means,
you are adding references list first and then section containing reference
later. Try publishing. You will get parsoid error. With this patch,
adding sections in any order will not result publishing error.
Change-Id: If9ab5a98ae49b379c01f57a38f0b08c4e3fad122
---
M modules/tools/ext.cx.tools.template.js
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
KartikMistry: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/tools/ext.cx.tools.template.js
b/modules/tools/ext.cx.tools.template.js
index 1ac181b..5833b21 100644
--- a/modules/tools/ext.cx.tools.template.js
+++ b/modules/tools/ext.cx.tools.template.js
@@ -213,9 +213,9 @@
if ( $section.is( '[typeof*="mw:Transclusion"]' ) ) {
templates.push( $section );
- } else {
- templates = $section.find(
'[typeof*="mw:Transclusion"]' );
}
+ templates.push( $section.find( '[typeof*="mw:Transclusion"]' )
);
+
$.each( templates, function () {
var template = new TemplateTool( this );
--
To view, visit https://gerrit.wikimedia.org/r/230485
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If9ab5a98ae49b379c01f57a38f0b08c4e3fad122
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
Gerrit-Reviewer: Amire80 <[email protected]>
Gerrit-Reviewer: KartikMistry <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits