r45391 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45390‎ | r45391 | r45392 >
Date:11:03, 4 January 2009
Author:raymond
Status:ok
Tags:
Comment:
* Append $wgCodeReviewStyleVersion to the call of .js file too
* Localize a hardcoded message
Modified paths:
  • /trunk/extensions/CodeReview/CodeReview.i18n.php (modified) (history)
  • /trunk/extensions/CodeReview/CodeReview.php (modified) (history)
  • /trunk/extensions/CodeReview/CodeRevisionView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeReview.i18n.php
@@ -18,6 +18,7 @@
1919 'code-prop-changes' => 'Status & tagging log',
2020 'code-desc' => '[[Special:Code|Code review tool]] with [[Special:RepoAdmin|Subversion support]]',
2121 'code-no-repo' => 'No repository configured!',
 22+ 'code-load-diff'=> 'Loading diff…',
2223 'code-notes' => 'review notes',
2324 'code-authors' => 'authors',
2425 'code-tags' => 'tags',
Index: trunk/extensions/CodeReview/CodeRevisionView.php
@@ -290,19 +290,19 @@
291291 $hilite = new CodeDiffHighlighter();
292292 return $hilite->render( $diff );
293293 }
294 -
 294+
295295 protected function stubDiffLoader() {
296 - global $wgOut, $wgScriptPath;
 296+ global $wgOut, $wgScriptPath, $wgCodeReviewStyleVersion;
297297 $encRepo = Xml::encodeJsVar( $this->mRepo->getName() );
298298 $encRev = Xml::encodeJsVar( $this->mRev->getId() );
299 - $wgOut->addScriptFile( "$wgScriptPath/extensions/CodeReview/codereview.js" );
 299+ $wgOut->addScriptFile( "$wgScriptPath/extensions/CodeReview/codereview.js?$wgCodeReviewStyleVersion" );
300300 $wgOut->addInlineScript(
301301 "addOnloadHook(
302302 function() {
303303 CodeReview.loadDiff($encRepo,$encRev);
304304 }
305305 );" );
306 - return "Loading diff...";
 306+ return wfMsg( 'code-load-diff' );
307307 }
308308
309309 protected function formatComments() {
Index: trunk/extensions/CodeReview/CodeReview.php
@@ -96,8 +96,9 @@
9797 $wgSubversionProxy = false;
9898 $wgSubversionProxyTimeout = 30; // default 3 secs is too short :)
9999
 100+// Bump the version number every time you change a CodeReview .css/.js file
 101+$wgCodeReviewStyleVersion = 3;
100102
101 -$wgCodeReviewStyleVersion = 3;
102103 // The name of a repo which represents the code running on this wiki, used to highlight active revisions
103104 $wgWikiSVN = 'MediaWiki';
104105

Status & tagging log