r58057 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58056‎ | r58057 | r58058 >
Date:17:56, 23 October 2009
Author:siebrand
Status:ok
Tags:
Comment:
Remove lego in success/fail reporting of tests.
Modified paths:
  • /trunk/extensions/CodeReview/CodeReview.i18n.php (modified) (history)
  • /trunk/extensions/CodeReview/ui/CodeRevisionView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeReview.i18n.php
@@ -103,8 +103,8 @@
104104
105105 'codereview-reply-link' => 'reply',
106106
107 - 'codereview-tests-succeeded' => 'succeeded tests',
108 - 'codereview-tests-failed' => 'failed tests:',
 107+ 'codereview-tests-succeeded2' => '$1 succeeded {{PLURAL:$2|test|tests}}',
 108+ 'codereview-tests-failed2' => '$1 succeeded {{PLURAL:$2|test|tests}}, $3 failed {{PLURAL:$4|test|tests}}:',
109109 'codereview-tests-running' => 'Test cases are running...',
110110 'codereview-tests-aborted' => 'Test run aborted.',
111111
Index: trunk/extensions/CodeReview/ui/CodeRevisionView.php
@@ -316,12 +316,19 @@
317317 $total = $run->countTotal;
318318 $success = $run->countSuccess;
319319 $failed = $total - $success;
 320+ $success_tests = "<span class='mw-codereview-success'>$success</span>";
320321 if( $failed ) {
321 - $html .= "<p><span class='mw-codereview-success'>$success</span> ".
322 - wfMsgHtml('codereview-tests-succeeded').", " .
323 - "<span class='mw-codereview-fail'>$failed</span> ".
324 - wfMsgHtml('codereview-tests-failed')."</p>";
325 -
 322+ $failed_tests = "<span class='mw-codereview-fail'>$failed</span>";
 323+ $html .= "<p>" .
 324+ wfMsgExt(
 325+ 'codereview-tests-failed2',
 326+ 'parseinline',
 327+ $success_tests,
 328+ $success,
 329+ $failed_tests,
 330+ $failed
 331+ ) . "</p>";
 332+
326333 $tests = $run->getResults( false );
327334 $html .= "<ul>\n";
328335 foreach( $tests as $test ) {
@@ -329,9 +336,13 @@
330337 }
331338 $html .= "</ul>\n";
332339 } else {
333 - $html .= "<p><span class='mw-codereview-success'>$success</span> ".
334 - wfMsgHtml('codereview-tests-succeeded')."</p>";
335 -
 340+ $html .= "<p>" .
 341+ wfMsgExt(
 342+ 'codereview-tests-succeeded2',
 343+ 'parseinline',
 344+ $success_tests,
 345+ $success
 346+ ) . "</p>";
336347 }
337348 } elseif( $run->status == "running" ) {
338349 $html .= wfMsgExt('codereview-tests-running','parse');

Follow-up revisions

RevisionCommit summaryAuthorDate
r58058Follow-up to r58057...siebrand18:07, 23 October 2009

Status & tagging log