Add new message 'brackets' and use it to kill some hardcoded []s.

Change-Id: Idae8d9201d1c291316ab520d204ae8c5cde2d890
This commit is contained in:
Liangent 2012-05-29 14:59:30 +08:00
parent eacc9b8d9f
commit 8c65834425
5 changed files with 10 additions and 5 deletions

View file

@ -874,8 +874,10 @@ class EnhancedChangesList extends ChangesList {
array_push( $users, $text );
}
$users = ' <span class="changedby">[' .
implode( $this->message['semicolon-separator'], $users ) . ']</span>';
$users = ' <span class="changedby">'
. $this->getContext()->msg( 'brackets' )->rawParams(
implode( $this->message['semicolon-separator'], $users )
)->plain() . '</span>';
$tl = '<span class="mw-collapsible-toggle mw-enhancedchanges-arrow"></span>';
$r .= "<td>$tl</td>";

View file

@ -1641,9 +1641,9 @@ class Linker {
* @return string
*/
public static function generateRollback( $rev ) {
return '<span class="mw-rollback-link">['
. self::buildRollbackLink( $rev )
. ']</span>';
return '<span class="mw-rollback-link">'
. wfMessage( 'brackets' )->rawParams( self::buildRollbackLink( $rev ) )->plain()
. '</span>';
}
/**

View file

@ -4426,6 +4426,7 @@ Please confirm that you really want to recreate this page.",
'ellipsis' => '...', # only translate this message to other languages if you have to change it
'percent' => '$1%', # only translate this message to other languages if you have to change it
'parentheses' => '($1)', # only translate this message to other languages if you have to change it
'brackets' => '[$1]', # only translate this message to other languages if you have to change it
# Multipage image navigation
'imgmultipageprev' => '← previous page',

View file

@ -452,6 +452,7 @@ $wgOptionalMessages = array(
'ellipsis',
'percent',
'parentheses',
'brackets',
'autocomment-prefix',
'listgrouprights-right-display',
'listgrouprights-right-revoked',

View file

@ -3321,6 +3321,7 @@ $wgMessageStructure = array(
'ellipsis',
'percent',
'parentheses',
'brackets',
),
'imgmulti' => array(
'imgmultipageprev',