Path: blob/trunk/third_party/closure/goog/i18n/pluralrules.js
2868 views
// Copyright 2012 The Closure Library Authors. All Rights Reserved.1//2// Licensed under the Apache License, Version 2.0 (the "License");3// you may not use this file except in compliance with the License.4// You may obtain a copy of the License at5//6// http://www.apache.org/licenses/LICENSE-2.07//8// Unless required by applicable law or agreed to in writing, software9// distributed under the License is distributed on an "AS-IS" BASIS,10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.11// See the License for the specific language governing permissions and12// limitations under the License.1314/**15* @fileoverview Plural rules.16*17* This file is autogenerated by script:18* http://go/generate_pluralrules.py19* File generated from CLDR ver. 31.0.120*21* Before check in, this file could have been manually edited. This is to22* incorporate changes before we could fix CLDR. All manual modification must be23* documented in this section, and should be removed after those changes land to24* CLDR.25*/2627// clang-format off2829goog.provide('goog.i18n.pluralRules');30/**31* Plural pattern keyword32* @enum {string}33*/34goog.i18n.pluralRules.Keyword = {35ZERO: 'zero',36ONE: 'one',37TWO: 'two',38FEW: 'few',39MANY: 'many',40OTHER: 'other'41};424344/**45* Default Plural select rule.46* @param {number} n The count of items.47* @param {number=} opt_precision optional, precision.48* @return {goog.i18n.pluralRules.Keyword} Default value.49* @private50*/51goog.i18n.pluralRules.defaultSelect_ = function(n, opt_precision) {52return goog.i18n.pluralRules.Keyword.OTHER;53};5455/**56* Returns the fractional part of a number (3.1416 => 1416)57* @param {number} n The count of items.58* @return {number} The fractional part.59* @private60*/61goog.i18n.pluralRules.decimals_ = function(n) {62var str = n + '';63var result = str.indexOf('.');64return (result == -1) ? 0 : str.length - result - 1;65};6667/**68* Calculates v and f as per CLDR plural rules.69* The short names for parameters / return match the CLDR syntax and UTS #3570* (http://unicode.org/reports/tr35/tr35-numbers.html#Plural_rules_syntax)71* @param {number} n The count of items.72* @param {number=} opt_precision optional, precision.73* @return {!{v:number, f:number}} The v and f.74* @private75*/76goog.i18n.pluralRules.get_vf_ = function(n, opt_precision) {77var DEFAULT_DIGITS = 3;7879if (undefined === opt_precision) {80var v = Math.min(goog.i18n.pluralRules.decimals_(n), DEFAULT_DIGITS);81} else {82var v = opt_precision;83}8485var base = Math.pow(10, v);86var f = ((n * base) | 0) % base;8788return {v: v, f: f};89};9091/**92* Calculates w and t as per CLDR plural rules.93* The short names for parameters / return match the CLDR syntax and UTS #3594* (http://unicode.org/reports/tr35/tr35-numbers.html#Plural_rules_syntax)95* @param {number} v Calculated previously.96* @param {number} f Calculated previously.97* @return {!{w:number, t:number}} The w and t.98* @private99*/100goog.i18n.pluralRules.get_wt_ = function(v, f) {101if (f === 0) {102return {w: 0, t: 0};103}104105while ((f % 10) === 0) {106f /= 10;107v--;108}109110return {w: v, t: f};111};112113/**114* Plural select rules for fil locale115*116* @param {number} n The count of items.117* @param {number=} opt_precision Precision for number formatting, if not default.118* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.119* @private120*/121goog.i18n.pluralRules.filSelect_ = function(n, opt_precision) {122var i = n | 0;123var vf = goog.i18n.pluralRules.get_vf_(n, opt_precision);124if (vf.v == 0 && (i == 1 || i == 2 || i == 3) || vf.v == 0 && i % 10 != 4 && i % 10 != 6 && i % 10 != 9 || vf.v != 0 && vf.f % 10 != 4 && vf.f % 10 != 6 && vf.f % 10 != 9) {125return goog.i18n.pluralRules.Keyword.ONE;126}127return goog.i18n.pluralRules.Keyword.OTHER;128};129130/**131* Plural select rules for br locale132*133* @param {number} n The count of items.134* @param {number=} opt_precision Precision for number formatting, if not default.135* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.136* @private137*/138goog.i18n.pluralRules.brSelect_ = function(n, opt_precision) {139if (n % 10 == 1 && n % 100 != 11 && n % 100 != 71 && n % 100 != 91) {140return goog.i18n.pluralRules.Keyword.ONE;141}142if (n % 10 == 2 && n % 100 != 12 && n % 100 != 72 && n % 100 != 92) {143return goog.i18n.pluralRules.Keyword.TWO;144}145if ((n % 10 >= 3 && n % 10 <= 4 || n % 10 == 9) && (n % 100 < 10 || n % 100 > 19) && (n % 100 < 70 || n % 100 > 79) && (n % 100 < 90 || n % 100 > 99)) {146return goog.i18n.pluralRules.Keyword.FEW;147}148if (n != 0 && n % 1000000 == 0) {149return goog.i18n.pluralRules.Keyword.MANY;150}151return goog.i18n.pluralRules.Keyword.OTHER;152};153154/**155* Plural select rules for sr locale156*157* @param {number} n The count of items.158* @param {number=} opt_precision Precision for number formatting, if not default.159* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.160* @private161*/162goog.i18n.pluralRules.srSelect_ = function(n, opt_precision) {163var i = n | 0;164var vf = goog.i18n.pluralRules.get_vf_(n, opt_precision);165if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) {166return goog.i18n.pluralRules.Keyword.ONE;167}168if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) {169return goog.i18n.pluralRules.Keyword.FEW;170}171return goog.i18n.pluralRules.Keyword.OTHER;172};173174/**175* Plural select rules for ro locale176*177* @param {number} n The count of items.178* @param {number=} opt_precision Precision for number formatting, if not default.179* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.180* @private181*/182goog.i18n.pluralRules.roSelect_ = function(n, opt_precision) {183var i = n | 0;184var vf = goog.i18n.pluralRules.get_vf_(n, opt_precision);185if (i == 1 && vf.v == 0) {186return goog.i18n.pluralRules.Keyword.ONE;187}188if (vf.v != 0 || n == 0 || n != 1 && n % 100 >= 1 && n % 100 <= 19) {189return goog.i18n.pluralRules.Keyword.FEW;190}191return goog.i18n.pluralRules.Keyword.OTHER;192};193194/**195* Plural select rules for hi locale196*197* @param {number} n The count of items.198* @param {number=} opt_precision Precision for number formatting, if not default.199* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.200* @private201*/202goog.i18n.pluralRules.hiSelect_ = function(n, opt_precision) {203var i = n | 0;204if (i == 0 || n == 1) {205return goog.i18n.pluralRules.Keyword.ONE;206}207return goog.i18n.pluralRules.Keyword.OTHER;208};209210/**211* Plural select rules for fr locale212*213* @param {number} n The count of items.214* @param {number=} opt_precision Precision for number formatting, if not default.215* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.216* @private217*/218goog.i18n.pluralRules.frSelect_ = function(n, opt_precision) {219var i = n | 0;220if (i == 0 || i == 1) {221return goog.i18n.pluralRules.Keyword.ONE;222}223return goog.i18n.pluralRules.Keyword.OTHER;224};225226/**227* Plural select rules for pt locale228*229* @param {number} n The count of items.230* @param {number=} opt_precision Precision for number formatting, if not default.231* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.232* @private233*/234goog.i18n.pluralRules.ptSelect_ = function(n, opt_precision) {235var i = n | 0;236if (i >= 0 && i <= 1) {237return goog.i18n.pluralRules.Keyword.ONE;238}239return goog.i18n.pluralRules.Keyword.OTHER;240};241242/**243* Plural select rules for cs locale244*245* @param {number} n The count of items.246* @param {number=} opt_precision Precision for number formatting, if not default.247* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.248* @private249*/250goog.i18n.pluralRules.csSelect_ = function(n, opt_precision) {251var i = n | 0;252var vf = goog.i18n.pluralRules.get_vf_(n, opt_precision);253if (i == 1 && vf.v == 0) {254return goog.i18n.pluralRules.Keyword.ONE;255}256if (i >= 2 && i <= 4 && vf.v == 0) {257return goog.i18n.pluralRules.Keyword.FEW;258}259if (vf.v != 0) {260return goog.i18n.pluralRules.Keyword.MANY;261}262return goog.i18n.pluralRules.Keyword.OTHER;263};264265/**266* Plural select rules for pl locale267*268* @param {number} n The count of items.269* @param {number=} opt_precision Precision for number formatting, if not default.270* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.271* @private272*/273goog.i18n.pluralRules.plSelect_ = function(n, opt_precision) {274var i = n | 0;275var vf = goog.i18n.pluralRules.get_vf_(n, opt_precision);276if (i == 1 && vf.v == 0) {277return goog.i18n.pluralRules.Keyword.ONE;278}279if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) {280return goog.i18n.pluralRules.Keyword.FEW;281}282if (vf.v == 0 && i != 1 && i % 10 >= 0 && i % 10 <= 1 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 12 && i % 100 <= 14) {283return goog.i18n.pluralRules.Keyword.MANY;284}285return goog.i18n.pluralRules.Keyword.OTHER;286};287288/**289* Plural select rules for shi locale290*291* @param {number} n The count of items.292* @param {number=} opt_precision Precision for number formatting, if not default.293* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.294* @private295*/296goog.i18n.pluralRules.shiSelect_ = function(n, opt_precision) {297var i = n | 0;298if (i == 0 || n == 1) {299return goog.i18n.pluralRules.Keyword.ONE;300}301if (n >= 2 && n <= 10) {302return goog.i18n.pluralRules.Keyword.FEW;303}304return goog.i18n.pluralRules.Keyword.OTHER;305};306307/**308* Plural select rules for lv locale309*310* @param {number} n The count of items.311* @param {number=} opt_precision Precision for number formatting, if not default.312* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.313* @private314*/315goog.i18n.pluralRules.lvSelect_ = function(n, opt_precision) {316var vf = goog.i18n.pluralRules.get_vf_(n, opt_precision);317if (n % 10 == 0 || n % 100 >= 11 && n % 100 <= 19 || vf.v == 2 && vf.f % 100 >= 11 && vf.f % 100 <= 19) {318return goog.i18n.pluralRules.Keyword.ZERO;319}320if (n % 10 == 1 && n % 100 != 11 || vf.v == 2 && vf.f % 10 == 1 && vf.f % 100 != 11 || vf.v != 2 && vf.f % 10 == 1) {321return goog.i18n.pluralRules.Keyword.ONE;322}323return goog.i18n.pluralRules.Keyword.OTHER;324};325326/**327* Plural select rules for iu locale328*329* @param {number} n The count of items.330* @param {number=} opt_precision Precision for number formatting, if not default.331* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.332* @private333*/334goog.i18n.pluralRules.iuSelect_ = function(n, opt_precision) {335if (n == 1) {336return goog.i18n.pluralRules.Keyword.ONE;337}338if (n == 2) {339return goog.i18n.pluralRules.Keyword.TWO;340}341return goog.i18n.pluralRules.Keyword.OTHER;342};343344/**345* Plural select rules for he locale346*347* @param {number} n The count of items.348* @param {number=} opt_precision Precision for number formatting, if not default.349* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.350* @private351*/352goog.i18n.pluralRules.heSelect_ = function(n, opt_precision) {353var i = n | 0;354var vf = goog.i18n.pluralRules.get_vf_(n, opt_precision);355if (i == 1 && vf.v == 0) {356return goog.i18n.pluralRules.Keyword.ONE;357}358if (i == 2 && vf.v == 0) {359return goog.i18n.pluralRules.Keyword.TWO;360}361if (vf.v == 0 && (n < 0 || n > 10) && n % 10 == 0) {362return goog.i18n.pluralRules.Keyword.MANY;363}364return goog.i18n.pluralRules.Keyword.OTHER;365};366367/**368* Plural select rules for mt locale369*370* @param {number} n The count of items.371* @param {number=} opt_precision Precision for number formatting, if not default.372* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.373* @private374*/375goog.i18n.pluralRules.mtSelect_ = function(n, opt_precision) {376if (n == 1) {377return goog.i18n.pluralRules.Keyword.ONE;378}379if (n == 0 || n % 100 >= 2 && n % 100 <= 10) {380return goog.i18n.pluralRules.Keyword.FEW;381}382if (n % 100 >= 11 && n % 100 <= 19) {383return goog.i18n.pluralRules.Keyword.MANY;384}385return goog.i18n.pluralRules.Keyword.OTHER;386};387388/**389* Plural select rules for si locale390*391* @param {number} n The count of items.392* @param {number=} opt_precision Precision for number formatting, if not default.393* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.394* @private395*/396goog.i18n.pluralRules.siSelect_ = function(n, opt_precision) {397var i = n | 0;398var vf = goog.i18n.pluralRules.get_vf_(n, opt_precision);399if ((n == 0 || n == 1) || i == 0 && vf.f == 1) {400return goog.i18n.pluralRules.Keyword.ONE;401}402return goog.i18n.pluralRules.Keyword.OTHER;403};404405/**406* Plural select rules for cy locale407*408* @param {number} n The count of items.409* @param {number=} opt_precision Precision for number formatting, if not default.410* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.411* @private412*/413goog.i18n.pluralRules.cySelect_ = function(n, opt_precision) {414if (n == 0) {415return goog.i18n.pluralRules.Keyword.ZERO;416}417if (n == 1) {418return goog.i18n.pluralRules.Keyword.ONE;419}420if (n == 2) {421return goog.i18n.pluralRules.Keyword.TWO;422}423if (n == 3) {424return goog.i18n.pluralRules.Keyword.FEW;425}426if (n == 6) {427return goog.i18n.pluralRules.Keyword.MANY;428}429return goog.i18n.pluralRules.Keyword.OTHER;430};431432/**433* Plural select rules for da locale434*435* @param {number} n The count of items.436* @param {number=} opt_precision Precision for number formatting, if not default.437* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.438* @private439*/440goog.i18n.pluralRules.daSelect_ = function(n, opt_precision) {441var i = n | 0;442var vf = goog.i18n.pluralRules.get_vf_(n, opt_precision);443var wt = goog.i18n.pluralRules.get_wt_(vf.v, vf.f);444if (n == 1 || wt.t != 0 && (i == 0 || i == 1)) {445return goog.i18n.pluralRules.Keyword.ONE;446}447return goog.i18n.pluralRules.Keyword.OTHER;448};449450/**451* Plural select rules for ru locale452*453* @param {number} n The count of items.454* @param {number=} opt_precision Precision for number formatting, if not default.455* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.456* @private457*/458goog.i18n.pluralRules.ruSelect_ = function(n, opt_precision) {459var i = n | 0;460var vf = goog.i18n.pluralRules.get_vf_(n, opt_precision);461if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) {462return goog.i18n.pluralRules.Keyword.ONE;463}464if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) {465return goog.i18n.pluralRules.Keyword.FEW;466}467if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) {468return goog.i18n.pluralRules.Keyword.MANY;469}470return goog.i18n.pluralRules.Keyword.OTHER;471};472473/**474* Plural select rules for gv locale475*476* @param {number} n The count of items.477* @param {number=} opt_precision Precision for number formatting, if not default.478* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.479* @private480*/481goog.i18n.pluralRules.gvSelect_ = function(n, opt_precision) {482var i = n | 0;483var vf = goog.i18n.pluralRules.get_vf_(n, opt_precision);484if (vf.v == 0 && i % 10 == 1) {485return goog.i18n.pluralRules.Keyword.ONE;486}487if (vf.v == 0 && i % 10 == 2) {488return goog.i18n.pluralRules.Keyword.TWO;489}490if (vf.v == 0 && (i % 100 == 0 || i % 100 == 20 || i % 100 == 40 || i % 100 == 60 || i % 100 == 80)) {491return goog.i18n.pluralRules.Keyword.FEW;492}493if (vf.v != 0) {494return goog.i18n.pluralRules.Keyword.MANY;495}496return goog.i18n.pluralRules.Keyword.OTHER;497};498499/**500* Plural select rules for be locale501*502* @param {number} n The count of items.503* @param {number=} opt_precision Precision for number formatting, if not default.504* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.505* @private506*/507goog.i18n.pluralRules.beSelect_ = function(n, opt_precision) {508if (n % 10 == 1 && n % 100 != 11) {509return goog.i18n.pluralRules.Keyword.ONE;510}511if (n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) {512return goog.i18n.pluralRules.Keyword.FEW;513}514if (n % 10 == 0 || n % 10 >= 5 && n % 10 <= 9 || n % 100 >= 11 && n % 100 <= 14) {515return goog.i18n.pluralRules.Keyword.MANY;516}517return goog.i18n.pluralRules.Keyword.OTHER;518};519520/**521* Plural select rules for mk locale522*523* @param {number} n The count of items.524* @param {number=} opt_precision Precision for number formatting, if not default.525* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.526* @private527*/528goog.i18n.pluralRules.mkSelect_ = function(n, opt_precision) {529var i = n | 0;530var vf = goog.i18n.pluralRules.get_vf_(n, opt_precision);531if (vf.v == 0 && i % 10 == 1 || vf.f % 10 == 1) {532return goog.i18n.pluralRules.Keyword.ONE;533}534return goog.i18n.pluralRules.Keyword.OTHER;535};536537/**538* Plural select rules for ga locale539*540* @param {number} n The count of items.541* @param {number=} opt_precision Precision for number formatting, if not default.542* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.543* @private544*/545goog.i18n.pluralRules.gaSelect_ = function(n, opt_precision) {546if (n == 1) {547return goog.i18n.pluralRules.Keyword.ONE;548}549if (n == 2) {550return goog.i18n.pluralRules.Keyword.TWO;551}552if (n >= 3 && n <= 6) {553return goog.i18n.pluralRules.Keyword.FEW;554}555if (n >= 7 && n <= 10) {556return goog.i18n.pluralRules.Keyword.MANY;557}558return goog.i18n.pluralRules.Keyword.OTHER;559};560561/**562* Plural select rules for es locale563*564* @param {number} n The count of items.565* @param {number=} opt_precision Precision for number formatting, if not default.566* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.567* @private568*/569goog.i18n.pluralRules.esSelect_ = function(n, opt_precision) {570if (n == 1) {571return goog.i18n.pluralRules.Keyword.ONE;572}573return goog.i18n.pluralRules.Keyword.OTHER;574};575576/**577* Plural select rules for dsb locale578*579* @param {number} n The count of items.580* @param {number=} opt_precision Precision for number formatting, if not default.581* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.582* @private583*/584goog.i18n.pluralRules.dsbSelect_ = function(n, opt_precision) {585var i = n | 0;586var vf = goog.i18n.pluralRules.get_vf_(n, opt_precision);587if (vf.v == 0 && i % 100 == 1 || vf.f % 100 == 1) {588return goog.i18n.pluralRules.Keyword.ONE;589}590if (vf.v == 0 && i % 100 == 2 || vf.f % 100 == 2) {591return goog.i18n.pluralRules.Keyword.TWO;592}593if (vf.v == 0 && i % 100 >= 3 && i % 100 <= 4 || vf.f % 100 >= 3 && vf.f % 100 <= 4) {594return goog.i18n.pluralRules.Keyword.FEW;595}596return goog.i18n.pluralRules.Keyword.OTHER;597};598599/**600* Plural select rules for lag locale601*602* @param {number} n The count of items.603* @param {number=} opt_precision Precision for number formatting, if not default.604* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.605* @private606*/607goog.i18n.pluralRules.lagSelect_ = function(n, opt_precision) {608var i = n | 0;609if (n == 0) {610return goog.i18n.pluralRules.Keyword.ZERO;611}612if ((i == 0 || i == 1) && n != 0) {613return goog.i18n.pluralRules.Keyword.ONE;614}615return goog.i18n.pluralRules.Keyword.OTHER;616};617618/**619* Plural select rules for is locale620*621* @param {number} n The count of items.622* @param {number=} opt_precision Precision for number formatting, if not default.623* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.624* @private625*/626goog.i18n.pluralRules.isSelect_ = function(n, opt_precision) {627var i = n | 0;628var vf = goog.i18n.pluralRules.get_vf_(n, opt_precision);629var wt = goog.i18n.pluralRules.get_wt_(vf.v, vf.f);630if (wt.t == 0 && i % 10 == 1 && i % 100 != 11 || wt.t != 0) {631return goog.i18n.pluralRules.Keyword.ONE;632}633return goog.i18n.pluralRules.Keyword.OTHER;634};635636/**637* Plural select rules for ksh locale638*639* @param {number} n The count of items.640* @param {number=} opt_precision Precision for number formatting, if not default.641* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.642* @private643*/644goog.i18n.pluralRules.kshSelect_ = function(n, opt_precision) {645if (n == 0) {646return goog.i18n.pluralRules.Keyword.ZERO;647}648if (n == 1) {649return goog.i18n.pluralRules.Keyword.ONE;650}651return goog.i18n.pluralRules.Keyword.OTHER;652};653654/**655* Plural select rules for ar locale656*657* @param {number} n The count of items.658* @param {number=} opt_precision Precision for number formatting, if not default.659* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.660* @private661*/662goog.i18n.pluralRules.arSelect_ = function(n, opt_precision) {663if (n == 0) {664return goog.i18n.pluralRules.Keyword.ZERO;665}666if (n == 1) {667return goog.i18n.pluralRules.Keyword.ONE;668}669if (n == 2) {670return goog.i18n.pluralRules.Keyword.TWO;671}672if (n % 100 >= 3 && n % 100 <= 10) {673return goog.i18n.pluralRules.Keyword.FEW;674}675if (n % 100 >= 11 && n % 100 <= 99) {676return goog.i18n.pluralRules.Keyword.MANY;677}678return goog.i18n.pluralRules.Keyword.OTHER;679};680681/**682* Plural select rules for gd locale683*684* @param {number} n The count of items.685* @param {number=} opt_precision Precision for number formatting, if not default.686* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.687* @private688*/689goog.i18n.pluralRules.gdSelect_ = function(n, opt_precision) {690if (n == 1 || n == 11) {691return goog.i18n.pluralRules.Keyword.ONE;692}693if (n == 2 || n == 12) {694return goog.i18n.pluralRules.Keyword.TWO;695}696if (n >= 3 && n <= 10 || n >= 13 && n <= 19) {697return goog.i18n.pluralRules.Keyword.FEW;698}699return goog.i18n.pluralRules.Keyword.OTHER;700};701702/**703* Plural select rules for sl locale704*705* @param {number} n The count of items.706* @param {number=} opt_precision Precision for number formatting, if not default.707* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.708* @private709*/710goog.i18n.pluralRules.slSelect_ = function(n, opt_precision) {711var i = n | 0;712var vf = goog.i18n.pluralRules.get_vf_(n, opt_precision);713if (vf.v == 0 && i % 100 == 1) {714return goog.i18n.pluralRules.Keyword.ONE;715}716if (vf.v == 0 && i % 100 == 2) {717return goog.i18n.pluralRules.Keyword.TWO;718}719if (vf.v == 0 && i % 100 >= 3 && i % 100 <= 4 || vf.v != 0) {720return goog.i18n.pluralRules.Keyword.FEW;721}722return goog.i18n.pluralRules.Keyword.OTHER;723};724725/**726* Plural select rules for lt locale727*728* @param {number} n The count of items.729* @param {number=} opt_precision Precision for number formatting, if not default.730* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.731* @private732*/733goog.i18n.pluralRules.ltSelect_ = function(n, opt_precision) {734var vf = goog.i18n.pluralRules.get_vf_(n, opt_precision);735if (n % 10 == 1 && (n % 100 < 11 || n % 100 > 19)) {736return goog.i18n.pluralRules.Keyword.ONE;737}738if (n % 10 >= 2 && n % 10 <= 9 && (n % 100 < 11 || n % 100 > 19)) {739return goog.i18n.pluralRules.Keyword.FEW;740}741if (vf.f != 0) {742return goog.i18n.pluralRules.Keyword.MANY;743}744return goog.i18n.pluralRules.Keyword.OTHER;745};746747/**748* Plural select rules for tzm locale749*750* @param {number} n The count of items.751* @param {number=} opt_precision Precision for number formatting, if not default.752* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.753* @private754*/755goog.i18n.pluralRules.tzmSelect_ = function(n, opt_precision) {756if (n >= 0 && n <= 1 || n >= 11 && n <= 99) {757return goog.i18n.pluralRules.Keyword.ONE;758}759return goog.i18n.pluralRules.Keyword.OTHER;760};761762/**763* Plural select rules for en locale764*765* @param {number} n The count of items.766* @param {number=} opt_precision Precision for number formatting, if not default.767* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.768* @private769*/770goog.i18n.pluralRules.enSelect_ = function(n, opt_precision) {771var i = n | 0;772var vf = goog.i18n.pluralRules.get_vf_(n, opt_precision);773if (i == 1 && vf.v == 0) {774return goog.i18n.pluralRules.Keyword.ONE;775}776return goog.i18n.pluralRules.Keyword.OTHER;777};778779/**780* Plural select rules for ak locale781*782* @param {number} n The count of items.783* @param {number=} opt_precision Precision for number formatting, if not default.784* @return {goog.i18n.pluralRules.Keyword} Locale-specific plural value.785* @private786*/787goog.i18n.pluralRules.akSelect_ = function(n, opt_precision) {788if (n >= 0 && n <= 1) {789return goog.i18n.pluralRules.Keyword.ONE;790}791return goog.i18n.pluralRules.Keyword.OTHER;792};793794/**795* Selected Plural rules by locale.796*/797goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;798if (goog.LOCALE == 'af') {799goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;800}801if (goog.LOCALE == 'am') {802goog.i18n.pluralRules.select = goog.i18n.pluralRules.hiSelect_;803}804if (goog.LOCALE == 'ar') {805goog.i18n.pluralRules.select = goog.i18n.pluralRules.arSelect_;806}807if (goog.LOCALE == 'ar_DZ' || goog.LOCALE == 'ar-DZ') {808goog.i18n.pluralRules.select = goog.i18n.pluralRules.arSelect_;809}810if (goog.LOCALE == 'az') {811goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;812}813if (goog.LOCALE == 'be') {814goog.i18n.pluralRules.select = goog.i18n.pluralRules.beSelect_;815}816if (goog.LOCALE == 'bg') {817goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;818}819if (goog.LOCALE == 'bn') {820goog.i18n.pluralRules.select = goog.i18n.pluralRules.hiSelect_;821}822if (goog.LOCALE == 'br') {823goog.i18n.pluralRules.select = goog.i18n.pluralRules.brSelect_;824}825if (goog.LOCALE == 'bs') {826goog.i18n.pluralRules.select = goog.i18n.pluralRules.srSelect_;827}828if (goog.LOCALE == 'ca') {829goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;830}831if (goog.LOCALE == 'chr') {832goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;833}834if (goog.LOCALE == 'cs') {835goog.i18n.pluralRules.select = goog.i18n.pluralRules.csSelect_;836}837if (goog.LOCALE == 'cy') {838goog.i18n.pluralRules.select = goog.i18n.pluralRules.cySelect_;839}840if (goog.LOCALE == 'da') {841goog.i18n.pluralRules.select = goog.i18n.pluralRules.daSelect_;842}843if (goog.LOCALE == 'de') {844goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;845}846if (goog.LOCALE == 'de_AT' || goog.LOCALE == 'de-AT') {847goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;848}849if (goog.LOCALE == 'de_CH' || goog.LOCALE == 'de-CH') {850goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;851}852if (goog.LOCALE == 'el') {853goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;854}855if (goog.LOCALE == 'en') {856goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;857}858if (goog.LOCALE == 'en_AU' || goog.LOCALE == 'en-AU') {859goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;860}861if (goog.LOCALE == 'en_CA' || goog.LOCALE == 'en-CA') {862goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;863}864if (goog.LOCALE == 'en_GB' || goog.LOCALE == 'en-GB') {865goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;866}867if (goog.LOCALE == 'en_IE' || goog.LOCALE == 'en-IE') {868goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;869}870if (goog.LOCALE == 'en_IN' || goog.LOCALE == 'en-IN') {871goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;872}873if (goog.LOCALE == 'en_SG' || goog.LOCALE == 'en-SG') {874goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;875}876if (goog.LOCALE == 'en_US' || goog.LOCALE == 'en-US') {877goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;878}879if (goog.LOCALE == 'en_ZA' || goog.LOCALE == 'en-ZA') {880goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;881}882if (goog.LOCALE == 'es') {883goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;884}885if (goog.LOCALE == 'es_419' || goog.LOCALE == 'es-419') {886goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;887}888if (goog.LOCALE == 'es_ES' || goog.LOCALE == 'es-ES') {889goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;890}891if (goog.LOCALE == 'es_MX' || goog.LOCALE == 'es-MX') {892goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;893}894if (goog.LOCALE == 'es_US' || goog.LOCALE == 'es-US') {895goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;896}897if (goog.LOCALE == 'et') {898goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;899}900if (goog.LOCALE == 'eu') {901goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;902}903if (goog.LOCALE == 'fa') {904goog.i18n.pluralRules.select = goog.i18n.pluralRules.hiSelect_;905}906if (goog.LOCALE == 'fi') {907goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;908}909if (goog.LOCALE == 'fil') {910goog.i18n.pluralRules.select = goog.i18n.pluralRules.filSelect_;911}912if (goog.LOCALE == 'fr') {913goog.i18n.pluralRules.select = goog.i18n.pluralRules.frSelect_;914}915if (goog.LOCALE == 'fr_CA' || goog.LOCALE == 'fr-CA') {916goog.i18n.pluralRules.select = goog.i18n.pluralRules.frSelect_;917}918if (goog.LOCALE == 'ga') {919goog.i18n.pluralRules.select = goog.i18n.pluralRules.gaSelect_;920}921if (goog.LOCALE == 'gl') {922goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;923}924if (goog.LOCALE == 'gsw') {925goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;926}927if (goog.LOCALE == 'gu') {928goog.i18n.pluralRules.select = goog.i18n.pluralRules.hiSelect_;929}930if (goog.LOCALE == 'haw') {931goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;932}933if (goog.LOCALE == 'he') {934goog.i18n.pluralRules.select = goog.i18n.pluralRules.heSelect_;935}936if (goog.LOCALE == 'hi') {937goog.i18n.pluralRules.select = goog.i18n.pluralRules.hiSelect_;938}939if (goog.LOCALE == 'hr') {940goog.i18n.pluralRules.select = goog.i18n.pluralRules.srSelect_;941}942if (goog.LOCALE == 'hu') {943goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;944}945if (goog.LOCALE == 'hy') {946goog.i18n.pluralRules.select = goog.i18n.pluralRules.frSelect_;947}948if (goog.LOCALE == 'id') {949goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;950}951if (goog.LOCALE == 'in') {952goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;953}954if (goog.LOCALE == 'is') {955goog.i18n.pluralRules.select = goog.i18n.pluralRules.isSelect_;956}957if (goog.LOCALE == 'it') {958goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;959}960if (goog.LOCALE == 'iw') {961goog.i18n.pluralRules.select = goog.i18n.pluralRules.heSelect_;962}963if (goog.LOCALE == 'ja') {964goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;965}966if (goog.LOCALE == 'ka') {967goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;968}969if (goog.LOCALE == 'kk') {970goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;971}972if (goog.LOCALE == 'km') {973goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;974}975if (goog.LOCALE == 'kn') {976goog.i18n.pluralRules.select = goog.i18n.pluralRules.hiSelect_;977}978if (goog.LOCALE == 'ko') {979goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;980}981if (goog.LOCALE == 'ky') {982goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;983}984if (goog.LOCALE == 'ln') {985goog.i18n.pluralRules.select = goog.i18n.pluralRules.akSelect_;986}987if (goog.LOCALE == 'lo') {988goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;989}990if (goog.LOCALE == 'lt') {991goog.i18n.pluralRules.select = goog.i18n.pluralRules.ltSelect_;992}993if (goog.LOCALE == 'lv') {994goog.i18n.pluralRules.select = goog.i18n.pluralRules.lvSelect_;995}996if (goog.LOCALE == 'mk') {997goog.i18n.pluralRules.select = goog.i18n.pluralRules.mkSelect_;998}999if (goog.LOCALE == 'ml') {1000goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;1001}1002if (goog.LOCALE == 'mn') {1003goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;1004}1005if (goog.LOCALE == 'mo') {1006goog.i18n.pluralRules.select = goog.i18n.pluralRules.roSelect_;1007}1008if (goog.LOCALE == 'mr') {1009goog.i18n.pluralRules.select = goog.i18n.pluralRules.hiSelect_;1010}1011if (goog.LOCALE == 'ms') {1012goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;1013}1014if (goog.LOCALE == 'mt') {1015goog.i18n.pluralRules.select = goog.i18n.pluralRules.mtSelect_;1016}1017if (goog.LOCALE == 'my') {1018goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;1019}1020if (goog.LOCALE == 'nb') {1021goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;1022}1023if (goog.LOCALE == 'ne') {1024goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;1025}1026if (goog.LOCALE == 'nl') {1027goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;1028}1029if (goog.LOCALE == 'no') {1030goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;1031}1032if (goog.LOCALE == 'no_NO' || goog.LOCALE == 'no-NO') {1033goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;1034}1035if (goog.LOCALE == 'or') {1036goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;1037}1038if (goog.LOCALE == 'pa') {1039goog.i18n.pluralRules.select = goog.i18n.pluralRules.akSelect_;1040}1041if (goog.LOCALE == 'pl') {1042goog.i18n.pluralRules.select = goog.i18n.pluralRules.plSelect_;1043}1044if (goog.LOCALE == 'pt') {1045goog.i18n.pluralRules.select = goog.i18n.pluralRules.ptSelect_;1046}1047if (goog.LOCALE == 'pt_BR' || goog.LOCALE == 'pt-BR') {1048goog.i18n.pluralRules.select = goog.i18n.pluralRules.ptSelect_;1049}1050if (goog.LOCALE == 'pt_PT' || goog.LOCALE == 'pt-PT') {1051goog.i18n.pluralRules.select = goog.i18n.pluralRules.ptSelect_;1052}1053if (goog.LOCALE == 'ro') {1054goog.i18n.pluralRules.select = goog.i18n.pluralRules.roSelect_;1055}1056if (goog.LOCALE == 'ru') {1057goog.i18n.pluralRules.select = goog.i18n.pluralRules.ruSelect_;1058}1059if (goog.LOCALE == 'sh') {1060goog.i18n.pluralRules.select = goog.i18n.pluralRules.srSelect_;1061}1062if (goog.LOCALE == 'si') {1063goog.i18n.pluralRules.select = goog.i18n.pluralRules.siSelect_;1064}1065if (goog.LOCALE == 'sk') {1066goog.i18n.pluralRules.select = goog.i18n.pluralRules.csSelect_;1067}1068if (goog.LOCALE == 'sl') {1069goog.i18n.pluralRules.select = goog.i18n.pluralRules.slSelect_;1070}1071if (goog.LOCALE == 'sq') {1072goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;1073}1074if (goog.LOCALE == 'sr') {1075goog.i18n.pluralRules.select = goog.i18n.pluralRules.srSelect_;1076}1077if (goog.LOCALE == 'sr_Latn' || goog.LOCALE == 'sr-Latn') {1078goog.i18n.pluralRules.select = goog.i18n.pluralRules.srSelect_;1079}1080if (goog.LOCALE == 'sv') {1081goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;1082}1083if (goog.LOCALE == 'sw') {1084goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;1085}1086if (goog.LOCALE == 'ta') {1087goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;1088}1089if (goog.LOCALE == 'te') {1090goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;1091}1092if (goog.LOCALE == 'th') {1093goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;1094}1095if (goog.LOCALE == 'tl') {1096goog.i18n.pluralRules.select = goog.i18n.pluralRules.filSelect_;1097}1098if (goog.LOCALE == 'tr') {1099goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;1100}1101if (goog.LOCALE == 'uk') {1102goog.i18n.pluralRules.select = goog.i18n.pluralRules.ruSelect_;1103}1104if (goog.LOCALE == 'ur') {1105goog.i18n.pluralRules.select = goog.i18n.pluralRules.enSelect_;1106}1107if (goog.LOCALE == 'uz') {1108goog.i18n.pluralRules.select = goog.i18n.pluralRules.esSelect_;1109}1110if (goog.LOCALE == 'vi') {1111goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;1112}1113if (goog.LOCALE == 'zh') {1114goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;1115}1116if (goog.LOCALE == 'zh_CN' || goog.LOCALE == 'zh-CN') {1117goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;1118}1119if (goog.LOCALE == 'zh_HK' || goog.LOCALE == 'zh-HK') {1120goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;1121}1122if (goog.LOCALE == 'zh_TW' || goog.LOCALE == 'zh-TW') {1123goog.i18n.pluralRules.select = goog.i18n.pluralRules.defaultSelect_;1124}1125if (goog.LOCALE == 'zu') {1126goog.i18n.pluralRules.select = goog.i18n.pluralRules.hiSelect_;1127}112811291130