Hacked By AnonymousFox

Current Path : /opt/alt/python37/lib64/python3.7/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/__pycache__/gettext.cpython-37.opt-2.pyc

B

YI~d�U�@stddlZddlZddlZddlZdddddddd	d
ddd
dddddgZej�ejdd�Ze�	dej
ejB�Zdd�Z
dd�ZdZdd�eed�D�Zddd d!�Zd=d#d$�Zd%d&�Zd'd(�Zd)d*�ZGd+d�d�ZGd,d�de�Zd>d.d�ZiZd?d/d�Zd@d0d�Ziaiad1adAd2d�ZdBd3d	�Z dCd4d
�Z!d5d�Z"d6d�Z#d7d�Z$d8d�Z%d9d
�Z&d:d�Z'd;d�Z(d<d�Z)eZ*dS)D�N�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
    ccsTxHt�t|�D]8}|j}|dkr"q|�|�}|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/python37/lib64/python3.7/gettext.py�	_tokenizeVs

r#cCs|rtd|�Std�SdS)Nz#unexpected token in plural form: %szunexpected end of plural form)r)r r!r!r"�_errorasr$))z||)z&&)z==z!=)�<�>z<=z>=)�+�-)�*�/�%cCs i|]\}}|D]
}||�qqSr!r!)�.0�iZops�opr!r!r"�
<dictcomp>osr/��or�andz//)z||z&&r*���c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|d
kr�|d
kr�d|}t�||�}t||d�\}	}d|||	f}|}q�W||k�r:dk�rFnnd|}|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)r0z%s %s %sr;�?r�:z%s if %s else %s)�next�_parser�intr$�_binary_ops�	_c2py_ops�get)�tokens�priority�result�nexttok�subr �jr-r.�right�if_true�if_falser!r!r"r?rsP



r?cCsZyt|�}Wn(tk
r4td|jjf�d�YnXddl}|�d|jjftd�|S)Nz'Plural value must be an integer, got %srr;)�round�	TypeError�	__class__�__name__�warnings�warn�DeprecationWarning)r7r-rQr!r!r"�_as_int�s
rTcCs�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 longrr5r0�z%plural form expression is too complexr6rTz�if True:
            def func(n):
                if not isinstance(n, int):
                    n = _as_int(n)
                return int(%s)
            �func)�lenrr?r#r$rT�exec�RecursionError)rrFrG�depth�c�nsr!r!r"�c2py�s(

r]c
Cs8t�|�}d}d}d}d}|�d�}|dkrN||d�}|d|�}||O}nd}|�d�}|dkr�||d�}|d|�}||O}nd}|�d�}|dkr�||d�}|d|�}||O}nd}|}	g}
x`t|d�D]P}||@s�|	}||@r�||7}||@�r||7}||@�r||7}|
�|�q�W|
��|
S)	Nr0�r;r�@r�.�_)r�	normalizer�range�append�reverse)
�loc�COMPONENT_CODESET�COMPONENT_TERRITORY�COMPONENT_MODIFIER�mask�pos�modifier�codeset�	territory�language�retr-�valr!r!r"�_expand_lang�sJ









rrc@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*|�|�dS)N)�_info�_charset�_output_charset�	_fallbackr?)�self�fpr!r!r"�__init__�szNullTranslations.__init__cCsdS)Nr!)rwrxr!r!r"r?szNullTranslations._parsecCs|jr|j�|�n||_dS)N)rv�add_fallback)rw�fallbackr!r!r"rz	szNullTranslations.add_fallbackcCs|jr|j�|�S|S)N)rvr
)rw�messager!r!r"r
szNullTranslations.gettextcCs2|jr|j�|�S|jr$|�|j�S|�t���S)N)rvrru�encoder�getpreferredencoding)rwr|r!r!r"rs
zNullTranslations.lgettextcCs*|jr|j�|||�S|dkr"|S|SdS)Nr0)rvr)rw�msgid1�msgid2r7r!r!r"rs
zNullTranslations.ngettextcCsH|jr|j�|||�S|dkr$|}n|}|jr:|�|j�S|�t���S)Nr0)rvrrur}rr~)rwrr�r7�tmsgr!r!r"r#szNullTranslations.lngettextcCs|jS)N)rs)rwr!r!r"�info.szNullTranslations.infocCs|jS)N)rt)rwr!r!r"�charset1szNullTranslations.charsetcCs|jS)N)ru)rwr!r!r"�output_charset4szNullTranslations.output_charsetcCs
||_dS)N)ru)rwr�r!r!r"�set_output_charset7sz#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)Nrra�__contains__r
rrr)�builtinsr
�__dict__�hasattrrrr)rw�namesr�r!r!r"r:s
zNullTranslations.install)N)N)rP�
__module__�__qualname__ryr?rzr
rrrr�r�r�r�rr!r!r!r"r�s
c@sHeZdZdZdZdZdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�ZdS)rl�*l�$<)rr0cCs|d?|d@fS)N�i��r!)rw�versionr!r!r"�
_get_versionsPszGNUTranslations._get_versionsc"Cs�ddlm}t|dd�}i|_}dd�|_|��}t|�}|d|dd��d}||jkr||d	|dd
��\}}	}
}d}n6||jkr�|d|dd
��\}}	}
}d
}nt	dd|��|�
|�\}
}|
|jkr�t	ddt|
�|���xt
d|	�D�]�}||||
|
d��\}}||}|||||d��\}}||}||k�rd||k�rd|||�}|||�}nt	dd|��|dk�rXd}x�|�d�D]�}|����}|�s��q�d}}d|k�r�|�dd�\}}|����}|��}||j|<|}n|�r|j|d|7<|dk�r"|�d�d|_n0|dk�r�|�d�}|d�d�d}t|�|_�q�W|j�pbd}d|k�r�|�d�\}} |�d�}t||�}x>t|�D]\}}!t|!|�|||f<�q�Wnt||�|t||�<|
d7}
|d7}q�WdS)Nr)�unpack�namercSst|dk�S)Nr0)r@)r7r!r!r"�<lambda>]�z(GNUTranslations._parse.<locals>.<lambda>z<Ir;z<4IrUz<IIz>4Iz>IIzBad magic numberzBad version number �zFile is corrupt�
r=r0�
zcontent-typezcharset=zplural-forms�;zplural=�ascii�)�structr��getattr�_catalogr�readrW�LE_MAGIC�BE_MAGIC�OSErrorr��VERSIONS�strrc�split�decode�strip�lowerrsrtr]�	enumerate)"rwrxr��filename�catalog�buf�buflen�magicr��msgcount�	masteridx�transidx�ii�
major_version�
minor_versionr-�mlen�moff�mend�tlen�toff�tend�msgr��lastk�b_item�item�k�vrr�rr��xr!r!r"r?Tsr














zGNUTranslations._parsecCsRt�}|j�||�}||kr2|jr.|j�|�S|}|jrD|�|j�S|�t���S)N)	�objectr�rCrvrrur}rr~)rwr|�missingr�r!r!r"r�szGNUTranslations.lgettextcCsvy|j||�|�f}Wn<tk
rT|jr>|j�|||�S|dkrL|}n|}YnX|jrh|�|j�S|�t���S)Nr0)	r�r�KeyErrorrvrrur}rr~)rwrr�r7r�r!r!r"r�s
zGNUTranslations.lngettextcCs6t�}|j�||�}||kr2|jr.|j�|�S|S|S)N)r�r�rCrvr
)rwr|r�r�r!r!r"r
�szGNUTranslations.gettextcCsZy|j||�|�f}Wn<tk
rT|jr>|j�|||�S|dkrL|}n|}YnX|S)Nr0)r�rr�rvr)rwrr�r7r�r!r!r"r�s
zGNUTranslations.ngettextN)rPr�r�r�r�r�r�r?rrr
rr!r!r!r"rHsV	FcCs�|dkrt}|dkrTg}x(dD] }tj�|�}|r|�d�}PqWd|krT|�d�g}x0|D](}x"t|�D]}||krl|�|�qlWq^W|r�g}	nd}	xL|D]D}|dkr�Ptj�||dd|�}
tj�	|
�r�|r�|	�|
�q�|
Sq�W|	S)N)�LANGUAGE�LC_ALL�LC_MESSAGES�LANGr=�Cr�z%s.mo)
�_default_localedir�os�environrCr�rdrr�path�join�exists)�domain�	localedir�	languages�all�envarrq�nelangs�lang�nelangrF�mofiler!r!r"r�s8




c
Cs�|dkrt}t|||dd�}|sB|r*t�Sddlm}t|d|��d}x�|D]�}	|tj�|	�f}
t	�
|
�}|dkr�t|	d��}t	�|
||��}WdQRXddl
}
|
�
|�}|r�|�|�|dkr�|}qL|�|�qLW|S)NT)r�r)�ENOENTz$No translation file found for domain�rb)rrr�errnor��FileNotFoundErrorr�r��abspath�
_translationsrC�open�
setdefault�copyr�rz)r�r�r��class_r{rm�mofilesr�rFr��key�trxr�r!r!r"rs0



cCst||d|d�}|�|�dS)NT)r{rm)rr)r�r�rmr�r�r!r!r"r&s�messagescCs|dk	r|atS)N)�_current_domain)r�r!r!r"r4scCs|dk	r|t|<t�|t�S)N)�_localedirsrCr�)r�r�r!r!r"r	;scCs|dk	r|t|<t�|�S)N)�_localecodesetsrC)r�rmr!r!r"r
BscCs@y t|t�|d�t�|�d�}Wntk
r4|SX|�|�S)N)rm)rr�rCr�r�r
)r�r|r�r!r!r"rIscCsRt�|�}yt|t�|d�|d�}Wn"tk
rF|�|pBt���SX|�|�S)N)rm)	r�rCrr�r�r}rr~r)r�r|rmr�r!r!r"rQs
cCsTy t|t�|d�t�|�d�}Wn$tk
rD|dkr<|S|SYnX|�|||�S)N)rmr0)rr�rCr�r�r)r�rr�r7r�r!r!r"rYs
cCsht�|�}yt|t�|d�|d�}Wn4tk
rX|dkrB|}n|}|�|pTt���SX|�|||�S)N)rmr0)	r�rCrr�r�r}rr~r)r�rr�r7rmr�r�r!r!r"rds
cCs
tt|�S)N)rr�)r|r!r!r"r
pscCs
tt|�S)N)rr�)r|r!r!r"rsscCstt|||�S)N)rr�)rr�r7r!r!r"rvscCstt|||�S)N)rr�)rr�r7r!r!r"rys)r3)NNF)NNNFN)NNN)N)N)N)+rr�r�sys�__all__r�r��base_prefixr��compile�VERBOSE�DOTALLrr#r$rAr�rBr?rTr]rrrrrr�rrr�r�r�rr	r
rrrrr
rrrrr!r!r!r"�<module>1sV



1$*K
&
#





Hacked By AnonymousFox1.0, Coded By AnonymousFox