Update plural rules from CLDR, and correct Armenian plural rules
authorSanthosh Thottingal <santhosh.thottingal@gmail.com>
Thu, 14 Feb 2013 05:49:55 +0000 (11:19 +0530)
committerSanthosh Thottingal <santhosh.thottingal@gmail.com>
Thu, 14 Feb 2013 06:07:24 +0000 (11:37 +0530)
* Upgrade to revision 8007, Contains minor change - Armenian(hy) is added
* Remove MW custom plural logic from LanguageHy.php
* Add qunit test case
* Correct phpunit testcase

Change-Id: If78436fa1597e6f3b7f050c5eede4521018904c0

languages/classes/LanguageHy.php
languages/data/plurals.xml
tests/phpunit/languages/LanguageHyTest.php
tests/qunit/suites/resources/mediawiki/mediawiki.cldr.test.js

index 9c15595..5079813 100644 (file)
@@ -77,19 +77,6 @@ class LanguageHy extends Language {
                return $word;
        }
 
-       /**
-        * @param $count int
-        * @param $forms array
-        *
-        * @return string
-        */
-       function convertPlural( $count, $forms ) {
-               if ( !count( $forms ) ) { return ''; }
-               $forms = $this->preConvertPlural( $forms, 2 );
-
-               return ( abs( $count ) <= 1 ) ? $forms[0] : $forms[1];
-       }
-
        /**
         * Armenian numeric format is "12 345,67" but "1234,56"
         *
index a2992c8..d1a403d 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE supplementalData SYSTEM "../../common/dtd/ldmlSupplemental.dtd">
 <supplementalData>
-    <version number="$Revision: 7657 $"/>
-    <generation date="$Date: 2012-08-29 11:20:56 -0700 (Wed, 29 Aug 2012) $"/>
+    <version number="$Revision: 8007 $"/>
+    <generation date="$Date: 2013-01-03 07:17:41 +0530 (Thu, 03 Jan 2013) $"/>
     <plurals>
         <!-- if locale is known to have no plurals, there are no rules -->
         <pluralRules locales="az bm bo dz fa id ig ii hu ja jv ka kde kea km kn ko lo ms my sah ses sg th to tr vi wo yo zh"/> 
@@ -18,7 +18,7 @@
             <pluralRule count="two">n is 2</pluralRule>
             <pluralRule count="many">n is not 0 AND n mod 10 is 0</pluralRule>
         </pluralRules>
-        <pluralRules locales="asa ast af bem bez bg bn brx ca cgg chr ckb da de dv ee el en eo es et eu fi fo fur fy gl gsw gu ha haw is it jgo jmc kaj kcg kk kkj kl ks ksb ku ky lb lg mas mgo ml mn mr nah nb nd ne nl nn nnh no nr ny nyn om or os pa pap ps pt rof rm rwk saq seh sn so sq ss ssy st sv sw syr ta te teo tig tk tn ts ur vo wae ve vun xh xog zu">
+        <pluralRules locales="asa ast af bem bez bg bn brx ca cgg chr ckb da de dv ee el en eo es et eu fi fo fur fy gl gsw gu ha haw hy is it jgo jmc kaj kcg kk kkj kl ks ksb ku ky lb lg mas mgo ml mn mr nah nb nd ne nl nn nnh no nr ny nyn om or os pa pap ps pt rof rm rwk saq seh sn so sq ss ssy st sv sw syr ta te teo tig tk tn ts ur vo wae ve vun xh xog zu">
             <pluralRule count="one">n is 1</pluralRule>
         </pluralRules>
         <pluralRules locales="ak am bh fil tl guw hi ln mg nso ti wa">
index ea6e255..0ff04c3 100644 (file)
@@ -16,7 +16,7 @@ class LanguageHyTest extends LanguageClassesTestCase {
 
        function providerPlural() {
                return array (
-                       array( 'one', 0 ),
+                       array( 'other', 0 ),
                        array( 'one', 1 ),
                        array( 'other', 2 ),
                        array( 'other', 200 ),
index b745fb4..779a0ed 100644 (file)
                        [ 1, [ 'one', 'other' ], 'one', 'Hungarian plural test- 1 is one' ],
                        [ 2, [ 'one', 'other' ], 'other', 'Hungarian plural test- 2 is other' ]
                ],
+               hy: [
+                       [ 0, [ 'one', 'other' ], 'other', 'Armenian plural test- 0 is other' ],
+                       [ 1, [ 'one', 'other' ], 'one', 'Armenian plural test- 1 is one' ],
+                       [ 2, [ 'one', 'other' ], 'other', 'Armenian plural test- 2 is other' ]
+               ],
                ar: [
                        [ 0, [ 'zero', 'one', 'two', 'few', 'many', 'other' ], 'zero', 'Arabic plural test - 0 is zero' ],
                        [ 1, [ 'zero', 'one', 'two', 'few', 'many', 'other' ], 'one', 'Arabic plural test - 1 is one' ],