| Index: trunk/extensions/Translate/groups/ComplexMessages.php |
| — | — | @@ -14,7 +14,6 @@ |
| 15 | 15 | * @todo Needs documentation. |
| 16 | 16 | */ |
| 17 | 17 | abstract class ComplexMessages { |
| 18 | | - const MSG = 'translate-magic-cm-'; |
| 19 | 18 | |
| 20 | 19 | const LANG_MASTER = 0; |
| 21 | 20 | const LANG_CHAIN = 1; |
| — | — | @@ -303,8 +302,8 @@ |
| 304 | 303 | |
| 305 | 304 | public function getButtons() { |
| 306 | 305 | return |
| 307 | | - Xml::inputLabel( wfMsg( self::MSG . 'comment' ), 'comment', 'sp-translate-magic-comment' ) . |
| 308 | | - Xml::submitButton( wfMsg( self::MSG . 'save' ), array( 'name' => 'savetodb' ) ); |
| | 306 | + Xml::inputLabel( wfMsg( 'translate-magic-cm-comment' ), 'comment', 'sp-translate-magic-comment' ) . |
| | 307 | + Xml::submitButton( wfMsg( 'translate-magic-cm-save' ), array( 'name' => 'savetodb' ) ); |
| 309 | 308 | } |
| 310 | 309 | |
| 311 | 310 | public function formatElement( $element ) { |
| — | — | @@ -364,11 +363,11 @@ |
| 365 | 364 | |
| 366 | 365 | $data = "# DO NOT EDIT THIS PAGE DIRECTLY! Use [[Special:AdvancedTranslate]].\n<pre>\n" . $this->formatForSave( $request ) . "\n</pre>"; |
| 367 | 366 | |
| 368 | | - $comment = $request->getText( 'comment', wfMsgForContent( self::MSG . 'updatedusing' ) ); |
| | 367 | + $comment = $request->getText( 'comment', wfMsgForContent( 'translate-magic-cm-updatedusing' ) ); |
| 369 | 368 | $status = $article->doEdit( $data, $comment, 0 ); |
| 370 | 369 | |
| 371 | 370 | if ( $status === false || ( is_object( $status ) && !$status->isOK() ) ) { |
| 372 | | - throw new MWException( wfMsgHtml( self::MSG . 'savefailed' ) ); |
| | 371 | + throw new MWException( wfMsg( 'translate-magic-cm-savefailed' ) ); |
| 373 | 372 | } |
| 374 | 373 | |
| 375 | 374 | /* Reset outdated array */ |
| Index: trunk/extensions/Translate/Translate.i18n.php |
| — | — | @@ -129,6 +129,7 @@ |
| 130 | 130 | 'translationchanges' => 'Translation changes', |
| 131 | 131 | 'translationchanges-export' => 'export', |
| 132 | 132 | 'translationchanges-change' => '$1: $2 by $3', |
| | 133 | + 'translationchanges-submit' => 'Fetch', |
| 133 | 134 | |
| 134 | 135 | 'translate-checks-parameters' => 'Following {{PLURAL:$2|parameter is|parameters are}} not used: |
| 135 | 136 | <strong><nowiki>$1</nowiki></strong>', |
| Index: trunk/extensions/Translate/specials/SpecialMagic.php |
| — | — | @@ -15,11 +15,6 @@ |
| 16 | 16 | * @ingroup SpecialPage TranslateSpecialPage |
| 17 | 17 | */ |
| 18 | 18 | class SpecialMagic extends SpecialPage { |
| 19 | | - /** |
| 20 | | - * Message prefix for translations |
| 21 | | - * @todo Remove. |
| 22 | | - */ |
| 23 | | - const MSG = 'translate-magic-'; |
| 24 | 19 | |
| 25 | 20 | const MODULE_MAGIC = 'words'; |
| 26 | 21 | const MODULE_SPECIAL = 'special'; |
| — | — | @@ -49,7 +44,7 @@ |
| 50 | 45 | * @see SpecialPage::getDescription |
| 51 | 46 | */ |
| 52 | 47 | function getDescription() { |
| 53 | | - return wfMsg( self::MSG . 'pagename' ); |
| | 48 | + return wfMsg( 'translate-magic-pagename' ); |
| 54 | 49 | } |
| 55 | 50 | |
| 56 | 51 | /** |
| — | — | @@ -74,7 +69,7 @@ |
| 75 | 70 | '</td><td>' . |
| 76 | 71 | $this->moduleSelector( $this->options['module'] ) . |
| 77 | 72 | '</td></tr><tr><td colspan="2">' . |
| 78 | | - Xml::submitButton( wfMsg( self::MSG . 'submit' ) ) . ' ' . |
| | 73 | + Xml::submitButton( wfMsg( 'translate-magic-submit' ) ) . ' ' . |
| 79 | 74 | Xml::submitButton( wfMsg( 'translate-magic-cm-export' ), array( 'name' => 'export' ) ) . |
| 80 | 75 | '</td></tr></table>' . |
| 81 | 76 | Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) |
| — | — | @@ -91,7 +86,7 @@ |
| 92 | 87 | protected function moduleSelector( $selectedId ) { |
| 93 | 88 | $selector = new HTMLSelector( 'module', 'module', $selectedId ); |
| 94 | 89 | foreach ( $this->aModules as $code ) { |
| 95 | | - $selector->addOption( wfMsg( self::MSG . $code ), $code ); |
| | 90 | + $selector->addOption( wfMsg( 'translate-magic-' . $code ), $code ); |
| 96 | 91 | } |
| 97 | 92 | return $selector->getHTML(); |
| 98 | 93 | } |
| — | — | @@ -194,7 +189,7 @@ |
| 195 | 190 | return; |
| 196 | 191 | } |
| 197 | 192 | |
| 198 | | - $wgOut->addWikiMsg( self::MSG . 'help' ); |
| | 193 | + $wgOut->addWikiMsg( 'translate-magic-help' ); |
| 199 | 194 | $errors = array(); |
| 200 | 195 | $o->validate( $errors ); |
| 201 | 196 | if ( $errors ) $this->outputErrors( $errors ); |
| Index: trunk/extensions/Translate/specials/SpecialTranslationChanges.php |
| — | — | @@ -16,7 +16,6 @@ |
| 17 | 17 | * @ingroup SpecialPage TranslateSpecialPage |
| 18 | 18 | */ |
| 19 | 19 | class SpecialTranslationChanges extends SpecialPage { |
| 20 | | - const MSG = 'translationchanges-'; |
| 21 | 20 | |
| 22 | 21 | function __construct() { |
| 23 | 22 | parent::__construct( 'TranslationChanges' ); |
| — | — | @@ -48,7 +47,7 @@ |
| 49 | 48 | global $wgScript; |
| 50 | 49 | |
| 51 | 50 | $limit = self::timeLimitSelector( $this->hours ); |
| 52 | | - $button = Xml::submitButton( wfMsg( TranslateUtils::MSG . 'submit' ) ); |
| | 51 | + $button = Xml::submitButton( wfMsg( 'translationchanges-submit' ) ); |
| 53 | 52 | |
| 54 | 53 | $form = Xml::tags( 'form', |
| 55 | 54 | array( |
| — | — | @@ -147,7 +146,7 @@ |
| 148 | 147 | |
| 149 | 148 | $output .= Xml::element( 'h3', null, $label ); |
| 150 | 149 | |
| 151 | | - $exportLabel = wfMsgHtml( self::MSG . 'export' ); |
| | 150 | + $exportLabel = wfMsgHtml( 'translationchanges-export' ); |
| 152 | 151 | |
| 153 | 152 | foreach ( $languages as $language => $rows ) { |
| 154 | 153 | $index++; |
| — | — | @@ -193,7 +192,7 @@ |
| 194 | 193 | foreach ( $rows as $row ) { |
| 195 | 194 | $date = $wgLang->timeAndDate( $row->rc_timestamp, /* adj */ true, /* format */ true ); |
| 196 | 195 | $msg = wfMsgExt( |
| 197 | | - self::MSG . 'change', |
| | 196 | + 'translationchanges-change', |
| 198 | 197 | array( 'parsemag', 'escape' ), |
| 199 | 198 | $date, |
| 200 | 199 | wfEscapeWikiText( $row->rc_title ), |
| Index: trunk/extensions/Translate/TranslateUtils.php |
| — | — | @@ -12,8 +12,6 @@ |
| 13 | 13 | * Essentially random collection of helper functions, similar to GlobalFunctions.php. |
| 14 | 14 | */ |
| 15 | 15 | class TranslateUtils { |
| 16 | | - /// @todo Get rid of this constant. |
| 17 | | - const MSG = 'translate-'; |
| 18 | 16 | |
| 19 | 17 | /** |
| 20 | 18 | * Does quick normalisation of message name so that in can be looked from the |