Hacked By AnonymousFox

Current Path : /opt/alt/python36/lib64/python3.6/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/__pycache__/gettext.cpython-36.opt-2.pyc

3

��2aT�@s�ddlZddlZddlZddlZddlZddlZddlZddlmZddddddd	d
ddd
ddddddgZ	ej
jejdd�Z
ejdejejB�Zdd�Zdd�ZdOZd(d)�eed*�D�Zd+d,d-d.�ZdQd/d0�Zd1d2�Zd3d4�Zd5d6�ZGd7d�d�ZGd8d�de�ZdRd:d�ZiZdSd;d�ZdTd<d�Z ia!ia"d=a#dUd>d	�Z$dVd?d
�Z%dWd@d�Z&dAd�Z'dBd�Z(dCd
�Z)dDd�Z*dEd�Z+dFd�Z,dGd�Z-dHd�Z.eZ/dS)X�N)�ENOENT�NullTranslations�GNUTranslations�Catalog�find�translation�install�
textdomain�bindtextdomain�bind_textdomain_codeset�dgettext�	dngettext�gettext�lgettext�	ldgettext�
ldngettext�	lngettext�ngettextZshare�localea�
        (?P<WHITESPACES>[ \t]+)                    | # spaces and horizontal tabs
        (?P<NUMBER>[0-9]+\b)                       | # decimal integer
        (?P<NAME>n\b)                              | # only n is allowed
        (?P<PARENTHESIS>[()])                      |
        (?P<OPERATOR>[-*/%+?:]|[><!]=?|==|&&|\|\|) | # !, *, /, %, +, -, <, >,
                                                     # <=, >=, ==, !=, &&, ||,
                                                     # ? :
                                                     # unary and bitwise ops
                                                     # not allowed
        (?P<INVALID>\w+|.)                           # invalid token
    ccsTxHtjt|�D]8}|j}|dkr"q|j|�}|dkr@td|��|VqWdVdS)N�WHITESPACES�INVALIDz invalid token in plural form: %s�)�re�finditer�_token_pattern�	lastgroup�group�
ValueError)�plural�mo�kind�value�r"�,/opt/alt/python36/lib64/python3.6/gettext.py�	_tokenizeTs

r$cCs|rtd|�Std�SdS)Nz#unexpected token in plural form: %szunexpected end of plural form)r)r!r"r"r#�_error_sr%�||�&&�==�!=�<�>�<=�>=�+�-�*�/�%cCs i|]\}}|D]
}||�qqSr"r")�.0�iZops�opr"r"r#�
<dictcomp>msr6��or�andz//)z||z&&r1cCs�d}t|�}x|dkr(|d7}t|�}qW|dkr\t|�\}}d||f}|dkr�td��nP|dkrrd	||f}n:yt|d
�}Wntk
r�t|�d�YnXd||f}t|�}d}xh|tk�r t|}||kr�P|dkr�|dkr�d|}tj||�}t||d�\}	}d|||	f}|}q�W||k�o6dkn�rFd|}|dk�r�|dk�r�t|d�\}
}|dk�rzt|��t|�\}}d|
||f}|dk�r�d|}||fS)Nr�!znot �(z%s(%s)�)z%unbalanced parenthesis in plural form�nz%s%s�
z%s%d�d��z(%s)r7z%s %s %s�?r�:z%s if %s else %s)r@rA)r@rA)�next�_parser�intr%�_binary_ops�	_c2py_ops�get)�tokens�priority�result�nexttok�subr!�jr4r5�right�if_true�if_falser"r"r#rEpsP



rEcCs:yt|�}Wn(tk
r4td|jjf�d�YnX|S)Nz'Plural value must be an integer, got %s)�round�	TypeError�	__class__�__name__)r=r4r"r"r#�_as_int�srWcCs�t|�dkrtd��y~tt|��\}}|r2t|��d}x>|D]6}|dkrb|d7}|dkrrtd��q<|dkr<|d8}q<Wd	ti}td
||�|dStk
r�td��YnXdS)Ni�z"plural form expression is too longrr;r7�z%plural form expression is too complexr<rWz�if True:
            def func(n):
                if not isinstance(n, int):
                    n = _as_int(n)
                return int(%s)
            �func)�lenrrEr$r%rW�exec�RecursionError)rrLrM�depth�c�nsr"r"r#�c2py�s(

r`c
Cs:tj|�}d}d	}d
}d}|jd�}|dkrN||d�}|d|�}||O}nd}|jd�}|dkr�||d�}|d|�}||O}nd}|jd�}|dkr�||d�}|d|�}||O}nd}|}	g}
xbt|d�D]R}||@s�|	}||@�r�||7}||@�r||7}||@�r ||7}|
j|�q�W|
j�|
S)Nr7r��@r�.�_r7rarA)r�	normalizer�range�append�reverse)
�loc�COMPONENT_CODESET�COMPONENT_TERRITORY�COMPONENT_MODIFIER�mask�pos�modifier�codeset�	territory�language�retr4�valr"r"r#�_expand_lang�sJ










ruc@speZdZddd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
ddd�ZdS)rNcCs.i|_d|_d|_d|_|dk	r*|j|�dS)N)�_info�_charset�_output_charset�	_fallbackrE)�self�fpr"r"r#�__init__�szNullTranslations.__init__cCsdS)Nr")rzr{r"r"r#rEszNullTranslations._parsecCs|jr|jj|�n||_dS)N)ry�add_fallback)rz�fallbackr"r"r#r}szNullTranslations.add_fallbackcCs|jr|jj|�S|S)N)ryr)rz�messager"r"r#r	szNullTranslations.gettextcCs2|jr|jj|�S|jr$|j|j�S|jtj��S)N)ryrrx�encoder�getpreferredencoding)rzrr"r"r#rs
zNullTranslations.lgettextcCs*|jr|jj|||�S|dkr"|S|SdS)Nr7)ryr)rz�msgid1�msgid2r=r"r"r#rs
zNullTranslations.ngettextcCsH|jr|jj|||�S|dkr$|}n|}|jr:|j|j�S|jtj��S)Nr7)ryrrxr�rr�)rzr�r�r=�tmsgr"r"r#rszNullTranslations.lngettextcCs|jS)N)rv)rzr"r"r#�info(szNullTranslations.infocCs|jS)N)rw)rzr"r"r#�charset+szNullTranslations.charsetcCs|jS)N)rx)rzr"r"r#�output_charset.szNullTranslations.output_charsetcCs
||_dS)N)rx)rzr�r"r"r#�set_output_charset1sz#NullTranslations.set_output_charsetcCsvddl}|j|jd<t|d�rrd|kr6|jd|jd<d|krJ|j|jd<d|kr^|j|jd<d|krr|j|jd<dS)Nrrd�__contains__rrrr)�builtinsr�__dict__�hasattrrrr)rz�namesr�r"r"r#r4s
zNullTranslations.install)N)N)rV�
__module__�__qualname__r|rEr}rrrrr�r�r�r�rr"r"r"r#r�s
c@sHeZdZdZdZdZdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�ZdS)rl�*l�$<rr7cCs|d?|d@fS)N�i��r")rz�versionr"r"r#�
_get_versionsJszGNUTranslations._get_versionsc"Cs�tj}t|dd�}i|_}dd�|_|j�}t|�}|d|dd��d}||jkrv|d|dd	��\}}	}
}d
}n6||jkr�|d|dd	��\}}	}
}d}nt	dd
|��|j
|�\}
}|
|jkr�t	ddt|
�|���xt
d|	�D�]�}||||
|
d��\}}||}|||||d��\}}||}||k�r^||k�r^|||�}|||�}nt	dd|��|dk�rRd}x�|jd�D]�}|j�j�}|�s��q�d}}d|k�r�|jdd�\}}|j�j�}|j�}||j|<|}n|�r|j|d|7<|dk�r|jd�d|_n0|dk�r�|jd�}|djd�d}t|�|_�q�W|j�p\d}d|k�r�|jd�\}} |jd�}t||�}x>t|�D]\}}!t|!|�|||f<�q�Wnt||�|t||�<|
d7}
|d7}q�WdS)N�namercSst|dk�S)Nr7)rF)r=r"r"r#�<lambda>Usz(GNUTranslations._parse.<locals>.<lambda>z<IrArz<4IrXz<IIz>4Iz>IIzBad magic numberzBad version number �zFile is corrupt�
rCr7�
zcontent-typezcharset=zplural-forms�;zplural=�ascii�)�struct�unpack�getattr�_catalogr�readrZ�LE_MAGIC�BE_MAGIC�OSErrorr��VERSIONS�strrf�split�decode�strip�lowerrvrwr`�	enumerate)"rzr{r��filename�catalog�buf�buflen�magicr��msgcount�	masteridx�transidx�ii�
major_version�
minor_versionr4�mlen�moff�mend�tlen�toff�tend�msgr��lastk�b_item�item�k�vrr�r�r��xr"r"r#rENsr














zGNUTranslations._parsecCsRt�}|jj||�}||kr2|jr.|jj|�S|}|jrD|j|j�S|jtj��S)N)	�objectr�rIryrrxr�rr�)rzr�missingr�r"r"r#r�szGNUTranslations.lgettextcCsvy|j||j|�f}Wn<tk
rT|jr>|jj|||�S|dkrL|}n|}YnX|jrh|j|j�S|jtj��S)Nr7)	r�r�KeyErrorryrrxr�rr�)rzr�r�r=r�r"r"r#r�s
zGNUTranslations.lngettextcCs6t�}|jj||�}||kr2|jr.|jj|�S|S|S)N)r�r�rIryr)rzrr�r�r"r"r#r�szGNUTranslations.gettextcCsZy|j||j|�f}Wn<tk
rT|jr>|jj|||�S|dkrL|}n|}YnX|S)Nr7)r�rr�ryr)rzr�r�r=r�r"r"r#r�s
zGNUTranslations.ngettextN)rr7)rVr�r�r�r�r�r�rErrrrr"r"r"r#rBsT	FcCs�|dkrt}|dkrTg}x(dD] }tjj|�}|r|jd�}PqWd|krT|jd�g}x0|D](}x"t|�D]}||krl|j|�qlWq^W|r�g}	nd}	xL|D]D}|dkr�Ptjj||dd|�}
tjj	|
�r�|r�|	j|
�q�|
Sq�W|	S)	N�LANGUAGE�LC_ALL�LC_MESSAGES�LANGrC�Cz%s.mo)r�r�r�r�)
�_default_localedir�os�environrIr�rgru�path�join�exists)�domain�	localedir�	languages�all�envarrt�nelangs�lang�nelangrL�mofiler"r"r#r�s8




cCs�|dkrt}t|||dd�}|s6|r*t�Sttd|��d}x�|D]|}|tjj|�f}	tj	|	�}
|
dkr�t
|d��}tj|	||��}
WdQRXtj|
�}
|r�|
j
|�|dkr�|
}q@|j|
�q@W|S)NT)r�z$No translation file found for domain�rb)rrrr�rr�r��abspath�
_translationsrI�open�
setdefault�copyr�r})r�r�r��class_r~rp�mofilesrLr��key�tr{r"r"r#r�s*



cCst||d|d�}|j|�dS)NT)r~rp)rr)r�r�rpr�r�r"r"r#rs�messagescCs|dk	r|atS)N)�_current_domain)r�r"r"r#r	'scCs|dk	r|t|<tj|t�S)N)�_localedirsrIr�)r�r�r"r"r#r
.scCs|dk	r|t|<tj|�S)N)�_localecodesetsrI)r�rpr"r"r#r5scCs@y t|tj|d�tj|�d�}Wntk
r4|SX|j|�S)N)rp)rr�rIr�r�r)r�rr�r"r"r#r<scCsRtj|�}yt|tj|d�|d�}Wn"tk
rF|j|pBtj��SX|j|�S)N)rp)	r�rIrr�r�r�rr�r)r�rrpr�r"r"r#rDs
cCsTy t|tj|d�tj|�d�}Wn$tk
rD|dkr<|S|SYnX|j|||�S)N)rpr7)rr�rIr�r�r)r�r�r�r=r�r"r"r#r
Ls
cCshtj|�}yt|tj|d�|d�}Wn4tk
rX|dkrB|}n|}|j|pTtj��SX|j|||�S)N)rpr7)	r�rIrr�r�r�rr�r)r�r�r�r=rpr�r�r"r"r#rWs
cCs
tt|�S)N)rr�)rr"r"r#rcscCs
tt|�S)N)rr�)rr"r"r#rfscCstt|||�S)N)r
r�)r�r�r=r"r"r#riscCstt|||�S)N)rr�)r�r�r=r"r"r#rls�r&�r'�r(r)�r*r+r,r-�r.r/�r0r1r2)r�r�r�r�r�r����)r�)NNF)NNNFN)NNN)N)N)N)0rr��ior�rr��sys�errnor�__all__r�r��base_prefixr��compile�VERBOSE�DOTALLrr$r%rGr�rHrErWr`rurrrr�rrr�r�r�r	r
rrrr
rrrrrrr"r"r"r#�<module>1s\8



1$*K
&






Hacked By AnonymousFox1.0, Coded By AnonymousFox