From 25d8d26071278e3e5fdc30cb44dff705690884ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Fri, 28 Jul 2017 19:13:54 +0200 Subject: [PATCH] updateCredits: Fix collation name 'uca-default-u-kn' is a valid name for MediaWiki's category collation functionality ($wgCategoryCollation / Collation class), not for PHP's collation functionality (Collator class). 'uca-default-u-kn' for Collation maps to 'root-u-kn' for Collator (see Collation::factory()), and the '-u-kn' suffix is later stripped to enable numeric collation (see IcuCollation::_construct()). This doesn't seem to result in any changes in the output. Change-Id: I8cc7d283aee5408f8b7bed365661ff286236a694 --- maintenance/updateCredits.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/maintenance/updateCredits.php b/maintenance/updateCredits.php index 287a40c558..b7e8c1ccd3 100644 --- a/maintenance/updateCredits.php +++ b/maintenance/updateCredits.php @@ -69,7 +69,8 @@ foreach ( $lines as $line ) { } $contributors = array_keys( $contributors ); -$collator = Collator::create( 'uca-default-u-kn' ); +$collator = Collator::create( 'root' ); +$collator->setAttribute( Collator::NUMERIC_COLLATION, Collator::ON ); $collator->sort( $contributors ); array_walk( $contributors, function ( &$v, $k ) { $v = "* {$v}"; -- 2.20.1