r38795 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38794‎ | r38795 | r38796 >
Date:17:02, 7 August 2008
Author:brion
Status:old
Tags:
Comment:
* (bug 14921) Special:Contributions/: add user name to <title>
Patch by Emufarmers

This sticks the username in a more descriptive <title> for window/tab/bookmark title without duplicating the target unnecessarily in the body (where we have a link in the subtitle)

https://bugzilla.wikimedia.org/attachment.cgi?id=5131
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -1514,6 +1514,7 @@
15151515 ),
15161516 'contributions' => array(
15171517 'contributions',
 1518+ 'contributions-title',
15181519 'mycontris',
15191520 'contribsub2',
15201521 'nocontribs',
@@ -1524,6 +1525,7 @@
15251526 'sp-contributions' => array(
15261527 'sp-contributions-newbies',
15271528 'sp-contributions-newbies-sub',
 1529+ 'sp-contributions-newbies-title',
15281530 'sp-contributions-blocklog',
15291531 'sp-contributions-search',
15301532 'sp-contributions-username',
Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -223,8 +223,10 @@
224224 if ( $target != 'newbies' ) {
225225 $target = $nt->getText();
226226 $wgOut->setSubtitle( contributionsSub( $nt, $id ) );
 227+ $wgOut->setHTMLTitle( wfMsg( 'pagetitle', wfMsg( 'contributions-title', $target ) ) );
227228 } else {
228229 $wgOut->setSubtitle( wfMsgHtml( 'sp-contributions-newbies-sub') );
 230+ $wgOut->setHTMLTitle( wfMsg( 'pagetitle', wfMsg( 'sp-contributions-newbies-title' ) ) );
229231 }
230232
231233 if ( ( $ns = $wgRequest->getVal( 'namespace', null ) ) !== null && $ns !== '' ) {
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -2289,23 +2289,25 @@
22902290 'blanknamespace' => '(Main)',
22912291
22922292 # Contributions
2293 -'contributions' => 'User contributions',
2294 -'mycontris' => 'My contributions',
2295 -'contribsub2' => 'For $1 ($2)',
2296 -'nocontribs' => 'No changes were found matching these criteria.',
2297 -'uctop' => '(top)',
2298 -'month' => 'From month (and earlier):',
2299 -'year' => 'From year (and earlier):',
 2293+'contributions' => 'User contributions',
 2294+'contributions-title' => 'User contributions for $1',
 2295+'mycontris' => 'My contributions',
 2296+'contribsub2' => 'For $1 ($2)',
 2297+'nocontribs' => 'No changes were found matching these criteria.',
 2298+'uctop' => '(top)',
 2299+'month' => 'From month (and earlier):',
 2300+'year' => 'From year (and earlier):',
23002301
2301 -'sp-contributions-newbies' => 'Show contributions of new accounts only',
2302 -'sp-contributions-newbies-sub' => 'For new accounts',
2303 -'sp-contributions-blocklog' => 'Block log',
2304 -'sp-contributions-search' => 'Search for contributions',
2305 -'sp-contributions-username' => 'IP Address or username:',
2306 -'sp-contributions-submit' => 'Search',
2307 -'sp-contributions-explain' => '', # only translate this message to other languages if you have to change it
2308 -'sp-contributions-footer' => '-', # do not translate or duplicate this message to other languages
2309 -'sp-contributions-footer-anon' => '-', # do not translate or duplicate this message to other languages
 2302+'sp-contributions-newbies' => 'Show contributions of new accounts only',
 2303+'sp-contributions-newbies-sub' => 'For new accounts',
 2304+'sp-contributions-newbies-title' => 'User contributions for new accounts',
 2305+'sp-contributions-blocklog' => 'Block log',
 2306+'sp-contributions-search' => 'Search for contributions',
 2307+'sp-contributions-username' => 'IP Address or username:',
 2308+'sp-contributions-submit' => 'Search',
 2309+'sp-contributions-explain' => '', # only translate this message to other languages if you have to change it
 2310+'sp-contributions-footer' => '-', # do not translate or duplicate this message to other languages
 2311+'sp-contributions-footer-anon' => '-', # do not translate or duplicate this message to other languages
23102312
23112313 # What links here
23122314 'whatlinkshere' => 'What links here',
Index: trunk/phase3/RELEASE-NOTES
@@ -52,6 +52,8 @@
5353 * Added 'noconvertlink' toogle that can be set per user preferences, also
5454 added 'convertlink=no|yes' on GET requests whether have the link titles
5555 being converted or not
 56+* (bug 14921) Special:Contributions/: add user name to <title>
 57+ Patch by Emufarmers
5658
5759 === Bug fixes in 1.14 ===
5860

Status & tagging log