Per Brions suggestions http://www.mediawiki.org/wiki/Special:Code/MediaWiki/44245...
authorRaimond Spekking <raymond@users.mediawiki.org>
Tue, 9 Dec 2008 15:21:07 +0000 (15:21 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Tue, 9 Dec 2008 15:21:07 +0000 (15:21 +0000)
* Append the reason with a colon rather than wrapping in parens
* Rearrange the file-upload portion of the Special:Import form a bit
* Using one message for the comment field since it'll be identical in both parts of the form
More tweaks:
* Add labels for the transwiki import portion too
* Make the forms proper for RTL wikis

includes/specials/SpecialImport.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index 5cfb917..c60205c 100644 (file)
@@ -141,19 +141,25 @@ class SpecialImport extends SpecialPage {
                                Xml::openElement( 'table', array( 'id' => 'mw-import-table' ) ) .
 
                                "<tr>
-                                       <td>" .
-                               Xml::input( 'xmlimport', 50, '', array( 'type' => 'file' ) ) . ' ' .
+                                       <td class='mw-label'>" .
+                                               Xml::label( wfMsg( 'import-upload-filename' ), 'xmlimport' ) .
+                                       "</td>
+                                       <td class='mw-input'>" .
+                                               Xml::input( 'xmlimport', 50, '', array( 'type' => 'file' ) ) . ' ' .
                                        "</td>
                                </tr>
                                <tr>
-                                       <td>" .
-                               Xml::label( wfMsg('import-upload-comment'), 'log-comment' ) .
-                               Xml::input( 'log-comment', 50, '', array( 'id' => 'log-comment', 'type' => 'text' ) ) . ' ' .
+                                       <td class='mw-label'>" .
+                                               Xml::label( wfMsg( 'import-comment' ), 'log-comment' ) .
+                                       "</td>
+                                       <td class='mw-input'>" .
+                                               Xml::input( 'log-comment', 50, '', array( 'id' => 'log-comment', 'type' => 'text' ) ) . ' ' .
                                        "</td>
                                </tr>
                                <tr>
-                                       <td>" .
-                               Xml::submitButton( wfMsg( 'uploadbtn' ) ) .
+                                       <td></td>
+                                       <td class='mw-input'>" .
+                                               Xml::submitButton( wfMsg( 'uploadbtn' ) ) .
                                        "</td>
                                </tr>" .
                                Xml::closeElement( 'table' ).
@@ -178,7 +184,10 @@ class SpecialImport extends SpecialPage {
                                Xml::hidden( 'editToken', $wgUser->editToken() ) .
                                Xml::openElement( 'table', array( 'id' => 'mw-import-table' ) ) .
                                "<tr>
-                                       <td>" .
+                                       <td class='mw-label'>" .
+                                               Xml::label( wfMsg( 'import-interwiki-source' ), 'interwiki' ) .
+                                       "</td>
+                                       <td class='mw-input'>" .
                                                Xml::openElement( 'select', array( 'name' => 'interwiki' ) )
                        );
                        foreach( $wgImportSources as $prefix ) {
@@ -187,38 +196,36 @@ class SpecialImport extends SpecialPage {
                        }
                        $wgOut->addHTML(
                                                Xml::closeElement( 'select' ) .
-                                       "</td>
-                                       <td>" .
                                                Xml::input( 'frompage', 50, $this->frompage ) .
                                        "</td>
                                </tr>
                                <tr>
                                        <td>
                                        </td>
-                                       <td>" .
+                                       <td class='mw-input'>" .
                                                Xml::checkLabel( wfMsg( 'import-interwiki-history' ), 'interwikiHistory', 'interwikiHistory', $this->history ) .
                                        "</td>
                                </tr>
                                <tr>
-                                       <td>
-                                       </td>
                                        <td>" .
                                                Xml::label( wfMsg( 'import-interwiki-namespace' ), 'namespace' ) .
+                                       "</td>
+                                       <td class='mw-input'>" .
                                                Xml::namespaceSelector( $this->namespace, '' ) .
                                        "</td>
                                </tr>
                                <tr>
-                                       <td>" .
+                                       <td class='mw-label'>" .
                                                Xml::label( wfMsg( 'import-comment' ), 'comment' ) .
                                        "</td>
-                                       <td>" .
+                                       <td class='mw-input'>" .
                                                Xml::input( 'log-comment', 50, '', array( 'type' => 'text' ) ) . ' ' .
                                        "</td>
                                </tr>
                                <tr>
                                        <td>
                                        </td>
-                                       <td>" .
+                                       <td class='mw-input'>" .
                                                Xml::submitButton( wfMsg( 'import-interwiki-submit' ), array( 'accesskey' => 's' ) ) .
                                        "</td>
                                </tr>" .
@@ -270,8 +277,8 @@ class ImportReporter {
                        if( $this->mIsUpload ) {
                                $detail = wfMsgExt( 'import-logentry-upload-detail', array( 'content', 'parsemag' ),
                                        $contentCount );
-                               if ($this->reason) {
-                                       $detail .=  ' (' . $this->reason .')';
+                               if ( $this->reason ) {
+                                       $detail .=  wfMsgForContent( 'colon-separator' ) . $this->reason;
                                }
                                $log->addEntry( 'upload', $title, $detail );
                        } else {
@@ -279,8 +286,8 @@ class ImportReporter {
                                        $origTitle->getPrefixedText() . ']]';
                                $detail = wfMsgExt( 'import-logentry-interwiki-detail', array( 'content', 'parsemag' ),
                                        $contentCount, $interwiki );
-                               if ($this->reason) {
-                                       $detail .=  ' (' . $this->reason .')';
+                               if ( $this->reason ) {
+                                       $detail .=  wfMsgForContent( 'colon-separator' ) . $this->reason;
                                }
                                $log->addEntry( 'interwiki', $title, $detail );
                        }
index f0d44b8..e016806 100644 (file)
@@ -2788,10 +2788,11 @@ Please visit [http://www.mediawiki.org/wiki/Localisation MediaWiki Localisation]
 'import-interwiki-text'      => "Select a wiki and page title to import.
 Revision dates and editors' names will be preserved.
 All transwiki import actions are logged at the [[Special:Log/import|import log]].",
+'import-interwiki-source'    => 'Source wiki/page:',
 'import-interwiki-history'   => 'Copy all history versions for this page',
 'import-interwiki-submit'    => 'Import',
-'import-interwiki-namespace' => 'Transfer pages into namespace:',
-'import-upload-comment'      => 'Comment:',
+'import-interwiki-namespace' => 'Destination namespace:',
+'import-upload-filename'     => 'Filename:',
 'import-comment'             => 'Comment:',
 'importtext'                 => 'Please export the file from the source wiki using the [[Special:Export|export utility]].
 Save it to your computer and upload it here.',
index e54dce4..d4bc04b 100644 (file)
@@ -1939,10 +1939,11 @@ $wgMessageStructure = array(
                'import',
                'importinterwiki',
                'import-interwiki-text',
+               'import-interwiki-source',
                'import-interwiki-history',
                'import-interwiki-submit',
                'import-interwiki-namespace',
-               'import-upload-comment',
+               'import-upload-filename',
                'import-comment',
                'importtext',
                'importstart',