Index: trunk/phase3/includes/Exif.php |
— | — | @@ -799,7 +799,7 @@ |
800 | 800 | $fullTag = $tag . '-' . $subTag ; |
801 | 801 | $flashMsgs[] = $this->msg( $fullTag, $subValue ); |
802 | 802 | } |
803 | | - $tags[$tag] = implode( wfMsg( 'comma-separator' ), $flashMsgs ); |
| 803 | + $tags[$tag] = $wgLang->commaList( $flashMsgs ); |
804 | 804 | break; |
805 | 805 | |
806 | 806 | case 'FocalPlaneResolutionUnit': |
Index: trunk/phase3/includes/specials/SpecialPreferences.php |
— | — | @@ -633,7 +633,7 @@ |
634 | 634 | |
635 | 635 | $this->tableRow( |
636 | 636 | wfMsgExt( 'prefs-memberingroups', array( 'parseinline' ), count( $userEffectiveGroupsArray ) ), |
637 | | - implode( wfMsg( 'comma-separator' ), $userEffectiveGroupsArray ) . |
| 637 | + $wgLang->commaList( $userEffectiveGroupsArray ) . |
638 | 638 | '<br />(' . implode( ' | ', $toolLinks ) . ')' |
639 | 639 | ) . |
640 | 640 | |
Index: trunk/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -328,10 +328,7 @@ |
329 | 329 | wfMsgExt( 'filetype-banned-type', |
330 | 330 | array( 'parseinline' ), |
331 | 331 | htmlspecialchars( $finalExt ), |
332 | | - implode( |
333 | | - wfMsgExt( 'comma-separator', array( 'escapenoentities' ) ), |
334 | | - $wgFileExtensions |
335 | | - ), |
| 332 | + $wgLang->commaList( $wgFileExtensions ), |
336 | 333 | $wgLang->formatNum( count($wgFileExtensions) ) |
337 | 334 | ) |
338 | 335 | ); |
— | — | @@ -520,10 +517,7 @@ |
521 | 518 | wfMsgExt( 'filetype-unwanted-type', |
522 | 519 | array( 'parseinline' ), |
523 | 520 | htmlspecialchars( $finalExt ), |
524 | | - implode( |
525 | | - wfMsgExt( 'comma-separator', array( 'escapenoentities' ) ), |
526 | | - $wgFileExtensions |
527 | | - ), |
| 521 | + $wgLang->commaList( $wgFileExtensions ), |
528 | 522 | $wgLang->formatNum( count($wgFileExtensions) ) |
529 | 523 | ) . '</li>'; |
530 | 524 | } |
— | — | @@ -1005,21 +999,20 @@ |
1006 | 1000 | |
1007 | 1001 | $allowedExtensions = ''; |
1008 | 1002 | if( $wgCheckFileExtensions ) { |
1009 | | - $delim = wfMsgExt( 'comma-separator', array( 'escapenoentities' ) ); |
1010 | 1003 | if( $wgStrictFileExtensions ) { |
1011 | 1004 | # Everything not permitted is banned |
1012 | 1005 | $extensionsList = |
1013 | 1006 | '<div id="mw-upload-permitted">' . |
1014 | | - wfMsgWikiHtml( 'upload-permitted', implode( $wgFileExtensions, $delim ) ) . |
| 1007 | + wfMsgWikiHtml( 'upload-permitted', $wgLang->commaList( $wgFileExtensions ) ) . |
1015 | 1008 | "</div>\n"; |
1016 | 1009 | } else { |
1017 | 1010 | # We have to list both preferred and prohibited |
1018 | 1011 | $extensionsList = |
1019 | 1012 | '<div id="mw-upload-preferred">' . |
1020 | | - wfMsgWikiHtml( 'upload-preferred', implode( $wgFileExtensions, $delim ) ) . |
| 1013 | + wfMsgWikiHtml( 'upload-preferred', $wgLang->commaList( $wgFileExtensions ) ) . |
1021 | 1014 | "</div>\n" . |
1022 | 1015 | '<div id="mw-upload-prohibited">' . |
1023 | | - wfMsgWikiHtml( 'upload-prohibited', implode( $wgFileBlacklist, $delim ) ) . |
| 1016 | + wfMsgWikiHtml( 'upload-prohibited', $wgLang->commaList( $wgFileBlacklist ) ) . |
1024 | 1017 | "</div>\n"; |
1025 | 1018 | } |
1026 | 1019 | } else { |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -1898,6 +1898,17 @@ |
1899 | 1899 | } |
1900 | 1900 | return $s; |
1901 | 1901 | } |
| 1902 | + |
| 1903 | + /** |
| 1904 | + * Take a list of strings and build a locale-friendly comma-separated |
| 1905 | + * list, using the local comma-separator message. |
| 1906 | + * @fixme Fix this so it can work for $wgContLang too |
| 1907 | + */ |
| 1908 | + function commaList( $list ) { |
| 1909 | + return implode( |
| 1910 | + $list, |
| 1911 | + wfMsgExt( 'comma-separator', 'escape-noentities' ) ); |
| 1912 | + } |
1902 | 1913 | |
1903 | 1914 | /** |
1904 | 1915 | * Truncate a string to a specified length in bytes, appending an optional |