ó
Mc           @   s8  d  Z  d d l m Z m Z d d l m Z e d  Z iB d^ d 6d_ d
 6d` d 6da d 6db d 6dc d 6dd d 6de d 6df d 6dg d 6dh d 6di d 6dj d 6dk d 6dl d 6dm d 6dn d 6do d  6dp d! 6dq d" 6dr d$ 6ds d% 6dt d' 6du d( 6dv d) 6dw d* 6dx d+ 6dy d, 6dz d- 6d{ d. 6d| d/ 6d} d0 6d~ d1 6d d2 6d d3 6d d4 6d d5 6d d6 6d d7 6d d9 6d d; 6d d> 6d d? 6d d@ 6d dA 6d dB 6d dC 6d dE 6d dF 6d dG 6d dI 6d dJ 6d dK 6d dM 6d dN 6d dO 6d dP 6d dQ 6d dR 6d dS 6d dT 6d dU 6d dV 6d dW 6d dX 6d dY 6Z d  Z dZ e	 f d[     YZ
 e d\  Z d] S(”   s   Plural form definitions.i’’’’(   t   default_localet   Locale(   t
   itemgettert   LC_CTYPEi   s   (n != 1)t   afi   sM   (n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n>=3 && n<=10 ? 3 : n>=11 && n<=99 ? 4 : 5)t   art   bgt   bni   t   0t   bot   cai   sR   (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)t   cst   cvi   s/   (n==1 ? 1 : n==2 ? 2 : n==3 ? 3 : n==6 ? 4 : 0)t   cyt   dat   det   dzt   elt   ent   eot   est   ett   eut   fat   fis   (n > 1)t   frt   furs   (n==1 ? 0 : n==2 ? 1 : 2)t   gat   glt   hat   het   hit   hrt   hut   hyt   ist   itt   jat   kat   kgt   kmt   kot   kut   losG   (n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2)t   lts+   (n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2)t   lvi   sQ   (n==1 ? 0 : n==0 || ( n%100>1 && n%100<11) ? 1 : (n%100>10 && n%100<20 ) ? 2 : 3)t   mtt   nbt   nlt   nnt   not   pasB   (n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)t   plt   ptt   pt_BRs8   (n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2)t   rot   rut   sks<   (n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3)t   slt   srt   stt   svt   tht   trt   ukt   vet   vit   xht   zh_CNt   zh_HKt   zh_TWt   _PluralTuplec           B   sb   e  Z d  Z d	 Z e e d  d d Z e e d  d d Z e d   d d Z d   Z	 RS(
   s    A tuple with plural information.i    t   docs.   
    The number of plurals used by the locale.i   s.   
    The plural expression used by the locale.c         C   s   d |  S(   Ns   npurals=%s; plural=%s(    (   t   x(    (    s:   /usr/lib/python2.7/site-packages/babel/messages/plurals.pyt   <lambda>Ö   s    s9   
    The plural expression used by the catalog or locale.c         C   s   |  j  S(   N(   t   plural_forms(   t   self(    (    s:   /usr/lib/python2.7/site-packages/babel/messages/plurals.pyt   __str__Ł   s    (    (
   t   __name__t
   __module__t   __doc__t	   __slots__t   propertyR   t   num_pluralst   plural_exprRK   RM   (    (    (    s:   /usr/lib/python2.7/site-packages/babel/messages/plurals.pyRG   Ī   s   			c         C   sl   t  j |   }  y t t |   } Wn< t k
 ra y t |  j } Wqb t k
 r] t } qb Xn Xt |  S(   s  A tuple with the information catalogs need to perform proper
    pluralization.  The first item of the tuple is the number of plural
    forms, the second the plural expression.

    >>> get_plural(locale='en')
    (2, '(n != 1)')
    >>> get_plural(locale='ga')
    (3, '(n==1 ? 0 : n==2 ? 1 : 2)')

    The object returned is a special tuple with additional members:

    >>> tup = get_plural("ja")
    >>> tup.num_plurals
    1
    >>> tup.plural_expr
    '0'
    >>> tup.plural_forms
    'npurals=1; plural=0'

    Converting the tuple into a string prints the plural forms for a
    gettext catalog:

    >>> str(tup)
    'npurals=1; plural=0'
    (   R   t   parset   PLURALSt   strt   KeyErrort   languaget   DEFAULT_PLURALRG   (   t   localet   tup(    (    s:   /usr/lib/python2.7/site-packages/babel/messages/plurals.pyt
   get_pluralŻ   s    N(   i   s   (n != 1)(   i   sM   (n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n>=3 && n<=10 ? 3 : n>=11 && n<=99 ? 4 : 5)(   i   s   (n != 1)(   i   s   (n != 1)(   i   R   (   i   s   (n != 1)(   i   sR   (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)(   i   R   (   i   s/   (n==1 ? 1 : n==2 ? 2 : n==3 ? 3 : n==6 ? 4 : 0)(   i   s   (n != 1)(   i   s   (n != 1)(   i   R   (   i   s   (n != 1)(   i   s   (n != 1)(   i   s   (n != 1)(   i   s   (n != 1)(   i   s   (n != 1)(   i   s   (n != 1)(   i   R   (   i   s   (n != 1)(   i   s   (n > 1)(   i   s   (n > 1)(   i   s   (n==1 ? 0 : n==2 ? 1 : 2)(   i   s   (n != 1)(   i   s   (n != 1)(   i   s   (n != 1)(   i   s   (n != 1)(   i   sR   (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)(   i   R   (   i   R   (   i   s   (n != 1)(   i   s   (n != 1)(   i   R   (   i   R   (   i   s   (n != 1)(   i   R   (   i   R   (   i   s   (n != 1)(   i   R   (   i   sG   (n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2)(   i   s+   (n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2)(   i   sQ   (n==1 ? 0 : n==0 || ( n%100>1 && n%100<11) ? 1 : (n%100>10 && n%100<20 ) ? 2 : 3)(   i   s   (n != 1)(   i   s   (n != 1)(   i   s   (n != 1)(   i   s   (n != 1)(   i   s   (n != 1)(   i   sB   (n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)(   i   s   (n != 1)(   i   s   (n > 1)(   i   s8   (n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2)(   i   sR   (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)(   i   sR   (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)(   i   s<   (n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3)(   i   sR   (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)(   i   s   (n != 1)(   i   s   (n != 1)(   i   R   (   i   R   (   i   sR   (n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)(   i   s   (n != 1)(   i   R   (   i   s   (n != 1)(   i   R   (   i   R   (   i   R   (   i   s   (n != 1)(   RP   t
   babel.coreR    R   t
   babel.utilR   R   RV   RZ   t   tupleRG   R]   (    (    (    s:   /usr/lib/python2.7/site-packages/babel/messages/plurals.pyt   <module>   s   

