Index: trunk/phase3/includes/RecentChange.php |
— | — | @@ -706,6 +706,7 @@ |
707 | 707 | } elseif($szdiff >= 0) { |
708 | 708 | $szdiff = '+' . $szdiff ; |
709 | 709 | } |
| 710 | + // @todo i18n with parentheses in content language? |
710 | 711 | $szdiff = '(' . $szdiff . ')' ; |
711 | 712 | } else { |
712 | 713 | $szdiff = ''; |
Index: trunk/phase3/includes/logging/LogPage.php |
— | — | @@ -416,7 +416,8 @@ |
417 | 417 | |
418 | 418 | # Use the language name for log titles, rather than Log/X |
419 | 419 | if( $name == 'Log' ) { |
420 | | - $titleLink = '(' . Linker::link( $title, LogPage::logName( $par ) ) . ')'; |
| 420 | + $titleLink = Linker::link( $title, LogPage::logName( $par ) ); |
| 421 | + $titleLink = wfMessage( 'parentheses' )->rawParams( $titleLink )->escaped(); |
421 | 422 | } else { |
422 | 423 | $titleLink = Linker::link( $title ); |
423 | 424 | } |
— | — | @@ -551,7 +552,7 @@ |
552 | 553 | for( $i = 0; $i < count( $flags ); $i++ ) { |
553 | 554 | $flags[$i] = self::formatBlockFlag( $flags[$i], $lang ); |
554 | 555 | } |
555 | | - return '(' . $lang->commaList( $flags ) . ')'; |
| 556 | + return wfMessage( 'parentheses' )->rawParams( $lang->commaList( $flags ) )->escaped(); |
556 | 557 | } else { |
557 | 558 | return ''; |
558 | 559 | } |
Index: trunk/phase3/includes/logging/LogEventsList.php |
— | — | @@ -383,7 +383,7 @@ |
384 | 384 | if( self::typeAction( $row, 'move', 'move', 'move' ) && !empty( $paramArray[0] ) ) { |
385 | 385 | $destTitle = Title::newFromText( $paramArray[0] ); |
386 | 386 | if( $destTitle ) { |
387 | | - $revert = '(' . Linker::link( |
| 387 | + $revert = Linker::link( |
388 | 388 | SpecialPage::getTitleFor( 'Movepage' ), |
389 | 389 | $this->message['revertmove'], |
390 | 390 | array(), |
— | — | @@ -394,7 +394,8 @@ |
395 | 395 | 'wpMovetalk' => 0 |
396 | 396 | ), |
397 | 397 | array( 'known', 'noclasses' ) |
398 | | - ) . ')'; |
| 398 | + ); |
| 399 | + $revert = wfMessage( 'parentheses' )->rawParams( $revert )->escaped(); |
399 | 400 | } |
400 | 401 | // Show undelete link |
401 | 402 | } elseif( self::typeAction( $row, array( 'delete', 'suppress' ), 'delete', 'deletedhistory' ) ) { |
— | — | @@ -403,17 +404,17 @@ |
404 | 405 | } else { |
405 | 406 | $viewdeleted = $this->message['undeletelink']; |
406 | 407 | } |
407 | | - $revert = '(' . Linker::link( |
| 408 | + $revert = Linker::link( |
408 | 409 | SpecialPage::getTitleFor( 'Undelete' ), |
409 | 410 | $viewdeleted, |
410 | 411 | array(), |
411 | 412 | array( 'target' => $title->getPrefixedDBkey() ), |
412 | 413 | array( 'known', 'noclasses' ) |
413 | | - ) . ')'; |
| 414 | + ); |
| 415 | + $revert = wfMessage( 'parentheses' )->rawParams( $revert )->escaped(); |
414 | 416 | // Show unblock/change block link |
415 | 417 | } elseif( self::typeAction( $row, array( 'block', 'suppress' ), array( 'block', 'reblock' ), 'block' ) ) { |
416 | | - $revert = '(' . |
417 | | - Linker::link( |
| 418 | + $revert = Linker::link( |
418 | 419 | SpecialPage::getTitleFor( 'Unblock', $row->log_title ), |
419 | 420 | $this->message['unblocklink'], |
420 | 421 | array(), |
— | — | @@ -427,12 +428,11 @@ |
428 | 429 | array(), |
429 | 430 | array(), |
430 | 431 | 'known' |
431 | | - ) . |
432 | | - ')'; |
| 432 | + ); |
| 433 | + $revert = wfMessage( 'parentheses' )->rawParams( $revert )->escaped(); |
433 | 434 | // Show change protection link |
434 | 435 | } elseif( self::typeAction( $row, 'protect', array( 'modify', 'protect', 'unprotect' ) ) ) { |
435 | | - $revert .= ' (' . |
436 | | - Linker::link( $title, |
| 436 | + $revert .= Linker::link( $title, |
437 | 437 | $this->message['hist'], |
438 | 438 | array(), |
439 | 439 | array( |
— | — | @@ -448,10 +448,10 @@ |
449 | 449 | array( 'action' => 'protect' ), |
450 | 450 | 'known' ); |
451 | 451 | } |
452 | | - $revert .= ')'; |
| 452 | + $revert = ' ' . wfMessage( 'parentheses' )->rawParams( $revert )->escaped(); |
453 | 453 | // Show unmerge link |
454 | 454 | } elseif( self::typeAction( $row, 'merge', 'merge', 'mergehistory' ) ) { |
455 | | - $revert = '(' . Linker::link( |
| 455 | + $revert = Linker::link( |
456 | 456 | SpecialPage::getTitleFor( 'MergeHistory' ), |
457 | 457 | $this->message['revertmerge'], |
458 | 458 | array(), |
— | — | @@ -461,7 +461,8 @@ |
462 | 462 | 'mergepoint' => $paramArray[1] |
463 | 463 | ), |
464 | 464 | array( 'known', 'noclasses' ) |
465 | | - ) . ')'; |
| 465 | + ); |
| 466 | + $revert = wfMessage( 'parentheses' )->rawParams( $revert )->escaped(); |
466 | 467 | // If an edit was hidden from a page give a review link to the history |
467 | 468 | } elseif( self::typeAction( $row, array( 'delete', 'suppress' ), 'revision', 'deletedhistory' ) ) { |
468 | 469 | $revert = RevisionDeleter::getLogLinks( $title, $paramArray, |
— | — | @@ -473,7 +474,7 @@ |
474 | 475 | // $paramArray[1] is a CSV of the IDs |
475 | 476 | $query = $paramArray[0]; |
476 | 477 | // Link to each hidden object ID, $paramArray[1] is the url param |
477 | | - $revert = '(' . Linker::link( |
| 478 | + $revert = Linker::link( |
478 | 479 | $revdel, |
479 | 480 | $this->message['revdel-restore'], |
480 | 481 | array(), |
— | — | @@ -483,7 +484,8 @@ |
484 | 485 | 'ids' => $query |
485 | 486 | ), |
486 | 487 | array( 'known', 'noclasses' ) |
487 | | - ) . ')'; |
| 488 | + ); |
| 489 | + $revert = wfMessage( 'parentheses' )->rawParams( $revert )->escaped(); |
488 | 490 | } |
489 | 491 | // Do nothing. The implementation is handled by the hook modifiying the passed-by-ref parameters. |
490 | 492 | } else { |
Index: trunk/phase3/includes/SkinLegacy.php |
— | — | @@ -702,7 +702,7 @@ |
703 | 703 | global $wgOut; |
704 | 704 | |
705 | 705 | if ( !$wgOut->isArticleRelated() ) { |
706 | | - return '(' . wfMsg( 'notanarticle' ) . ')'; |
| 706 | + return wfMessage( 'parentheses', wfMessage( 'notanarticle' )->text() )->escaped(); |
707 | 707 | } else { |
708 | 708 | return Linker::linkKnown( |
709 | 709 | SpecialPage::getTitleFor( 'Recentchangeslinked', $this->getSkin()->getTitle()->getPrefixedDBkey() ), |
— | — | @@ -815,8 +815,9 @@ |
816 | 816 | |
817 | 817 | $talkLink = Linker::link( $wgUser->getTalkPage(), |
818 | 818 | $wgLang->getNsText( NS_TALK ) ); |
| 819 | + $talkLink = wfMessage( 'parentheses' )->rawParams( $talkLink )->escaped(); |
819 | 820 | |
820 | | - $ret .= "$name ($talkLink)"; |
| 821 | + $ret .= "$name $talkLink"; |
821 | 822 | } else { |
822 | 823 | $ret .= wfMsg( 'notloggedin' ); |
823 | 824 | } |
— | — | @@ -837,10 +838,11 @@ |
838 | 839 | } else { |
839 | 840 | $talkLink = Linker::link( $wgUser->getTalkPage(), |
840 | 841 | $wgLang->getNsText( NS_TALK ) ); |
| 842 | + $talkLink = wfMessage( 'parentheses' )->rawParams( $talkLink )->escaped(); |
841 | 843 | |
842 | 844 | $ret .= Linker::link( $wgUser->getUserPage(), |
843 | 845 | htmlspecialchars( $wgUser->getName() ) ); |
844 | | - $ret .= " ($talkLink)<br />"; |
| 846 | + $ret .= " $talkLink<br />"; |
845 | 847 | $ret .= $wgLang->pipeList( array( |
846 | 848 | Linker::link( |
847 | 849 | SpecialPage::getTitleFor( 'Userlogout' ), wfMsg( 'logout' ), |
— | — | @@ -860,6 +862,4 @@ |
861 | 863 | |
862 | 864 | return $ret; |
863 | 865 | } |
864 | | - |
865 | 866 | } |
866 | | - |
Index: trunk/phase3/includes/specials/SpecialAllmessages.php |
— | — | @@ -370,7 +370,7 @@ |
371 | 371 | array( 'broken' ) |
372 | 372 | ); |
373 | 373 | } |
374 | | - return $title . ' (' . $talk . ')'; |
| 374 | + return $title . $this->msg( 'parentheses' )->rawParams( $talk )->escaped(); |
375 | 375 | |
376 | 376 | case 'am_default' : |
377 | 377 | case 'am_actual' : |
Index: trunk/phase3/includes/specials/SpecialUndelete.php |
— | — | @@ -1233,9 +1233,9 @@ |
1234 | 1234 | $pageLink = $this->getLanguage()->userTimeAndDate( $ts, $user ); |
1235 | 1235 | } |
1236 | 1236 | $userLink = $this->getFileUser( $file ); |
1237 | | - $data = $this->msg( 'widthheight' )->numParams( $row->fa_width, $row->fa_height )->text() . |
1238 | | - ' (' . $this->msg( 'nbytes' )->numParams( $row->fa_size )->text() . ')'; |
1239 | | - $data = htmlspecialchars( $data ); |
| 1237 | + $data = $this->msg( 'widthheight' )->numParams( $row->fa_width, $row->fa_height )->text(); |
| 1238 | + $bytes = $this->msg( 'parentheses' )->rawParams( $this->msg( 'nbytes' )->numParams( $row->fa_size )->text() )->plain(); |
| 1239 | + $data = htmlspecialchars( $data . ' ' . $bytes ); |
1240 | 1240 | $comment = $this->getFileComment( $file ); |
1241 | 1241 | |
1242 | 1242 | // Add show/hide deletion links if available |
Index: trunk/phase3/includes/specials/SpecialUserlogin.php |
— | — | @@ -334,7 +334,7 @@ |
335 | 335 | |
336 | 336 | $ip = $this->getRequest()->getIP(); |
337 | 337 | if ( $currentUser->isDnsBlacklisted( $ip, true /* check $wgProxyWhitelist */ ) ) { |
338 | | - $this->mainLoginForm( $this->msg( 'sorbs_create_account_reason' )->text() . ' (' . htmlspecialchars( $ip ) . ')' ); |
| 338 | + $this->mainLoginForm( $this->msg( 'sorbs_create_account_reason' )->text() . ' ' . $this->msg( 'parentheses' )->rawParams( htmlspecialchars( $ip ) )->escaped() ); |
339 | 339 | return false; |
340 | 340 | } |
341 | 341 | |
Index: trunk/phase3/includes/specials/SpecialListusers.php |
— | — | @@ -158,14 +158,16 @@ |
159 | 159 | } |
160 | 160 | |
161 | 161 | $userTalkPage = $userPage->getTalkPage(); |
162 | | - $talk = ' (' . Linker::link( $userTalkPage, wfMessage( 'talkpagelinktext' )->escaped() ) . ')'; |
| 162 | + $talk = Linker::link( $userTalkPage, wfMessage( 'talkpagelinktext' )->escaped() ); |
| 163 | + $talk = ' ' . wfMessage( 'parentheses' )->rawParams( $talk )->escaped(); |
163 | 164 | |
164 | 165 | $created = ''; |
165 | 166 | # Some rows may be NULL |
166 | 167 | if( $row->creation ) { |
167 | 168 | $d = $lang->date( wfTimestamp( TS_MW, $row->creation ), true ); |
168 | 169 | $t = $lang->time( wfTimestamp( TS_MW, $row->creation ), true ); |
169 | | - $created = ' (' . wfMsgExt( 'usercreated', array( 'parsemag', 'escape' ), $d, $t, $row->user_name ) . ')'; |
| 170 | + $created = wfMsgExt( 'usercreated', array( 'parsemag', 'escape' ), $d, $t, $row->user_name ); |
| 171 | + $created = ' ' . wfMessage( 'parentheses' )->rawParams( $created )->escaped(); |
170 | 172 | } |
171 | 173 | |
172 | 174 | wfRunHooks( 'SpecialListusersFormatRow', array( &$item, $row ) ); |
Index: trunk/phase3/includes/specials/SpecialTags.php |
— | — | @@ -75,12 +75,16 @@ |
76 | 76 | $newRow .= Xml::tags( 'td', null, Xml::element( 'tt', null, $tag ) ); |
77 | 77 | |
78 | 78 | $disp = ChangeTags::tagDescription( $tag ); |
79 | | - $disp .= ' (' . Linker::link( Title::makeTitle( NS_MEDIAWIKI, "Tag-$tag" ), wfMsgHtml( 'tags-edit' ) ) . ')'; |
| 79 | + $disp .= ' '; |
| 80 | + $editLink = Linker::link( Title::makeTitle( NS_MEDIAWIKI, "Tag-$tag" ), wfMsgHtml( 'tags-edit' ) ); |
| 81 | + $disp .= $this->msg( 'parentheses' )->rawParams( $editLink )->escaped(); |
80 | 82 | $newRow .= Xml::tags( 'td', null, $disp ); |
81 | 83 | |
82 | 84 | $msg = wfMessage( "tag-$tag-description" ); |
83 | 85 | $desc = !$msg->exists() ? '' : $msg->parse(); |
84 | | - $desc .= ' (' . Linker::link( Title::makeTitle( NS_MEDIAWIKI, "Tag-$tag-description" ), wfMsgHtml( 'tags-edit' ) ) . ')'; |
| 86 | + $desc .= ' '; |
| 87 | + $editDescLink = Linker::link( Title::makeTitle( NS_MEDIAWIKI, "Tag-$tag-description" ), wfMsgHtml( 'tags-edit' ) ); |
| 88 | + $desc .= $this->msg( 'parentheses' )->rawParams( $editDescLink )->escaped(); |
85 | 89 | $newRow .= Xml::tags( 'td', null, $desc ); |
86 | 90 | |
87 | 91 | $hitcount = wfMsgExt( 'tags-hitcount', array( 'parsemag' ), $this->getLanguage()->formatNum( $hitcount ) ); |