From: benselme Date: Thu, 8 Jan 2015 19:49:14 +0000 (-0500) Subject: Add link to rules spec in PluralRule doc X-Git-Tag: dev-2a51c9b95d06~51^2~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b892e1941848db601fb699692a34736774bf5b63;p=thirdparty%2Fbabel.git Add link to rules spec in PluralRule doc --- diff --git a/babel/plural.py b/babel/plural.py index 144a0dc0..91147575 100644 --- a/babel/plural.py +++ b/babel/plural.py @@ -18,7 +18,7 @@ _fallback_tag = 'other' class PluralRule(object): """Represents a set of language pluralization rules. The constructor - accepts a list of (tag, expr) tuples or a dict of CLDR rules. The + accepts a list of (tag, expr) tuples or a dict of `CLDR rules`_. The resulting object is callable and accepts one parameter with a positive or negative number (both integer and float) for the number that indicates the plural form for a string and returns the tag for the format: @@ -33,6 +33,8 @@ class PluralRule(object): other where other is an implicit default. Rules should be mutually exclusive; for a given numeric value, only one rule should apply (i.e. the condition should only be true for one of the plural rule elements. + + .. _`CLDR rules`: http://www.unicode.org/reports/tr35/tr35-33/tr35-numbers.html#Language_Plural_Rules """ __slots__ = ('abstract', '_func')