(bug 25946) The message on the top of Special:RecentChanges is now displayed in user...
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Tue, 1 May 2012 11:33:51 +0000 (13:33 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Wed, 9 May 2012 20:51:11 +0000 (22:51 +0200)
Moved 'recentchangestext' message to 'recentchanges-summary'; left 'recentchangestext' empty by default for wikis that would like to display things in content language on the top of Special:RecentChanges

This a resubmit of r86186 (https://www.mediawiki.org/wiki/Special:Code/MediaWiki/86186) which was reverted in r86294 (https://www.mediawiki.org/wiki/Special:Code/MediaWiki/86294). The revert should have been temporary (at least from commit summary), but it seems that it was not the case.

Change-Id: Ia2061a581f754aa1bc374a615d41e8465996feac

RELEASE-NOTES-1.20
includes/specials/SpecialRecentchanges.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messageTypes.inc
maintenance/language/messages.inc

index 78c7c95..ccf0b93 100644 (file)
@@ -103,6 +103,8 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki.
 * (bug 30410) Removed deprecated $wgFilterCallback and the 'filtered' API error.
 * (bug 32604) Some messages needs escaping of wikitext inside username
 * (bug 36537) Rename wfArrayToCGI to wfArrayToCgi for consistency with wfCgiToArray.
+* (bug 25946) The message on the top of Special:RecentChanges is now displayed
+  in user language instead of content language
 
 === API changes in 1.20 ===
 * (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API.
index a7a87f0..46dd115 100644 (file)
@@ -633,14 +633,18 @@ class SpecialRecentChanges extends IncludableSpecialPage {
         */
        function setTopText( FormOptions $opts ) {
                global $wgContLang;
-               $this->getOutput()->addWikiText(
-                       Html::rawElement( 'p',
-                               array( 'lang' => $wgContLang->getCode(), 'dir' => $wgContLang->getDir() ),
-                               "\n" . $this->msg( 'recentchangestext' )->inContentLanguage()->plain() . "\n"
-                       ), 
-                       /* $lineStart */ false,
-                       /* $interface */ false
-               );
+
+               $message = $this->msg( 'recentchangestext' )->inContentLanguage();
+               if ( $message->exists() ) {
+                       $this->getOutput()->addWikiText(
+                               Html::rawElement( 'p',
+                                       array( 'lang' => $wgContLang->getCode(), 'dir' => $wgContLang->getDir() ),
+                                       "\n" . $message->plain() . "\n"
+                               ),
+                               /* $lineStart */ false,
+                               /* $interface */ false
+                       );
+               }
        }
 
        /**
index bb405b6..4c52176 100644 (file)
@@ -2060,7 +2060,8 @@ Your e-mail address is not revealed when other users contact you.',
 'recentchanges'                     => 'Recent changes',
 'recentchanges-url'                 => 'Special:RecentChanges', # do not translate or duplicate this message to other languages
 'recentchanges-legend'              => 'Recent changes options',
-'recentchangestext'                 => 'Track the most recent changes to the wiki on this page.',
+'recentchanges-summary'             => 'Track the most recent changes to the wiki on this page.',
+'recentchangestext'                 => '-', # do not translate or duplicate this message to other languages
 'recentchanges-feed-description'    => 'Track the most recent changes to the wiki in this feed.',
 'recentchanges-label-newpage'       => 'This edit created a new page',
 'recentchanges-label-minor'         => 'This is a minor edit',
index 796af8b..f598687 100644 (file)
@@ -1769,7 +1769,7 @@ This action allows editing of all of the "user rights", not just the rights of t
 
 {{Identical|Recent changes}}',
 'recentchanges-legend' => 'Legend of the fieldset of [[Special:RecentChanges]]',
-'recentchangestext' => 'Text in recent changes',
+'recentchanges-summary' => 'Summary of [[Special:RecentChanges]].',
 'recentchanges-label-newpage' => 'Tooltip for {{msg-mw|newpageletter}}',
 'recentchanges-label-minor' => 'Tooltip for {{msg-mw|newpageletter}}',
 'recentchanges-label-bot' => 'Tooltip for {{msg-mw|boteditletter}}',
index 6a99554..42354ea 100644 (file)
@@ -123,6 +123,7 @@ $wgIgnoredMessages = array(
        'pubmedurl',
        'randompage-url',
        'recentchanges-url',
+       'recentchangestext',
        'revision-info-current',
        'revision-nav',
        'rfcurl',
index 0c3b39c..3fc6563 100644 (file)
@@ -1212,6 +1212,7 @@ $wgMessageStructure = array(
                'recentchanges',
                'recentchanges-url',
                'recentchanges-legend',
+               'recentchanges-summary',
                'recentchangestext',
                'recentchanges-feed-description',
                'recentchanges-label-newpage',