5 * Namespace for CLDR-related utility methods.
6 * Provided by the `mediawiki.cdlr` ResourceLoader module.
13 * Get the plural form index for the number.
15 * In case none of the rules passed, we return `pluralRules.length` -
16 * that means it is the "other" form.
18 * @param {number} number
19 * @param {Array} pluralRules
20 * @return {number} plural form index
22 getPluralForm: function ( number, pluralRules ) {
23 const pluralRuleParser = require( 'mediawiki.libs.pluralruleparser' );
25 for ( i = 0; i < pluralRules.length; i++ ) {
26 if ( pluralRuleParser( pluralRules[ i ], number ) ) {