From 1150cc533153b78c7bdcb9cf160ed21681acacb0 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Tue, 9 Dec 2008 15:21:07 +0000 Subject: [PATCH] Per Brions suggestions http://www.mediawiki.org/wiki/Special:Code/MediaWiki/44245#c829 * 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 | 47 +++++++++++++++++------------ languages/messages/MessagesEn.php | 5 +-- maintenance/language/messages.inc | 3 +- 3 files changed, 32 insertions(+), 23 deletions(-) diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index 5cfb917cb9..c60205c784 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -141,19 +141,25 @@ class SpecialImport extends SpecialPage { Xml::openElement( 'table', array( 'id' => 'mw-import-table' ) ) . " - " . - Xml::input( 'xmlimport', 50, '', array( 'type' => 'file' ) ) . ' ' . + " . + Xml::label( wfMsg( 'import-upload-filename' ), 'xmlimport' ) . + " + " . + Xml::input( 'xmlimport', 50, '', array( 'type' => 'file' ) ) . ' ' . " - " . - Xml::label( wfMsg('import-upload-comment'), 'log-comment' ) . - Xml::input( 'log-comment', 50, '', array( 'id' => 'log-comment', 'type' => 'text' ) ) . ' ' . + " . + Xml::label( wfMsg( 'import-comment' ), 'log-comment' ) . + " + " . + Xml::input( 'log-comment', 50, '', array( 'id' => 'log-comment', 'type' => 'text' ) ) . ' ' . " - " . - Xml::submitButton( wfMsg( 'uploadbtn' ) ) . + + " . + Xml::submitButton( wfMsg( 'uploadbtn' ) ) . " " . Xml::closeElement( 'table' ). @@ -178,7 +184,10 @@ class SpecialImport extends SpecialPage { Xml::hidden( 'editToken', $wgUser->editToken() ) . Xml::openElement( 'table', array( 'id' => 'mw-import-table' ) ) . " - " . + " . + Xml::label( wfMsg( 'import-interwiki-source' ), 'interwiki' ) . + " + " . Xml::openElement( 'select', array( 'name' => 'interwiki' ) ) ); foreach( $wgImportSources as $prefix ) { @@ -187,38 +196,36 @@ class SpecialImport extends SpecialPage { } $wgOut->addHTML( Xml::closeElement( 'select' ) . - " - " . Xml::input( 'frompage', 50, $this->frompage ) . " - " . + " . Xml::checkLabel( wfMsg( 'import-interwiki-history' ), 'interwikiHistory', 'interwikiHistory', $this->history ) . " - - " . Xml::label( wfMsg( 'import-interwiki-namespace' ), 'namespace' ) . + " + " . Xml::namespaceSelector( $this->namespace, '' ) . " - " . + " . Xml::label( wfMsg( 'import-comment' ), 'comment' ) . " - " . + " . Xml::input( 'log-comment', 50, '', array( 'type' => 'text' ) ) . ' ' . " - " . + " . Xml::submitButton( wfMsg( 'import-interwiki-submit' ), array( 'accesskey' => 's' ) ) . " " . @@ -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 ); } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index f0d44b879a..e01680688b 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -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.', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index e54dce4ca9..d4bc04ba49 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -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', -- 2.20.1