Index: trunk/extensions/Storyboard/Storyboard.i18n.php |
— | — | @@ -51,7 +51,8 @@ |
52 | 52 | 'storyboard-language' => 'Language', |
53 | 53 | |
54 | 54 | // 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.', |
56 | 57 | |
57 | 58 | // Special:StorySubmission |
58 | 59 | 'storyboard-submissioncomplete' => 'Submission complete', |
— | — | @@ -59,7 +60,7 @@ |
60 | 61 | 'storyboard-alreadyexists' => '"$1" is already taken.', |
61 | 62 | 'storyboard-changetitle' => 'Change the title.', |
62 | 63 | 'storyboard-notsubmitted' => 'Authentication failed, no story has been saved.', |
63 | | - 'storyboard-charstomany' => '$1 characters to many!', |
| 64 | + 'storyboard-charstomany' => '$1 characters too many!', |
64 | 65 | 'storyboard-morecharsneeded' => '$1 more characters needed', |
65 | 66 | 'storyboard-charactersleft' => '$1 characters left', |
66 | 67 | '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 @@ |
153 | 153 | |
154 | 154 | $storyBody.append( textAndImg ); |
155 | 155 | |
| 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 | + |
156 | 164 | $storyBody.append( // TODO: get the actual message here |
157 | 165 | 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 ) |
159 | 167 | ) |
160 | 168 | ); |
161 | 169 | |
Index: trunk/extensions/Storyboard/api/ApiQueryStories.php |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | * Retrieve the stories from the database. |
45 | 45 | */ |
46 | 46 | public function execute() { |
47 | | - global $wgUser; |
| 47 | + global $wgUser, $wgLang; |
48 | 48 | |
49 | 49 | // Get the requests parameters. |
50 | 50 | $params = $this->extractRequestParams(); |
— | — | @@ -55,6 +55,7 @@ |
56 | 56 | 'story_author_id', |
57 | 57 | 'story_author_name', |
58 | 58 | 'story_author_image', |
| 59 | + 'story_author_location', |
59 | 60 | 'story_title', |
60 | 61 | 'story_text', |
61 | 62 | 'story_created', |
— | — | @@ -125,8 +126,11 @@ |
126 | 127 | 'id' => $story->story_id, |
127 | 128 | 'author' => $story->story_author_name, |
128 | 129 | '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, |
131 | 135 | 'imageurl' => $story->story_author_image, |
132 | 136 | 'permalink' => SpecialPage::getTitleFor( 'story', $story->story_title )->getFullURL() |
133 | 137 | ); |
Index: trunk/extensions/Storyboard/Storyboard.php |
— | — | @@ -141,7 +141,8 @@ |
142 | 142 | 'storyboard-charactersleft', |
143 | 143 | 'storyboard-needtoagree', |
144 | 144 | 'storyboard-anerroroccured', |
145 | | - '' |
| 145 | + 'storyboard-storymetadata', |
| 146 | + 'storyboard-storymetadatafrom' |
146 | 147 | ); |
147 | 148 | |
148 | 149 | $data = array(); |