r70942 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70941‎ | r70942 | r70943 >
Date:12:50, 12 August 2010
Author:siebrand
Status:deferred
Tags:
Comment:
Do not display an empty comment. That's no help and takes up unnecessary space.
Modified paths:
  • /trunk/extensions/Translate/utils/TranslationHelpers.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/TranslationHelpers.php
@@ -662,8 +662,11 @@
663663
664664 $mykey = $wgContLang->lcfirst( $this->page );
665665 $data = $reader->parseFile();
666 - $help = GettextFormatWriter::formatComments( @$data[$mykey]['comments'], false, @$data[$mykey]['flags'] );
667 - $info .= "<hr /><pre>$help</pre>";
 666+ $help = trim( GettextFormatWriter::formatComments( @$data[$mykey]['comments'], false, @$data[$mykey]['flags'] ) );
 667+ // Do not display an empty comment. That's no help and takes up unnecessary space.
 668+ if( $help !== '#:' ) {
 669+ $info .= "<hr /><pre>$help</pre>";
 670+ }
668671 }
669672 }
670673

Status & tagging log