Santhosh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/126231

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, 3 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/31/126231/1

diff --git a/modules/translation/ext.cx.translation.js 
b/modules/translation/ext.cx.translation.js
index 447a053..2436b95 100644
--- a/modules/translation/ext.cx.translation.js
+++ b/modules/translation/ext.cx.translation.js
@@ -212,7 +212,9 @@
                        $section = $( $sections[ i ] );
                        sourceSectionId = $section.attr( 'id' );
                        $sourceSection = $( jquerySelectorForId( 
sourceSectionId ) );
-                       if ( $sourceSection.height() === 0 ) {
+                       if ( $sourceSection.height() === 0 || 
!$sourceSection.text().trim() ) {
+                               $sourceSection.remove();
+                               $section.remove();
                                // Source section has height as 0. 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: newchange
Gerrit-Change-Id: Ia896f6daafccbbfd66c985d5d25d220a8a0895ff
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

Reply via email to