r66065 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66064‎ | r66065 | r66066 >
Date:13:29, 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/api/ApiQueryStories.php (modified) (history)
  • /trunk/extensions/Storyboard/storyboard.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Storyboard/Storyboard.i18n.php
@@ -51,7 +51,8 @@
5252 'storyboard-language' => 'Language',
5353
5454 // Storyboard tag
55 - 'storyboard-storymetadata' => 'Submitted by $1 from $2 on $3, $4.',
 55+ 'storyboard-storymetadata' => 'Submitted by $1 on $3, $4.',
 56+ 'storyboard-storymetadatafrom' => 'Submitted by $1 from $2 on $3, $4.',
5657
5758 // Special:StorySubmission
5859 'storyboard-submissioncomplete' => 'Submission complete',
@@ -59,7 +60,7 @@
6061 'storyboard-alreadyexists' => '"$1" is already taken.',
6162 'storyboard-changetitle' => 'Change the title.',
6263 'storyboard-notsubmitted' => 'Authentication failed, no story has been saved.',
63 - 'storyboard-charstomany' => '$1 characters to many!',
 64+ 'storyboard-charstomany' => '$1 characters too many!',
6465 'storyboard-morecharsneeded' => '$1 more characters needed',
6566 'storyboard-charactersleft' => '$1 characters left',
6667 'storyboard-needtoagree' => 'You need to agree to the publication of your story to submit it.',
Index: trunk/extensions/Storyboard/storyboard.js
@@ -152,9 +152,17 @@
153153
154154 $storyBody.append( textAndImg );
155155
 156+ var metaDataText;
 157+ if ( story.location != '' ) {
 158+ metaDataText = stbMsgExt( 'storyboard-storymetadatafrom', [story.author, story.location, story.creationtime, story.creationdate] );
 159+ }
 160+ else {
 161+ metaDataText = stbMsgExt( 'storyboard-storymetadata', [story.author, story.creationtime, story.creationdate] );
 162+ }
 163+
156164 $storyBody.append( // TODO: get the actual message here
157165 jQuery( "<div />" ).addClass( "story-metadata" ).append(
158 - jQuery("<span />").addClass( "story-metadata" ).text( " Submitted by $1 from $2 on $3, $4." )
 166+ jQuery("<span />").addClass( "story-metadata" ).text( metaDataText )
159167 )
160168 );
161169
Index: trunk/extensions/Storyboard/api/ApiQueryStories.php
@@ -43,7 +43,7 @@
4444 * Retrieve the stories from the database.
4545 */
4646 public function execute() {
47 - global $wgUser;
 47+ global $wgUser, $wgLang;
4848
4949 // Get the requests parameters.
5050 $params = $this->extractRequestParams();
@@ -55,6 +55,7 @@
5656 'story_author_id',
5757 'story_author_name',
5858 'story_author_image',
 59+ 'story_author_location',
5960 'story_title',
6061 'story_text',
6162 'story_created',
@@ -125,8 +126,11 @@
126127 'id' => $story->story_id,
127128 'author' => $story->story_author_name,
128129 'title' => $story->story_title,
129 - 'created' => wfTimestamp( TS_ISO_8601, $story->story_created ),
130 - 'modified' => wfTimestamp( TS_ISO_8601, $story->story_modified ),
 130+ 'creationtime' => $wgLang->time( $story->story_created ),
 131+ 'creationdate' => $wgLang->date( $story->story_created ),
 132+ 'modificationtime' => $wgLang->time( $story->story_modified ),
 133+ 'modificationdate' => $wgLang->date( $story->story_modified ),
 134+ 'location' => $story->story_author_location,
131135 'imageurl' => $story->story_author_image,
132136 'permalink' => SpecialPage::getTitleFor( 'story', $story->story_title )->getFullURL()
133137 );
Index: trunk/extensions/Storyboard/Storyboard.php
@@ -141,7 +141,8 @@
142142 'storyboard-charactersleft',
143143 'storyboard-needtoagree',
144144 'storyboard-anerroroccured',
145 - ''
 145+ 'storyboard-storymetadata',
 146+ 'storyboard-storymetadatafrom'
146147 );
147148
148149 $data = array();

Past revisions this follows-up on

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

Status & tagging log