mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-27 23:40:19 +00:00
* Add Language::semicolonList() function
** Todo: combine all three list functions (comma, semicolon, pipe) into one function with a parameter? * Use pipe as backlink separator to be consistent with other navigation elements * Show the colon for case 'afh_actions' only if parameters exist ** Remove the now useless message * Localize the usages of comma and semicolon
This commit is contained in:
parent
d504b8ee5e
commit
58fdf4f05d
|
@ -291,7 +291,6 @@ Please ask a user with permission to add restricted actions to make the change f
|
|||
'abusefilter-history-filter' => 'Filter rule',
|
||||
'abusefilter-history-comments' => 'Comments',
|
||||
'abusefilter-history-actions' => 'Actions',
|
||||
'abusefilter-history-action' => '$1: $2',
|
||||
'abusefilter-history-backedit' => 'Back to filter editor',
|
||||
'abusefilter-history-backlist' => 'Back to filter list',
|
||||
'abusefilter-history-deleted' => 'Deleted',
|
||||
|
@ -1946,7 +1945,6 @@ Zamolite korisnika sa dopuštenjima za dodavanje ograničenih akcija da napravi
|
|||
'abusefilter-history-filter' => 'Pravila filtera',
|
||||
'abusefilter-history-comments' => 'Komentari',
|
||||
'abusefilter-history-actions' => 'Akcije',
|
||||
'abusefilter-history-action' => '$1: $2',
|
||||
'abusefilter-history-backedit' => 'Vrati se stranici za izmjenu filtera',
|
||||
'abusefilter-history-backlist' => 'Vrati se na listu filtera',
|
||||
'abusefilter-history-deleted' => 'Obrisano',
|
||||
|
@ -4085,7 +4083,6 @@ Demandez à un utilisateur autorisé à ajouter des actions restreintes d’effe
|
|||
'abusefilter-history-filter' => 'Règle du filtre',
|
||||
'abusefilter-history-comments' => 'Commentaires',
|
||||
'abusefilter-history-actions' => 'Actions',
|
||||
'abusefilter-history-action' => '$1 : $2',
|
||||
'abusefilter-history-backedit' => 'Retour à la page de modification de filtre',
|
||||
'abusefilter-history-backlist' => 'Retour à la liste des filtres',
|
||||
'abusefilter-history-deleted' => 'Supprimé',
|
||||
|
|
|
@ -11,7 +11,7 @@ class AbuseFilterViewHistory extends AbuseFilterView {
|
|||
}
|
||||
|
||||
function show() {
|
||||
global $wgRequest,$wgOut;
|
||||
global $wgRequest, $wgOut, $wgLang;
|
||||
|
||||
global $wgUser;
|
||||
|
||||
|
@ -21,7 +21,7 @@ class AbuseFilterViewHistory extends AbuseFilterView {
|
|||
$wgOut->setPageTitle( wfMsg( 'abusefilter-history', $filter ) );
|
||||
else
|
||||
$wgOut->setPageTitle( wfMsg( 'abusefilter-filter-log' ) );
|
||||
|
||||
|
||||
$sk = $wgUser->getSkin();
|
||||
|
||||
$links = array();
|
||||
|
@ -32,8 +32,8 @@ class AbuseFilterViewHistory extends AbuseFilterView {
|
|||
foreach( $links as $msg => $title ) {
|
||||
$links[$msg] = $sk->link( $title, wfMsgExt( $msg, 'parseinline' ) );
|
||||
}
|
||||
|
||||
$backlinks = implode( ' • ', $links );
|
||||
|
||||
$backlinks = $wgLang->pipeList( $links );
|
||||
$wgOut->addHTML( Xml::tags( 'p', null, $backlinks ) );
|
||||
|
||||
$user = $wgRequest->getText( 'user' );
|
||||
|
@ -138,7 +138,7 @@ class AbuseFilterHistoryPager extends TablePager {
|
|||
foreach( $flags as $flag ) {
|
||||
$flags_display[] = wfMsg( "abusefilter-history-$flag" );
|
||||
}
|
||||
$formatted = implode( ', ', $flags_display );
|
||||
$formatted = $wgLang->commaList( $flags_display );
|
||||
break;
|
||||
case 'afh_pattern':
|
||||
$formatted = htmlspecialchars( $wgLang->truncate( $value, 200 ) );
|
||||
|
@ -152,17 +152,14 @@ class AbuseFilterHistoryPager extends TablePager {
|
|||
$display_actions = '';
|
||||
|
||||
foreach( $actions as $action => $parameters ) {
|
||||
$display_actions .= Xml::tags(
|
||||
'li', null,
|
||||
wfMsgExt(
|
||||
'abusefilter-history-action',
|
||||
array( 'parseinline' ),
|
||||
array(
|
||||
AbuseFilter::getActionDisplay($action),
|
||||
implode('; ', $parameters)
|
||||
)
|
||||
)
|
||||
);
|
||||
if( count( $parameters ) == 0 ) {
|
||||
$displayAction = AbuseFilter::getActionDisplay( $action );
|
||||
} else {
|
||||
$displayAction = AbuseFilter::getActionDisplay( $action ) .
|
||||
wfMsgExt( 'colon-separator', 'escapenoentities' ) .
|
||||
$wgLang->semicolonList( $parameters );
|
||||
}
|
||||
$display_actions .= Xml::tags( 'li', null, $displayAction );
|
||||
}
|
||||
$display_actions = Xml::tags( 'ul', null, $display_actions );
|
||||
|
||||
|
|
Loading…
Reference in a new issue