AlkantarClanX12

Your IP : 3.15.203.242


Current Path : /opt/alt/python33/lib64/python3.3/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/__pycache__/gettext.cpython-33.pyc

�
��f�Pc@spdZddlZddlZddlZddlZddlZddlZddlZddlm	Z	dddddd	d
ddd
ddgZ
ejjej
dd�ZejdejejB�Zdd�Zdd�ZdNZd$d%�eed&�D�Zid'd6d(d6d)d"6ZdOd*d+�Zd,d-�Zd.d/�Zd0d1�ZGd2d�d�ZGd3d�de�ZdddPd4d�Z iZ!ddddPdd5d�Z"dddd6d	�Z#ia$ia%d7a&dd8d
�Z'dd9d�Z(dd:d;�Z)d<d�Z*d=d>�Z+d?d
�Z,d@dA�Z-dBd�Z.dCdD�Z/dEd�Z0dFdG�Z1e"Z2dS(Qu�Internationalization and localization support.

This module provides internationalization (I18N) and localization (L10N)
support for your Python programs by providing an interface to the GNU gettext
message catalog library.

I18N refers to the operation by which a program is made aware of multiple
languages.  L10N refers to the adaptation of your program, once
internationalized, to the local language and cultural habits.

iN(uENOENTuNullTranslationsuGNUTranslationsuCatalogufindutranslationuinstallu
textdomainubindtextdomainudgettextu	dngettextugettextungettextushareulocaleu�
        (?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]T}|j}|dkr4qn|j|�}|dkrbtd|��n|VqWdVdS(NuWHITESPACESuINVALIDu invalid token in plural form: %su(ureufinditeru_token_patternu	lastgroupugroupu
ValueError(upluralumoukinduvalue((u,/opt/alt/python33/lib64/python3.3/gettext.pyu	_tokenizeRs		u	_tokenizecCs"|rtd|�Std�SdS(Nu#unexpected token in plural form: %suunexpected end of plural form(u
ValueError(uvalue((u,/opt/alt/python33/lib64/python3.3/gettext.pyu_error]su_erroru||u&&u==u!=u<u>u<=u>=u+u-u*u/u%cCs,i|]"\}}|D]}||�qqS(((u.0uiuopsuop((u,/opt/alt/python33/lib64/python3.3/gettext.pyu
<dictcomp>ks	u
<dictcomp>iuoruandu//cCsQd}t|�}x&|dkr:|d7}t|�}qW|dkr�t|�\}}d||f}|dkr�td��q�nf|dkr�d	||f}nGyt|d
�}Wn!tk
r�t|�d�YnXd||f}t|�}d}x�|tkr�t|}||kr(Pn|dkrM|dkrMd|}ntj||�}t||d�\}	}d|||	f}|}qW||ko�dknr�d|}n|dkrG|dkrGt|d�\}
}|dkrt|��nt|�\}}d|
||f}|dkrGd|}qGn||fS(Nuu!unot u(u%s(%s)u)u%unbalanced parenthesis in plural formunu%s%si
u%s%didiiu(%s)iu%s %s %su?iu:u%s if %s else %s(ii(ii(	unextu_parseu
ValueErroruintu_erroruNoneu_binary_opsu	_c2py_opsuget(utokensupriorityuresultunexttokusubuvalueujuiuopurightuif_trueuif_false((u,/opt/alt/python33/lib64/python3.3/gettext.pyu_parsensP





u_parsecCsEyt|�}Wn.tk
r@td|jjf�d�YnX|S(Nu'Plural value must be an integer, got %s(uroundu	TypeErroru	__class__u__name__uNone(unui((u,/opt/alt/python33/lib64/python3.3/gettext.pyu_as_int�s
u_as_intcCst|�dkr!td��ny�tt|��\}}|rQt|��nd}x[|D]S}|dkr�|d7}|dkr�td��q�q^|dkr^|d8}q^q^Witd	6}td
||�|dSWntk
r�td��YnXdS(
u�Gets a C expression as used in PO files for plural forms and returns a
    Python function that implements an equivalent expression.
    i�u"plural form expression is too longiu(iiu%plural form expression is too complexu)u_as_intu�if True:
            def func(n):
                if not isinstance(n, int):
                    n = _as_int(n)
                return int(%s)
            ufuncN(ulenu
ValueErroru_parseu	_tokenizeu_erroru_as_intuexecuRuntimeError(upluraluresultunexttokudepthucuns((u,/opt/alt/python33/lib64/python3.3/gettext.pyuc2py�s(



uc2pyc
Cs�tj|�}d}d	}d
}d}|jd�}|dkro||d�}|d|�}||O}nd}|jd�}|dkr�||d�}|d|�}||O}nd}|jd�}|dkr||d�}|d|�}||O}nd}|}	g}
x~t|d�D]l}||@s.|	}||@r\||7}n||@rs||7}n||@r�||7}n|
j|�q.q.W|
j�|
S(Niiiu@uu.u_iii(ulocaleu	normalizeufindurangeuappendureverse(
ulocuCOMPONENT_CODESETuCOMPONENT_TERRITORYuCOMPONENT_MODIFIERumaskuposumodifierucodesetu	territoryulanguageuretuiuval((u,/opt/alt/python33/lib64/python3.3/gettext.pyu_expand_lang�sJ









u_expand_langcBs�|EeZdZddd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
dd�Zddd�ZdS(uNullTranslationscCsDi|_d|_d|_d|_|dk	r@|j|�ndS(N(u_infouNoneu_charsetu_output_charsetu	_fallbacku_parse(uselfufp((u,/opt/alt/python33/lib64/python3.3/gettext.pyu__init__�s				uNullTranslations.__init__cCsdS(N((uselfufp((u,/opt/alt/python33/lib64/python3.3/gettext.pyu_parse�suNullTranslations._parsecCs)|jr|jj|�n	||_dS(N(u	_fallbackuadd_fallback(uselfufallback((u,/opt/alt/python33/lib64/python3.3/gettext.pyuadd_fallbacks	uNullTranslations.add_fallbackcCs|jr|jj|�S|S(N(u	_fallbackugettext(uselfumessage((u,/opt/alt/python33/lib64/python3.3/gettext.pyugettexts	uNullTranslations.gettextcCs|jr|jj|�S|S(N(u	_fallbackulgettext(uselfumessage((u,/opt/alt/python33/lib64/python3.3/gettext.pyulgettexts	uNullTranslations.lgettextcCs7|jr|jj|||�S|dkr/|S|SdS(Ni(u	_fallbackungettext(uselfumsgid1umsgid2un((u,/opt/alt/python33/lib64/python3.3/gettext.pyungettexts
	uNullTranslations.ngettextcCs7|jr|jj|||�S|dkr/|S|SdS(Ni(u	_fallbacku	lngettext(uselfumsgid1umsgid2un((u,/opt/alt/python33/lib64/python3.3/gettext.pyu	lngettexts
	uNullTranslations.lngettextcCs|jS(N(u_info(uself((u,/opt/alt/python33/lib64/python3.3/gettext.pyuinfo!suNullTranslations.infocCs|jS(N(u_charset(uself((u,/opt/alt/python33/lib64/python3.3/gettext.pyucharset$suNullTranslations.charsetcCs|jS(N(u_output_charset(uself((u,/opt/alt/python33/lib64/python3.3/gettext.pyuoutput_charset'suNullTranslations.output_charsetcCs
||_dS(N(u_output_charset(uselfucharset((u,/opt/alt/python33/lib64/python3.3/gettext.pyuset_output_charset*su#NullTranslations.set_output_charsetcCs�ddl}|j|jd<t|d�r�d|krN|jd|jd<nd|krm|j|jd<nd|kr�|j|jd<nd|kr�|j|jd<q�ndS(Niu_u__contains__ugettextungettextulgettextu	lngettext(ubuiltinsugettextu__dict__uhasattrungettextulgettextu	lngettext(uselfunamesubuiltins((u,/opt/alt/python33/lib64/python3.3/gettext.pyuinstall-suNullTranslations.installN(u__name__u
__module__u__qualname__uNoneu__init__u_parseuadd_fallbackugettextulgettextungettextu	lngettextuinfoucharsetuoutput_charsetuset_output_charsetuinstall(u
__locals__((u,/opt/alt/python33/lib64/python3.3/gettext.pyuNullTranslations�scBs\|EeZdZdZdZdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
S(uGNUTranslationsl�*l�$<c Cs�tj}t|dd�}i|_}dd�|_|j�}t|�}|d|dd��d}||jkr�|d	|dd
��\}}	}
}d}nO||jkr�|d|dd
��\}}	}
}d
}nt	dd|��x�t
d|	�D]�}
||||
|
d��\}}||}|||||d��\}}||}||kr�||kr�|||�}|||�}nt	dd|��|dkr�d}}x |jdj
d��D]}|j�j�}|sq�nd|kr`|jdd�\}}|j�j�}|j�}||j|<|}n|r~|j|d|7<n|dkr�|jd�d|_q�|dkr�|jd�}|djd�d}t|�|_q�q�Wn|jp�d}d|kru|jd�\}}|jd�}t||�}xRt|�D]%\}
}t||�|||
f<qIWnt||�|t||�<|
d7}
|d7}qWdS(u8Override this method to support alternative .mo formats.unameucSst|dk�S(Ni(uint(un((u,/opt/alt/python33/lib64/python3.3/gettext.pyu<lambda>Gsu(GNUTranslations._parse.<locals>.<lambda>u<INiiu<4Iiu<IIu>4Iu>IIuBad magic numberiuFile is corruptu
uasciiu:iucontent-typeucharset=uplural-formsu;uplural=s(ustructuunpackugetattru_catalogupluralureadulenuLE_MAGICuBE_MAGICuIOErrorurangeuNoneusplituencodeudecodeustripuloweru_infou_charsetuc2pyustru	enumerate( uselfufpuunpackufilenameucatalogubufubuflenumagicuversionumsgcountu	masteridxutransidxuiiuiumlenumoffumendutlenutoffutendumsgutmsgulastkukub_itemuitemuvupluralucharsetumsgid1umsgid2ux((u,/opt/alt/python33/lib64/python3.3/gettext.pyu_parse@sj	
%	%	#
#


	
 
uGNUTranslations._parsecCsst�}|jj||�}||krG|jrC|jj|�S|S|jr`|j|j�S|jtj��S(N(	uobjectu_catalogugetu	_fallbackulgettextu_output_charsetuencodeulocaleugetpreferredencoding(uselfumessageumissingutmsg((u,/opt/alt/python33/lib64/python3.3/gettext.pyulgettext�s			uGNUTranslations.lgettextcCs�yL|j||j|�f}|jr8|j|j�S|jtj��SWnEtk
r�|jr{|jj|||�S|dkr�|S|SYnXdS(Ni(	u_catalogupluralu_output_charsetuencodeulocaleugetpreferredencodinguKeyErroru	_fallbacku	lngettext(uselfumsgid1umsgid2unutmsg((u,/opt/alt/python33/lib64/python3.3/gettext.pyu	lngettext�s	
	uGNUTranslations.lngettextcCsKt�}|jj||�}||krG|jrC|jj|�S|S|S(N(uobjectu_catalogugetu	_fallbackugettext(uselfumessageumissingutmsg((u,/opt/alt/python33/lib64/python3.3/gettext.pyugettext�s		uGNUTranslations.gettextcCssy |j||j|�f}WnLtk
rn|jrO|jj|||�S|dkrd|}n|}YnX|S(Ni(u_catalogupluraluKeyErroru	_fallbackungettext(uselfumsgid1umsgid2unutmsg((u,/opt/alt/python33/lib64/python3.3/gettext.pyungettext�s 
		uGNUTranslations.ngettextN(
u__name__u
__module__u__qualname__uLE_MAGICuBE_MAGICu_parseulgettextu	lngettextugettextungettext(u
__locals__((u,/opt/alt/python33/lib64/python3.3/gettext.pyuGNUTranslations;sM	cCsT|dkrt}n|dkr�g}x9dD]1}tjj|�}|r.|jd�}Pq.q.Wd|kr�|jd�q�ng}xA|D]9}x0t|�D]"}||kr�|j|�q�q�Wq�W|r�g}	nd}	xl|D]d}|dkr�Pntjj	||dd|�}
tjj
|
�r�|rE|	j|
�qL|
Sq�q�W|	S(	NuLANGUAGEuLC_ALLuLC_MESSAGESuLANGu:uCu%s.mo(uLANGUAGEuLC_ALLuLC_MESSAGESuLANG(uNoneu_default_localediruosuenvironugetusplituappendu_expand_langupathujoinuexists(udomainu	localediru	languagesualluenvaruvalunelangsulangunelanguresultumofile((u,/opt/alt/python33/lib64/python3.3/gettext.pyufind�s8	

	
cCs|dkrt}nt|||dd�}|sU|r@t�Sttd|��nd}x�|D]�}|tjj	|�f}	t
j|	�}
|
dkr�t|d��}t
j
|	||��}
WdQXntj|
�}
|r�|
j|�n|dkr|
}qb|j|
�qbW|S(Nuallu$No translation file found for domainurbT(uNoneuGNUTranslationsufinduTrueuNullTranslationsuIOErroruENOENTuosupathuabspathu
_translationsugetuopenu
setdefaultucopyuset_output_charsetuadd_fallback(udomainu	localediru	languagesuclass_ufallbackucodesetumofilesuresultumofileukeyutufp((u,/opt/alt/python33/lib64/python3.3/gettext.pyutranslation�s*	
!	cCs,t||ddd|�}|j|�dS(NufallbackucodesetT(utranslationuTrueuinstall(udomainu	localedirucodesetunamesut((u,/opt/alt/python33/lib64/python3.3/gettext.pyuinstallsumessagescCs|dk	r|antS(N(uNoneu_current_domain(udomain((u,/opt/alt/python33/lib64/python3.3/gettext.pyu
textdomains	cCs)|dk	r|t|<ntj|t�S(N(uNoneu_localedirsugetu_default_localedir(udomainu	localedir((u,/opt/alt/python33/lib64/python3.3/gettext.pyubindtextdomains
cCs&|dk	r|t|<ntj|�S(N(uNoneu_localecodesetsuget(udomainucodeset((u,/opt/alt/python33/lib64/python3.3/gettext.pyubind_textdomain_codeset s
ubind_textdomain_codesetcCsTy.t|tj|d�dtj|��}Wntk
rF|SYnX|j|�S(Nucodeset(utranslationu_localedirsugetuNoneu_localecodesetsuIOErrorugettext(udomainumessageut((u,/opt/alt/python33/lib64/python3.3/gettext.pyudgettext's
	cCsTy.t|tj|d�dtj|��}Wntk
rF|SYnX|j|�S(Nucodeset(utranslationu_localedirsugetuNoneu_localecodesetsuIOErrorulgettext(udomainumessageut((u,/opt/alt/python33/lib64/python3.3/gettext.pyu	ldgettext/s
	u	ldgettextcCsjy.t|tj|d�dtj|��}Wn&tk
rV|dkrN|S|SYnX|j|||�S(Nucodeseti(utranslationu_localedirsugetuNoneu_localecodesetsuIOErrorungettext(udomainumsgid1umsgid2unut((u,/opt/alt/python33/lib64/python3.3/gettext.pyu	dngettext7s
	cCsjy.t|tj|d�dtj|��}Wn&tk
rV|dkrN|S|SYnX|j|||�S(Nucodeseti(utranslationu_localedirsugetuNoneu_localecodesetsuIOErroru	lngettext(udomainumsgid1umsgid2unut((u,/opt/alt/python33/lib64/python3.3/gettext.pyu
ldngettextBs
	u
ldngettextcCs
tt|�S(N(udgettextu_current_domain(umessage((u,/opt/alt/python33/lib64/python3.3/gettext.pyugettextMscCs
tt|�S(N(u	ldgettextu_current_domain(umessage((u,/opt/alt/python33/lib64/python3.3/gettext.pyulgettextPsulgettextcCstt|||�S(N(u	dngettextu_current_domain(umsgid1umsgid2un((u,/opt/alt/python33/lib64/python3.3/gettext.pyungettextSscCstt|||�S(N(u
ldngettextu_current_domain(umsgid1umsgid2un((u,/opt/alt/python33/lib64/python3.3/gettext.pyu	lngettextVsu	lngettext(u||(u&&(u==u!=(u<u>u<=u>=(u+u-(u*u/u%((u||(u&&(u==u!=(u<u>u<=u>=(u+u-(u*u/u%i����F(3u__doc__ulocaleucopyuiouosureustructusysuerrnouENOENTu__all__upathujoinubase_prefixu_default_localedirucompileuVERBOSEuDOTALLu_token_patternu	_tokenizeu_erroru_binary_opsu	enumerateu	_c2py_opsu_parseu_as_intuc2pyu_expand_languNullTranslationsuGNUTranslationsuNoneuFalseufindu
_translationsutranslationuinstallu_localedirsu_localecodesetsu_current_domainu
textdomainubindtextdomainubind_textdomain_codesetudgettextu	ldgettextu	dngettextu
ldngettextugettextulgettextungettextu	lngettextuCatalog(((u,/opt/alt/python33/lib64/python3.3/gettext.pyu<module>sX&T	1$*F�&