(bug 26929) Introduced the edittools-upload message, which will be inserted under...
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Thu, 27 Jan 2011 20:58:37 +0000 (20:58 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Thu, 27 Jan 2011 20:58:37 +0000 (20:58 +0000)
RELEASE-NOTES
includes/HTMLForm.php
includes/specials/SpecialUpload.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messageTypes.inc
maintenance/language/messages.inc

index 62ea8b9..154b400 100644 (file)
@@ -53,6 +53,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Add width parameter to Special:Filepath to allow getting the file path of a thumbnail.
 * (bug 26870) Add size to {{filepath:}}
 * Upload warnings now show a thumbnail of the uploaded file
+* Introduced the edittools-upload message, which will be inserted under the
+  upload form instead of edittools if available
 
 === Bug fixes in 1.18 ===
 * (bug 23119) WikiError class and subclasses are now marked as deprecated
index 7277908..8e3301d 100644 (file)
@@ -1616,11 +1616,20 @@ class HTMLEditTools extends HTMLFormField {
        }
 
        public function getTableRow( $value ) {
-               return "<tr><td></td><td class=\"mw-input\">"
+               if ( empty( $this->mParams['message'] ) ) {
+                       $msg = wfMessage( 'edittools' );
+               } else {
+                       $msg = wfMessage( $this->mParams['message'] );
+                       if ( $msg->isDisabled() ) {
+                               $msg = wfMessage( 'edittools' );
+                       }
+               }
+               $msg->inContentLanguage();
+               
+               
+               return '<tr><td></td><td class="mw-input">'
                        . '<div class="mw-editTools">'
-                       . wfMsgExt( empty( $this->mParams['message'] )
-                               ? 'edittools' : $this->mParams['message'],
-                               array( 'parse', 'content' ) )
+                       . $msg->parseAsBlock()
                        . "</div></td></tr>\n";
        }
 }
index b0de13e..bc1ff01 100644 (file)
@@ -994,6 +994,7 @@ class UploadForm extends HTMLForm {
                        'EditTools' => array(
                                'type' => 'edittools',
                                'section' => 'description',
+                               'message' => 'edittools-upload',
                        )
                );
 
index ccb2f4e..adbd26b 100644 (file)
@@ -1377,6 +1377,7 @@ The latest log entry is provided below for reference:",
 'template-semiprotected'           => '(semi-protected)',
 'hiddencategories'                 => 'This page is a member of {{PLURAL:$1|1 hidden category|$1 hidden categories}}:',
 'edittools'                        => '<!-- Text here will be shown below edit and upload forms. -->', # only translate this message to other languages if you have to change it
+'edittools-upload'                 => '-', 
 'nocreatetitle'                    => 'Page creation limited',
 'nocreatetext'                     => '{{SITENAME}} has restricted the ability to create new pages.
 You can go back and edit an existing page, or [[Special:UserLogin|log in or create an account]].',
index 4aa8994..b6a6f2d 100644 (file)
@@ -876,6 +876,7 @@ See also {{msg-mw|Noarticletext-nopermission}}.',
 'template-semiprotected'           => 'Used on [[Special:ProtectedPages]]. Appears in brackets after listed page titles which are semi-protected.',
 'hiddencategories'                 => "This message is shown below the edit form, like you have a section ''\"Templates used on this page\"''.",
 'edittools'                        => 'This text will be shown below edit and upload forms. It can be used to offer special characters not present on most keyboards for copying/pasting, and also often makes them clickable for insertion via a javascript. Since these are seen as specific to a wiki, however, this message should not contain anything but an html comment explaining how it should be used once the wiki has been installed.',
+'edittools'                        => 'This text will be shown below upload forms. It will default to the contents of edittools.',
 'sectioneditnotsupported-title'    => 'Page title of special page, which presumably appears when someone tries to edit a section, and section editing is disabled. Explanation of section editing on [http://meta.wikimedia.org/wiki/Help:Section_editing#Section_editing meta].',
 'sectioneditnotsupported-text'     => 'I think this is the text of an error message, which presumably appears when someone tries to edit a section, and section editing is disabled. Explanation of section editing on [http://meta.wikimedia.org/wiki/Help:Section_editing#Section_editing meta].',
 'permissionserrorstext-withaction' => '* $1 is the number of reasons that were found why the action cannot be performed.
index 541345c..52783d4 100644 (file)
@@ -296,6 +296,7 @@ $wgOptionalMessages = array(
        'pagetitle',
        'filename-prefix-blacklist',
        'edittools',
+       'edittools-upload',
        'size-bytes',
        'size-kilobytes',
        'size-megabytes',
index 6260ebb..7a8b7ff 100644 (file)
@@ -623,6 +623,7 @@ $wgMessageStructure = array(
                'template-semiprotected',
                'hiddencategories',
                'edittools',
+               'edittools-upload',
                'nocreatetitle',
                'nocreatetext',
                'nocreate-loggedin',