Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/230485
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(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/85/230485/1 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: newchange Gerrit-Change-Id: If9ab5a98ae49b379c01f57a38f0b08c4e3fad122 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits