$fullTag = $tag . '-' . $subTag ;
$flashMsgs[] = $this->msg( $fullTag, $subValue );
}
- $tags[$tag] = implode( wfMsg( 'comma-separator' ), $flashMsgs );
+ $tags[$tag] = $wgLang->commaList( $flashMsgs );
break;
case 'FocalPlaneResolutionUnit':
wfMsgExt( 'filetype-banned-type',
array( 'parseinline' ),
htmlspecialchars( $finalExt ),
- implode(
- wfMsgExt( 'comma-separator', array( 'escapenoentities' ) ),
- $wgFileExtensions
- ),
+ $wgLang->commaList( $wgFileExtensions ),
$wgLang->formatNum( count($wgFileExtensions) )
)
);
wfMsgExt( 'filetype-unwanted-type',
array( 'parseinline' ),
htmlspecialchars( $finalExt ),
- implode(
- wfMsgExt( 'comma-separator', array( 'escapenoentities' ) ),
- $wgFileExtensions
- ),
+ $wgLang->commaList( $wgFileExtensions ),
$wgLang->formatNum( count($wgFileExtensions) )
) . '</li>';
}
$allowedExtensions = '';
if( $wgCheckFileExtensions ) {
- $delim = wfMsgExt( 'comma-separator', array( 'escapenoentities' ) );
if( $wgStrictFileExtensions ) {
# Everything not permitted is banned
$extensionsList =
'<div id="mw-upload-permitted">' .
- wfMsgWikiHtml( 'upload-permitted', implode( $wgFileExtensions, $delim ) ) .
+ wfMsgWikiHtml( 'upload-permitted', $wgLang->commaList( $wgFileExtensions ) ) .
"</div>\n";
} else {
# We have to list both preferred and prohibited
$extensionsList =
'<div id="mw-upload-preferred">' .
- wfMsgWikiHtml( 'upload-preferred', implode( $wgFileExtensions, $delim ) ) .
+ wfMsgWikiHtml( 'upload-preferred', $wgLang->commaList( $wgFileExtensions ) ) .
"</div>\n" .
'<div id="mw-upload-prohibited">' .
- wfMsgWikiHtml( 'upload-prohibited', implode( $wgFileBlacklist, $delim ) ) .
+ wfMsgWikiHtml( 'upload-prohibited', $wgLang->commaList( $wgFileBlacklist ) ) .
"</div>\n";
}
} else {
}
return $s;
}
+
+ /**
+ * Take a list of strings and build a locale-friendly comma-separated
+ * list, using the local comma-separator message.
+ * @fixme Fix this so it can work for $wgContLang too
+ */
+ function commaList( $list ) {
+ return implode(
+ $list,
+ wfMsgExt( 'comma-separator', 'escape-noentities' ) );
+ }
/**
* Truncate a string to a specified length in bytes, appending an optional