Amire80 has uploaded a new change for review. https://gerrit.wikimedia.org/r/246666
Change subject: Fix conditions that check whether a section should be saved ...................................................................... Fix conditions that check whether a section should be saved To test that bug T108461 is fixed, translate [[Lake Lugano]] from English to Hebrew, click images without adding captions, and make sure that they are saved and published. To test that bug T115487 is fixed, translate [[Numerical differentiation]], which has images without captions, and make sure that the images are saved to drafts and published. Bug: T108461 Bug: T115487 Change-Id: If688b4a69baeb8b92eeb60e70b441e14fb19ccb8 --- M modules/draft/ext.cx.draft.js M modules/publish/ext.cx.publish.js 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation refs/changes/66/246666/1 diff --git a/modules/draft/ext.cx.draft.js b/modules/draft/ext.cx.draft.js index d1754b7..513bc41 100644 --- a/modules/draft/ext.cx.draft.js +++ b/modules/draft/ext.cx.draft.js @@ -54,7 +54,7 @@ $content.find( mw.cx.getSectionSelector() ).each( function () { var $section = $( this ); - if ( !$.trim( $section.text() ) ) { + if ( !$.trim( $section.text() ) && !$section.children().length ) { $section.remove(); } } ); diff --git a/modules/publish/ext.cx.publish.js b/modules/publish/ext.cx.publish.js index c13200e..60c1ef0 100644 --- a/modules/publish/ext.cx.publish.js +++ b/modules/publish/ext.cx.publish.js @@ -381,7 +381,7 @@ } ); // Remove empty sections - if ( !$.trim( $section.text() && !$section.children().length ) ) { + if ( !$.trim( $section.text() ) && !$section.children().length ) { $section.remove(); } -- To view, visit https://gerrit.wikimedia.org/r/246666 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If688b4a69baeb8b92eeb60e70b441e14fb19ccb8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ContentTranslation Gerrit-Branch: master Gerrit-Owner: Amire80 <amir.ahar...@mail.huji.ac.il> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits