r106791 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106790‎ | r106791 | r106792 >
Date:12:52, 20 December 2011
Author:nikerabbit
Status:ok (Comments)
Tags:
Comment:
Show the diff helper labels only once
Modified paths:
  • /trunk/extensions/Translate/tag/SpecialPageTranslation.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/tag/SpecialPageTranslation.php
@@ -386,6 +386,9 @@
387387
388388 $wgOut->wrapWikiMsg( '==$1==', 'tpt-sections-oldnew' );
389389
 390+ $diffOld = wfMsgHtml( 'tpt-diff-old' );
 391+ $diffNew = wfMsgHtml( 'tpt-diff-new' );
 392+
390393 foreach ( $sections as $s ) {
391394 if ( $s->type === 'new' ) {
392395 $input = Xml::input( 'tpt-sect-' . $s->id, 15, $s->name );
@@ -401,7 +404,8 @@
402405 }
403406 $diff->setReducedLineNumbers();
404407 $diff->setText( $s->getOldText(), $s->getText() );
405 - $text = $diff->getDiff( wfMsgHtml( 'tpt-diff-old' ), wfMsgHtml( 'tpt-diff-new' ) );
 408+ $text = $diff->getDiff( $diffOld, $diffNew );
 409+ $diffOld = $diffNew = null;
406410 $diff->showDiffStyle();
407411
408412 $id = "tpt-sect-{$s->id}-action-nofuzzy";

Follow-up revisions

RevisionCommit summaryAuthorDate
r107733Followup r106791, r107692 and bug 33014...reedy20:20, 31 December 2011

Comments

#Comment by Santhosh.thottingal (talk | contribs)   11:55, 23 December 2011

Does it make sense to put "New Text" and "Previous Text" headers in bold?

#Comment by Nikerabbit (talk | contribs)   12:15, 23 December 2011

I don't see much difference either way.

Status & tagging log