From: Bryan Tong Minh Date: Thu, 27 Jan 2011 20:58:37 +0000 (+0000) Subject: (bug 26929) Introduced the edittools-upload message, which will be inserted under... X-Git-Tag: 1.31.0-rc.0~32335 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=ade2b6e3a59c317f6ecfa34a92b11ccd2cc7a43c;p=lhc%2Fweb%2Fwiklou.git (bug 26929) Introduced the edittools-upload message, which will be inserted under the upload form instead of edittools if available --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 62ea8b905d..154b400075 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index 7277908f90..8e3301d1f3 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -1616,11 +1616,20 @@ class HTMLEditTools extends HTMLFormField { } public function getTableRow( $value ) { - return "" + if ( empty( $this->mParams['message'] ) ) { + $msg = wfMessage( 'edittools' ); + } else { + $msg = wfMessage( $this->mParams['message'] ); + if ( $msg->isDisabled() ) { + $msg = wfMessage( 'edittools' ); + } + } + $msg->inContentLanguage(); + + + return '' . '
' - . wfMsgExt( empty( $this->mParams['message'] ) - ? 'edittools' : $this->mParams['message'], - array( 'parse', 'content' ) ) + . $msg->parseAsBlock() . "
\n"; } } diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index b0de13e1f6..bc1ff01c1e 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -994,6 +994,7 @@ class UploadForm extends HTMLForm { 'EditTools' => array( 'type' => 'edittools', 'section' => 'description', + 'message' => 'edittools-upload', ) ); diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index ccb2f4eb2e..adbd26b1d1 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -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' => '', # 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]].', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index 4aa8994cf5..b6a6f2da70 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -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. diff --git a/maintenance/language/messageTypes.inc b/maintenance/language/messageTypes.inc index 541345cd16..52783d4bf3 100644 --- a/maintenance/language/messageTypes.inc +++ b/maintenance/language/messageTypes.inc @@ -296,6 +296,7 @@ $wgOptionalMessages = array( 'pagetitle', 'filename-prefix-blacklist', 'edittools', + 'edittools-upload', 'size-bytes', 'size-kilobytes', 'size-megabytes', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 6260ebba15..7a8b7ff7c2 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -623,6 +623,7 @@ $wgMessageStructure = array( 'template-semiprotected', 'hiddencategories', 'edittools', + 'edittools-upload', 'nocreatetitle', 'nocreatetext', 'nocreate-loggedin',