Index: trunk/extensions/Storyboard/Storyboard.i18n.php |
— | — | @@ -62,12 +62,14 @@ |
63 | 63 | 'storyboard-charstomany' => '$1 characters to many!', |
64 | 64 | 'storyboard-morecharsneeded' => '$1 more characters needed', |
65 | 65 | 'storyboard-charactersleft' => '$1 characters left', |
| 66 | + 'storyboard-needtoagree' => 'You need to agree to the publication of your story to submit it.', |
66 | 67 | |
67 | 68 | // Story review |
68 | 69 | 'storyreview' => 'Story review', |
69 | 70 | 'storyboard-hideimage' => 'Hide image', |
70 | 71 | 'storyboard-unhideimage' => 'Show image', |
71 | 72 | 'storyboard-deleteimage' => 'Delete image', |
| 73 | + 'storyboard-anerroroccured' => 'An error occured: $1', |
72 | 74 | |
73 | 75 | // Story submission |
74 | 76 | 'storyboard-yourname' => 'Your name', |
Index: trunk/extensions/Storyboard/tags/Storyboard/storyboard.js |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | if ( data.query ) { |
38 | 38 | addStories( $storyboard, data ); |
39 | 39 | } else { |
40 | | - alert( 'An error occured:\n' + data.error.info ); // TODO: i18n |
| 40 | + alert( stbMsgExt( 'storyboard-anerroroccured', [data.error.info] ) ); // TODO: i18n |
41 | 41 | } |
42 | 42 | } |
43 | 43 | ); |
Index: trunk/extensions/Storyboard/tags/Storyboard/Storyboard_body.php |
— | — | @@ -30,6 +30,8 @@ |
31 | 31 | global $wgJsMimeType, $wgScriptPath, $wgStylePath, $wgStyleVersion, $wgContLanguageCode; |
32 | 32 | global $egStoryboardScriptPath, $egStoryboardWidth, $egStoryboardHeight; |
33 | 33 | |
| 34 | + efStoryboardAddJSLocalisation( $parser ); |
| 35 | + |
34 | 36 | // TODO: Combine+minfiy JS files, add switch to use combined+minified version |
35 | 37 | $parser->getOutput()->addHeadItem( |
36 | 38 | <<<EOT |
Index: trunk/extensions/Storyboard/specials/Story/Story_body.php |
— | — | @@ -190,6 +190,8 @@ |
191 | 191 | |
192 | 192 | $wgOut->setPageTitle( $story->story_title ); |
193 | 193 | |
| 194 | + efStoryboardAddJSLocalisation(); |
| 195 | + |
194 | 196 | $wgOut->addStyle( $egStoryboardScriptPath . '/storyboard.css' ); |
195 | 197 | $wgOut->includeJQuery(); |
196 | 198 | $wgOut->addScriptFile( $egStoryboardScriptPath . '/jquery/jquery.validate.js' ); |
Index: trunk/extensions/Storyboard/specials/StoryReview/StoryReview_body.php |
— | — | @@ -44,6 +44,8 @@ |
45 | 45 | private function addOutput() { |
46 | 46 | global $wgOut, $wgRequest, $wgJsMimeType, $wgContLanguageCode, $egStoryboardScriptPath; |
47 | 47 | |
| 48 | + efStoryboardAddJSLocalisation(); |
| 49 | + |
48 | 50 | $wgOut->addStyle( $egStoryboardScriptPath . '/storyboard.css' ); |
49 | 51 | $wgOut->includeJQuery(); |
50 | 52 | $wgOut->addScriptFile( $egStoryboardScriptPath . "/jquery/jquery.ajaxscroll.js" ); |
Index: trunk/extensions/Storyboard/storyboard.js |
— | — | @@ -77,8 +77,8 @@ |
78 | 78 | */ |
79 | 79 | function stbValidateSubmission( termsCheckbox ) { |
80 | 80 | 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' ) ); |
83 | 83 | } |
84 | 84 | return agreementValid; |
85 | 85 | } |
— | — | @@ -99,8 +99,7 @@ |
100 | 100 | jQuery( '#storyreviewboard-' + state ).ajaxScroll( { |
101 | 101 | updateBatch: stbUpdateReviewBoard, |
102 | 102 | 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, |
105 | 104 | batchClass: "batch", |
106 | 105 | boxClass: "storyboard-box", |
107 | 106 | emptyBatchClass: "storyboard-empty", |
— | — | @@ -125,7 +124,7 @@ |
126 | 125 | if ( data.query ) { |
127 | 126 | stbAddStories( $storyboard, data.query ); |
128 | 127 | } else { |
129 | | - alert( 'An error occured:\n' + data.error.info ); // TODO: i18n |
| 128 | + alert( stbMsgExt( 'storyboard-anerroroccured', [data.error.info] ) ); |
130 | 129 | } |
131 | 130 | } |
132 | 131 | ); |
Index: trunk/extensions/Storyboard/Storyboard.php |
— | — | @@ -138,7 +138,10 @@ |
139 | 139 | $messages = array( |
140 | 140 | 'storyboard-charstomany', |
141 | 141 | 'storyboard-morecharsneeded', |
142 | | - 'storyboard-charactersleft' |
| 142 | + 'storyboard-charactersleft', |
| 143 | + 'storyboard-needtoagree', |
| 144 | + 'storyboard-anerroroccured', |
| 145 | + '' |
143 | 146 | ); |
144 | 147 | |
145 | 148 | $data = array(); |