r37380 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37379‎ | r37380 | r37381 >
Date:10:36, 9 July 2008
Author:rotem
Status:old
Tags:
Comment:
Plural support.
Modified paths:
  • /trunk/extensions/Quiz/Quiz.i18n.php (modified) (history)
  • /trunk/extensions/Quiz/Quiz.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Quiz/Quiz.i18n.php
@@ -52,7 +52,7 @@
5353 'quiz_colorError' => "Syntax error",
5454 'quiz_correction' => "Submit",
5555 'quiz_score' => "Your score is $1 / $2",
56 - 'quiz_points' => "$1 | $2 point(s)",
 56+ 'quiz_points' => "$1 | {{PLURAL:$2|1 point|$2 points}}",
5757 'quiz_reset' => "Reset"
5858 );
5959
@@ -421,7 +421,7 @@
422422 'quiz_colorError' => 'שגיאת תחביר',
423423 'quiz_correction' => 'שליחה',
424424 'quiz_score' => 'הניקוד שלך הוא $1 / $2',
425 - 'quiz_points' => '$1 | $2 נקודות',
 425+ 'quiz_points' => '$1 | {{PLURAL:$2|נקודה אחת|$2 נקודות}}',
426426 'quiz_reset' => 'איפוס',
427427 );
428428
Index: trunk/extensions/Quiz/Quiz.php
@@ -409,16 +409,16 @@
410410 case "right":
411411 $this->mTotal += $this->mAddedPoints * $question->mCoef;
412412 $this->mScore += $this->mAddedPoints * $question->mCoef;
413 - $output.= "title=\"".wfMsgHtml('quiz_points', wfMsgHtml('quiz_colorRight'), $this->mAddedPoints * $question->mCoef)."\"";
 413+ $output.= "title=\"".wfMsgExt('quiz_points', array('escape', 'parsemag'), wfMsg('quiz_colorRight'), $this->mAddedPoints * $question->mCoef)."\"";
414414 break;
415415 case "wrong":
416416 $this->mTotal += $this->mAddedPoints * $question->mCoef;
417417 $this->mScore -= $this->mCutoffPoints * $question->mCoef;
418 - $output.= "title=\"".wfMsgHtml('quiz_points', wfMsgHtml('quiz_colorWrong'), -$this->mCutoffPoints * $question->mCoef)."\"";
 418+ $output.= "title=\"".wfMsgExt('quiz_points', array('escape', 'parsemag'), wfMsg('quiz_colorWrong'), -$this->mCutoffPoints * $question->mCoef)."\"";
419419 break;
420420 case "NA":
421421 $this->mTotal += $this->mAddedPoints * $question->mCoef;
422 - $output.= "title=\"".wfMsgHtml('quiz_points', wfMsgHtml('quiz_colorNA'), 0)."\"";
 422+ $output.= "title=\"".wfMsgExt('quiz_points', array('escape', 'parsemag'), wfMsg('quiz_colorNA'), 0)."\"";
423423 break;
424424 case "error":
425425 $this->mState = "error";

Status & tagging log