From a87bfdd2f14e89e7fa9646158f18c6b55db36658 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Fri, 14 Sep 2012 16:33:36 +0000 Subject: [PATCH] Updated plural rules from CLDR 22 Change-Id: I0325635a8e0fa3d5defbcbc3a0f4746ed4ab14c1 --- languages/data/plurals.xml | 15 ++++++++++----- tests/phpunit/includes/LocalisationCacheTest.php | 12 ++++++------ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/languages/data/plurals.xml b/languages/data/plurals.xml index 8432df44f3..a2992c847d 100644 --- a/languages/data/plurals.xml +++ b/languages/data/plurals.xml @@ -1,11 +1,11 @@ - - + + - + n is 0 n is 1 @@ -13,7 +13,12 @@ n mod 100 in 3..10 n mod 100 in 11..99 - + + n is 1 + n is 2 + n is not 0 AND n mod 10 is 0 + + n is 1 @@ -93,7 +98,7 @@ n mod 10 is 1 and n mod 100 not in 11,71,91 n mod 10 is 2 and n mod 100 not in 12,72,92 n mod 10 in 3..4,9 and n mod 100 not in 10..19,70..79,90..99 - n mod 1000000 is 0 and n is not 0 + n is not 0 and n mod 1000000 is 0 n is 0 diff --git a/tests/phpunit/includes/LocalisationCacheTest.php b/tests/phpunit/includes/LocalisationCacheTest.php index 356db87c68..b34847aa14 100644 --- a/tests/phpunit/includes/LocalisationCacheTest.php +++ b/tests/phpunit/includes/LocalisationCacheTest.php @@ -5,15 +5,15 @@ class LocalisationCacheTest extends MediaWikiTestCase { $cache = Language::getLocalisationCache(); $this->assertEquals( - $cache->getItem( 'ru', 'pluralRules' ), - $cache->getItem( 'os', 'pluralRules' ), - 'os plural rules (undefined) fallback to ru (defined)' + $cache->getItem( 'ar', 'pluralRules' ), + $cache->getItem( 'arz', 'pluralRules' ), + 'arz plural rules (undefined) fallback to ar (defined)' ); $this->assertEquals( - $cache->getItem( 'ru', 'compiledPluralRules' ), - $cache->getItem( 'os', 'compiledPluralRules' ), - 'os compiled plural rules (undefined) fallback to ru (defined)' + $cache->getItem( 'ar', 'compiledPluralRules' ), + $cache->getItem( 'arz', 'compiledPluralRules' ), + 'arz compiled plural rules (undefined) fallback to ar (defined)' ); $this->assertNotEquals( -- 2.20.1