r66063 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66062‎ | r66063 | r66064 >
Date:12:57, 8 May 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Follow up to r66062
Modified paths:
  • /trunk/extensions/Storyboard/Storyboard.i18n.php (modified) (history)
  • /trunk/extensions/Storyboard/Storyboard.php (modified) (history)
  • /trunk/extensions/Storyboard/specials/Story/Story_body.php (modified) (history)
  • /trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php (modified) (history)
  • /trunk/extensions/Storyboard/storyboard.js (modified) (history)
  • /trunk/extensions/Storyboard/tags/Storyboard/Storyboard_body.php (modified) (history)
  • /trunk/extensions/Storyboard/tags/Storyboard/storyboard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Storyboard/Storyboard.i18n.php
@@ -62,12 +62,14 @@
6363 'storyboard-charstomany' => '$1 characters to many!',
6464 'storyboard-morecharsneeded' => '$1 more characters needed',
6565 'storyboard-charactersleft' => '$1 characters left',
 66+ 'storyboard-needtoagree' => 'You need to agree to the publication of your story to submit it.',
6667
6768 // Story review
6869 'storyreview' => 'Story review',
6970 'storyboard-hideimage' => 'Hide image',
7071 'storyboard-unhideimage' => 'Show image',
7172 'storyboard-deleteimage' => 'Delete image',
 73+ 'storyboard-anerroroccured' => 'An error occured: $1',
7274
7375 // Story submission
7476 'storyboard-yourname' => 'Your name',
Index: trunk/extensions/Storyboard/tags/Storyboard/storyboard.js
@@ -36,7 +36,7 @@
3737 if ( data.query ) {
3838 addStories( $storyboard, data );
3939 } else {
40 - alert( 'An error occured:\n' + data.error.info ); // TODO: i18n
 40+ alert( stbMsgExt( 'storyboard-anerroroccured', [data.error.info] ) ); // TODO: i18n
4141 }
4242 }
4343 );
Index: trunk/extensions/Storyboard/tags/Storyboard/Storyboard_body.php
@@ -30,6 +30,8 @@
3131 global $wgJsMimeType, $wgScriptPath, $wgStylePath, $wgStyleVersion, $wgContLanguageCode;
3232 global $egStoryboardScriptPath, $egStoryboardWidth, $egStoryboardHeight;
3333
 34+ efStoryboardAddJSLocalisation( $parser );
 35+
3436 // TODO: Combine+minfiy JS files, add switch to use combined+minified version
3537 $parser->getOutput()->addHeadItem(
3638 <<<EOT
Index: trunk/extensions/Storyboard/specials/Story/Story_body.php
@@ -190,6 +190,8 @@
191191
192192 $wgOut->setPageTitle( $story->story_title );
193193
 194+ efStoryboardAddJSLocalisation();
 195+
194196 $wgOut->addStyle( $egStoryboardScriptPath . '/storyboard.css' );
195197 $wgOut->includeJQuery();
196198 $wgOut->addScriptFile( $egStoryboardScriptPath . '/jquery/jquery.validate.js' );
Index: trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php
@@ -44,6 +44,8 @@
4545 private function addOutput() {
4646 global $wgOut, $wgRequest, $wgJsMimeType, $wgContLanguageCode, $egStoryboardScriptPath;
4747
 48+ efStoryboardAddJSLocalisation();
 49+
4850 $wgOut->addStyle( $egStoryboardScriptPath . '/storyboard.css' );
4951 $wgOut->includeJQuery();
5052 $wgOut->addScriptFile( $egStoryboardScriptPath . "/jquery/jquery.ajaxscroll.js" );
Index: trunk/extensions/Storyboard/storyboard.js
@@ -77,8 +77,8 @@
7878 */
7979 function stbValidateSubmission( termsCheckbox ) {
8080 var agreementValid = document.getElementById( termsCheckbox ).checked;
81 - if (!agreementValid) {
82 - alert( 'You need to agree to the publication of your story to submit it.' ); // TODO: i18n
 81+ if ( !agreementValid ) {
 82+ alert( stbMsg( 'storyboard-needtoagree' ) );
8383 }
8484 return agreementValid;
8585 }
@@ -99,8 +99,7 @@
100100 jQuery( '#storyreviewboard-' + state ).ajaxScroll( {
101101 updateBatch: stbUpdateReviewBoard,
102102 maxOffset: 500,
103 - batchSize: 2,
104 - batchNum: 2, // TODO: change to 1. Some issue in the ajaxscroll plugin makesit break when this is the case though.
 103+ batchSize: 8,
105104 batchClass: "batch",
106105 boxClass: "storyboard-box",
107106 emptyBatchClass: "storyboard-empty",
@@ -125,7 +124,7 @@
126125 if ( data.query ) {
127126 stbAddStories( $storyboard, data.query );
128127 } else {
129 - alert( 'An error occured:\n' + data.error.info ); // TODO: i18n
 128+ alert( stbMsgExt( 'storyboard-anerroroccured', [data.error.info] ) );
130129 }
131130 }
132131 );
Index: trunk/extensions/Storyboard/Storyboard.php
@@ -138,7 +138,10 @@
139139 $messages = array(
140140 'storyboard-charstomany',
141141 'storyboard-morecharsneeded',
142 - 'storyboard-charactersleft'
 142+ 'storyboard-charactersleft',
 143+ 'storyboard-needtoagree',
 144+ 'storyboard-anerroroccured',
 145+ ''
143146 );
144147
145148 $data = array();

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r66062Implemnted JS i18n functionsjeroendedauw12:25, 8 May 2010

Status & tagging log