Index: trunk/extensions/Translate/TranslatePage.php |
— | — | @@ -16,8 +16,6 @@ |
17 | 17 | * @ingroup SpecialPage TranslateSpecialPage |
18 | 18 | */ |
19 | 19 | class SpecialTranslate extends SpecialPage { |
20 | | - const MSG = 'translate-page-'; |
21 | | - |
22 | 20 | protected $task = null; |
23 | 21 | protected $group = null; |
24 | 22 | |
— | — | @@ -60,17 +58,17 @@ |
61 | 59 | $codes = Language::getLanguageNames( false ); |
62 | 60 | |
63 | 61 | if ( !$this->options['language'] || !isset( $codes[$this->options['language']] ) ) { |
64 | | - $errors['language'] = wfMsgExt( self::MSG . 'no-such-language', array( 'parse' ) ); |
| 62 | + $errors['language'] = wfMsgExt( 'translate-page-no-such-language', array( 'parse' ) ); |
65 | 63 | $this->options['language'] = $this->defaults['language']; |
66 | 64 | } |
67 | 65 | |
68 | 66 | if ( !$this->task instanceof TranslateTask ) { |
69 | | - $errors['task'] = wfMsgExt( self::MSG . 'no-such-task', array( 'parse' ) ); |
| 67 | + $errors['task'] = wfMsgExt( 'translate-page-no-such-task', array( 'parse' ) ); |
70 | 68 | $this->options['task'] = $this->defaults['task']; |
71 | 69 | } |
72 | 70 | |
73 | 71 | if ( !$this->group instanceof MessageGroup ) { |
74 | | - $errors['group'] = wfMsgExt( self::MSG . 'no-such-group', array( 'parse' ) ); |
| 72 | + $errors['group'] = wfMsgExt( 'translate-page-no-such-group', array( 'parse' ) ); |
75 | 73 | $this->options['group'] = $this->defaults['group']; |
76 | 74 | } |
77 | 75 | |
— | — | @@ -91,7 +89,7 @@ |
92 | 90 | foreach ( $checks as $check ) { |
93 | 91 | $reason = @$wgTranslateBlacklist[$check][$this->options['language']]; |
94 | 92 | if ( $reason !== null ) { |
95 | | - $wgOut->addWikiMsg( self::MSG . 'disabled', $reason ); |
| 93 | + $wgOut->addWikiMsg( 'translate-page-disabled', $reason ); |
96 | 94 | return; |
97 | 95 | } |
98 | 96 | } |
— | — | @@ -120,7 +118,7 @@ |
121 | 119 | } else { |
122 | 120 | $description = $this->getGroupDescription( $this->group ); |
123 | 121 | if ( $description ) { |
124 | | - $description = Xml::fieldset( wfMsg( self::MSG . 'description-legend' ), $description ); |
| 122 | + $description = Xml::fieldset( wfMsg( 'translate-page-description-legend' ), $description ); |
125 | 123 | } |
126 | 124 | |
127 | 125 | $links = $this->doStupidLinks(); |
— | — | @@ -199,13 +197,13 @@ |
200 | 198 | $group = $this->groupSelector(); |
201 | 199 | $language = $this->languageSelector(); |
202 | 200 | $limit = $this->limitSelector(); |
203 | | - $button = Xml::submitButton( wfMsg( TranslateUtils::MSG . 'submit' ) ); |
| 201 | + $button = Xml::submitButton( wfMsg( 'translate-submit' ) ); |
204 | 202 | |
205 | 203 | $options = array(); |
206 | 204 | |
207 | 205 | foreach ( array( 'task', 'group', 'language', 'limit' ) as $g ) { |
208 | 206 | $options[] = self::optionRow( |
209 | | - Xml::tags( 'label', array( 'for' => $g ), wfMsgExt( self::MSG . $g, 'escapenoentities' ) ), |
| 207 | + Xml::tags( 'label', array( 'for' => $g ), wfMsgExt( 'translate-page-' . $g, 'escapenoentities' ) ), |
210 | 208 | $$g, |
211 | 209 | array_key_exists( $g, $errors ) ? $errors[$g] : null |
212 | 210 | ); |
— | — | @@ -213,7 +211,7 @@ |
214 | 212 | |
215 | 213 | $form = |
216 | 214 | Xml::openElement( 'fieldset', array( 'class' => 'mw-sp-translate-settings' ) ) . |
217 | | - Xml::element( 'legend', null, wfMsg( self::MSG . 'settings-legend' ) ) . |
| 215 | + Xml::element( 'legend', null, wfMsg( 'translate-page-settings-legend' ) ) . |
218 | 216 | Xml::openElement( 'form', array( 'action' => $wgScript, 'method' => 'get' ) ) . |
219 | 217 | Xml::hidden( 'title', $this->getTitle()->getPrefixedText() ) . |
220 | 218 | Xml::openElement( 'table' ) . |
— | — | @@ -278,7 +276,7 @@ |
279 | 277 | $selector = new HTMLSelector( 'limit', 'limit', $this->options['limit'] ); |
280 | 278 | |
281 | 279 | foreach ( $items as $count ) { |
282 | | - $selector->addOption( wfMsgExt( self::MSG . 'limit-option', 'parsemag', $wgLang->formatNum( $count ) ), $count ); |
| 280 | + $selector->addOption( wfMsgExt( 'translate-page-limit-option', 'parsemag', $wgLang->formatNum( $count ) ), $count ); |
283 | 281 | } |
284 | 282 | |
285 | 283 | return $selector->getHTML(); |
— | — | @@ -306,21 +304,21 @@ |
307 | 305 | $allInThisPage = $start === 1 && $total <= $this->options['limit']; |
308 | 306 | |
309 | 307 | if ( $this->paging['count'] === 0 ) { |
310 | | - $navigation = wfMsgExt( self::MSG . 'showing-none', array( 'parseinline' ) ); |
| 308 | + $navigation = wfMsgExt( 'translate-page-showing-none', array( 'parseinline' ) ); |
311 | 309 | } elseif ( $allInThisPage ) { |
312 | 310 | $navigation = wfMsgExt( |
313 | | - self::MSG . 'showing-all', |
| 311 | + 'translate-page-showing-all', |
314 | 312 | array( 'parseinline' ), |
315 | 313 | $total |
316 | 314 | ); |
317 | 315 | } else { |
318 | | - $previous = wfMsg( TranslateUtils::MSG . 'prev' ); |
| 316 | + $previous = wfMsg( 'translate-prev' ); |
319 | 317 | if ( $this->options['offset'] > 0 ) { |
320 | 318 | $offset = max( 0, $this->options['offset'] - $this->options['limit'] ); |
321 | 319 | $previous = $this->makeOffsetLink( $previous, $offset ); |
322 | 320 | } |
323 | 321 | |
324 | | - $nextious = wfMsg( TranslateUtils::MSG . 'next' ); |
| 322 | + $nextious = wfMsg( 'translate-next' ); |
325 | 323 | |
326 | 324 | if ( $this->paging['total'] != $this->paging['start'] + $this->paging['count'] ) { |
327 | 325 | $offset = $this->options['offset'] + $this->options['limit']; |
— | — | @@ -332,14 +330,14 @@ |
333 | 331 | $total = $this->paging['total']; |
334 | 332 | |
335 | 333 | $showing = wfMsgExt( |
336 | | - self::MSG . 'showing', |
| 334 | + 'translate-page-showing', |
337 | 335 | array( 'parseinline' ), |
338 | 336 | $start, |
339 | 337 | $stop, |
340 | 338 | $total ); |
341 | 339 | |
342 | 340 | $navigation = wfMsgExt( |
343 | | - self::MSG . 'paging-links', |
| 341 | + 'translate-page-paging-links', |
344 | 342 | array( 'escape', 'replaceafter' ), |
345 | 343 | $previous, |
346 | 344 | $nextious |
— | — | @@ -350,7 +348,7 @@ |
351 | 349 | |
352 | 350 | return |
353 | 351 | Xml::openElement( 'fieldset' ) . |
354 | | - Xml::element( 'legend', null, wfMsg( self::MSG . 'navigation-legend' ) ) . |
| 352 | + Xml::element( 'legend', null, wfMsg( 'translate-page-navigation-legend' ) ) . |
355 | 353 | $navigation . |
356 | 354 | Xml::closeElement( 'fieldset' ); |
357 | 355 | } |