jenkins-bot has submitted this change and it was merged.

Change subject: Remove the empty sections and do not add placeholders for them
......................................................................


Remove the empty sections and do not add placeholders for them

Change-Id: Ia896f6daafccbbfd66c985d5d25d220a8a0895ff
---
M modules/translation/ext.cx.translation.js
1 file changed, 6 insertions(+), 3 deletions(-)

Approvals:
  Amire80: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/translation/ext.cx.translation.js 
b/modules/translation/ext.cx.translation.js
index 1537eab..b0a2cdc 100644
--- a/modules/translation/ext.cx.translation.js
+++ b/modules/translation/ext.cx.translation.js
@@ -229,9 +229,12 @@
                        sourceSectionId = $section.attr( 'id' );
                        $sourceSection = $( jquerySelectorForId( 
sourceSectionId ) );
 
-                       if ( $sourceSection.height() === 0 ) {
-                               // Source section has height as 0. This 
indicates an empty
-                               // section - mainly resulting from spurious 
wikitext
+                       if ( $sourceSection.height() === 0 || 
!$sourceSection.text().trim() ) {
+                               $sourceSection.remove();
+                               $section.remove();
+
+                               // Source section has 0 height. This indicates 
an empty
+                               // section - mainly resulting from spurious 
wikitext.
                                continue;
                        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/126231
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia896f6daafccbbfd66c985d5d25d220a8a0895ff
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com>
Gerrit-Reviewer: Amire80 <amir.ahar...@mail.huji.ac.il>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to