aboutsummaryrefslogtreecommitdiffstats
path: root/includes/collation/Collation.php
diff options
context:
space:
mode:
authorBrian Wolff <bawolff+wn@gmail.com>2016-10-29 08:29:11 +0000
committerBrian Wolff <bawolff+wn@gmail.com>2016-10-29 08:38:39 +0000
commite7464f34818f20377ca73fab72c7b3214e0f5e1c (patch)
tree0f83754dc11694418488a932fc37d31107e4d086 /includes/collation/Collation.php
parenta65a3516055e5fe3e4d44ee1efd84d4754946a58 (diff)
downloadmediawikicore-e7464f34818f20377ca73fab72c7b3214e0f5e1c.tar.gz
mediawikicore-e7464f34818f20377ca73fab72c7b3214e0f5e1c.zip
Make NumericUppercaseCollation use localized digit transforms
This will cause the numeric collation to sort localized digits for the current content language the same as how 0-9 are. This only deals with the localized digit numbers, commas and other number formatting are still not handled. Weird "numerical" unicode characters are also not handled. I was unsure if to make a "family" of numeric collations where you specify numeric-<lang code>, or if it should just use $wgContLang. Given that $wgContLang effectively never changes, and also affects all other digit handling, I opted to just use $wgContLang. Any wikis currently using the 'numeric' collation will have to have updateCollation.php --force run after this change is deployed. At the moment that includes: bnwiki, bnwikisource and hewiki Bug: T148873 Change-Id: I9eda52a8a9752a91134d1118546b0a80d3980ccf
Diffstat (limited to 'includes/collation/Collation.php')
-rw-r--r--includes/collation/Collation.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/collation/Collation.php b/includes/collation/Collation.php
index 881c8c23fe9c..9950a11a6f69 100644
--- a/includes/collation/Collation.php
+++ b/includes/collation/Collation.php
@@ -46,11 +46,13 @@ abstract class Collation {
* @return Collation
*/
public static function factory( $collationName ) {
+ global $wgContLang;
+
switch ( $collationName ) {
case 'uppercase':
return new UppercaseCollation;
case 'numeric':
- return new NumericUppercaseCollation;
+ return new NumericUppercaseCollation( $wgContLang );
case 'identity':
return new IdentityCollation;
case 'uca-default':