Index: branches/wmf/1.19wmf1/includes/logging/LogFormatter.php |
— | — | @@ -173,24 +173,23 @@ |
174 | 174 | $this->plaintext = true; |
175 | 175 | $text = $this->getActionText(); |
176 | 176 | |
177 | | - // wfRunHooks( 'LogEntry::publish', array( $this, $formatter, &$actionText ) ); |
178 | | - // function efLegacyLogsIrcFormat( $entry, $formatter, &$text ) { |
179 | | - |
180 | 177 | $entry = $this->entry; |
181 | 178 | $parameters = $entry->getParameters(); |
| 179 | + // @see LogPage::actionText() |
| 180 | + $msgOpts = array( 'parsemag', 'escape', 'replaceafter', 'content' ); |
182 | 181 | // Text of title the action is aimed at. |
183 | | - $target = $entry->getTarget()->getText() ; |
| 182 | + $target = $entry->getTarget()->getPrefixedText() ; |
184 | 183 | $text = null; |
185 | 184 | switch( $entry->getType() ) { |
186 | 185 | case 'move': |
187 | 186 | switch( $entry->getSubtype() ) { |
188 | 187 | case 'move': |
189 | 188 | $movesource = $parameters['4::target']; |
190 | | - $text = wfMsg( '1movedto2', $target, $movesource ); |
| 189 | + $text = wfMsgExt( '1movedto2', $msgOpts, $target, $movesource ); |
191 | 190 | break; |
192 | 191 | case 'move_redir': |
193 | 192 | $movesource = $parameters['4::target']; |
194 | | - $text = wfMsg( '1movedto2_redir', $target, $movesource ); |
| 193 | + $text = wfMsgExt( '1movedto2_redir', $msgOpts, $target, $movesource ); |
195 | 194 | break; |
196 | 195 | case 'move-noredirect': |
197 | 196 | break; |
— | — | @@ -202,10 +201,10 @@ |
203 | 202 | case 'delete': |
204 | 203 | switch( $entry->getSubtype() ) { |
205 | 204 | case 'delete': |
206 | | - $text = wfMsg( 'deletedarticle', $target ); |
| 205 | + $text = wfMsgExt( 'deletedarticle', $msgOpts, $target ); |
207 | 206 | break; |
208 | 207 | case 'restore': |
209 | | - $text = wfMsg( 'undeletedarticle', $target ); |
| 208 | + $text = wfMsgExt( 'undeletedarticle', $msgOpts, $target ); |
210 | 209 | break; |
211 | 210 | //case 'revision': // Revision deletion |
212 | 211 | //case 'event': // Log deletion |
— | — | @@ -217,26 +216,10 @@ |
218 | 217 | case 'patrol': |
219 | 218 | // https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/PatrolLog.php?&pathrev=97495&r1=97494&r2=97495 |
220 | 219 | // Create a diff link to the patrolled revision |
221 | | - $diffLink = Linker::link( |
222 | | - $target, |
223 | | - htmlspecialchars( wfMsg( 'patrol-log-diff', $parameters['4::curid']) ), |
224 | | - array(), |
225 | | - /*query parameters */ array( 'oldid'=>$parameters['4::curid'], 'diff' => 'prev' ), |
226 | | - array( 'known', 'noclasses' ) |
227 | | - ); |
228 | | - $link = Linker::link( $entry->getTarget() ); |
229 | | - |
230 | 220 | if ( $entry->getSubtype() === 'patrol' ) { |
231 | | - // 'patrol-log-line' => 'marked $1 of $2 patrolled $3', |
232 | | - // 'logentry-irc-patrol-patrol' => '$1 marked revision $4 of page $3 patrolled', |
233 | | - |
234 | | - $text = wfMsg( 'patrol-log-line', $diffLink, $link ); |
235 | | - } elseif ( $entry->getSubtype() === 'patrol-auto' ) { |
236 | | - // 'patrol-log-line' => 'marked $1 of $2 patrolled $3', |
237 | | - // 'patrol-log-auto' => '(automatic)', |
238 | | - // 'logentry-irc-patrol-patrol-auto' => '$1 automatically marked revision $4 of page $3 patrolled', |
239 | | - // How is this done with old messages? Some abomination to man? |
240 | | - $text = wfMsg( 'patrol-log-line-auto', $diffLink, $link ); |
| 221 | + $diffLink = htmlspecialchars( |
| 222 | + wfMsgForContent( 'patrol-log-diff', $parameters['4::curid'] ) ); |
| 223 | + $text = wfMsgForContent( 'patrol-log-line', $diffLink, "[[$target]]", "" ); |
241 | 224 | } else { |
242 | 225 | // broken?? |
243 | 226 | } |
— | — | @@ -246,17 +229,28 @@ |
247 | 230 | switch( $entry->getSubtype() ) { |
248 | 231 | case 'newusers': |
249 | 232 | case 'create': |
250 | | - $text = wfMsg( 'newuserlog-create-entry' /* no params */ ); |
| 233 | + $text = wfMsgExt( 'newuserlog-create-entry', $msgOpts /* no params */ ); |
251 | 234 | break; |
252 | 235 | case 'create2': |
253 | | - $text = wfMsg( 'newuserlog-create2-entry', $target ); |
| 236 | + $text = wfMsgExt( 'newuserlog-create2-entry', $msgOpts, $target ); |
254 | 237 | break; |
255 | 238 | case 'autocreate': |
256 | | - $text = wfMsg( 'newuserlog-autocreate-entry' /* no params */ ); |
| 239 | + $text = wfMsgExt( 'newuserlog-autocreate-entry', $msgOpts /* no params */ ); |
257 | 240 | break; |
258 | 241 | } |
259 | 242 | break; |
260 | 243 | |
| 244 | + case 'upload': |
| 245 | + switch( $entry->getSubtype() ) { |
| 246 | + case 'upload': |
| 247 | + $text = wfMsgExt( 'uploadedimage', $msgOpts, $target ); |
| 248 | + break; |
| 249 | + case 'overwrite': |
| 250 | + $text = wfMsgExt( 'overwroteimage', $msgOpts, $target ); |
| 251 | + break; |
| 252 | + } |
| 253 | + break; |
| 254 | + |
261 | 255 | // case 'suppress' --private log -- aaron (sign your messages so we know who to blame in a few years :-D) |
262 | 256 | // default: |
263 | 257 | } |
Property changes on: branches/wmf/1.19wmf1/includes |
___________________________________________________________________ |
Modified: svn:mergeinfo |
264 | 258 | Merged /trunk/phase3/includes:r112079,112128 |
Index: branches/wmf/1.19wmf1/languages/messages/MessagesEn.php |
— | — | @@ -4733,6 +4733,8 @@ |
4734 | 4734 | 'newuserlog-autocreate-entry' => 'Account created automatically', |
4735 | 4735 | 'suppressedarticle' => 'suppressed "[[$1]]"', |
4736 | 4736 | 'deletedarticle' => 'deleted "[[$1]]"', |
| 4737 | +'uploadedimage' => 'uploaded "[[$1]]"', |
| 4738 | +'overwroteimage' => 'uploaded a new version of "[[$1]]"', |
4737 | 4739 | |
4738 | 4740 | # Feedback |
4739 | 4741 | 'feedback-bugornote' => 'If you are ready to describe a technical problem in detail please [$1 report a bug]. |
— | — | @@ -4787,5 +4789,4 @@ |
4788 | 4790 | 'api-error-unknownerror' => 'Unknown error: "$1".', |
4789 | 4791 | 'api-error-uploaddisabled' => 'Uploading is disabled on this wiki.', |
4790 | 4792 | 'api-error-verification-error' => 'This file might be corrupt, or have the wrong extension.', |
4791 | | - |
4792 | 4793 | ); |
Property changes on: branches/wmf/1.19wmf1/languages |
___________________________________________________________________ |
Modified: svn:mergeinfo |
4793 | 4794 | Merged /trunk/phase3/languages:r112128 |
Property changes on: branches/wmf/1.19wmf1 |
___________________________________________________________________ |
Modified: svn:mergeinfo |
4794 | 4795 | Merged /trunk/phase3:r112079,112128 |