KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21571/root/usr/lib64/python2.4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21571/root/usr/lib64/python2.4/gettext.pyc
m
=5Dc@sdZdkZdkZdkZdkZdkZdkZdklZddddddd	d
ddd
dgZ	ei
ieiddZ
dZdZdZdfdYZdefdYZddddZhZdddeddZdeddZhahadaddZddZddZdZdZ d Z!d!Z"d"Z#d#Z$d$Z%d%Z&eZ'dS(&sInternationalization 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.

N(sENOENTtNullTranslationstGNUTranslationstCatalogtfindttranslationtinstallt
textdomaintbindtextdomaintdgettextt	dngettexttgettexttngettexttsharetlocalecCs|o|Sn|SdS(sy
    Implements the C expression:

      condition ? true : false

    Required to correctly interpret plural forms.
    N(t	conditionttruetfalse(RRR((t/usr/lib64/python2.4/gettext.pyttest=sc
sdkl}dk}	dk}|i||i}yNg}|D]6}|d|	i	jo|ddjo||qEqE~}Wn|ij
otdnX|o
tdn|i
dd	}|i
d
d}tidid
|}tidddg}x|D]}|djo|idq.|djoPt|djo
tdni|i}|dcd|7<q.|dc|7<q.Wi|i}td|S(sGets a C expression as used in PO files for plural forms and returns a
    Python lambda function that implements an equivalent expression.
    (sStringIONiitns;plural forms expression error, maybe unbalanced parenthesiss*plural forms expression could be dangerouss&&s and s||s or s\!([^=])s not \1s(.*?)\?(.*?):(.*)cs8d|id|idi|idfS(Nstest(%s, %s, %s)iii(txtgrouptexprtsubtrepl(R(RR(RRfstt(t)s%unbalanced parenthesis in plural formis(%s)slambda n: int(%s)(tStringIOttokenttokenizetgenerate_tokenstpluraltreadlinettokenst_[1]RtNAMEtdangert
TokenErrort
ValueErrortreplacetretcompileRRRtstacktctappendtlentpoptsteval(
R R#R,R%RRR0R+R"RRRR((RRRtc2pyKs:
N
	


cCsdkl}||}dd>}	dd>}dd>}
d}|id}|djo"||}
|| }||
O}nd}
|id}|djo"||}|| }||	O}nd}|id}|djo"||}|| }||O}nd}|}g}xt
|dD]t}||@pb|}||@o||7}n||	@o||7}n||
@o||
7}n|i|q&q&W|i|S(	N(s	normalizeiiit@Rt.t_(R
t	normalizetCOMPONENT_CODESETtCOMPONENT_TERRITORYtCOMPONENT_MODIFIERtmaskRtpostmodifiertcodesett	territorytlanguagetrettrangetitvalR-treverse(R
R6R>RBR?R8R:R;R@R7R9RCR=R<((Rt_expand_langsN













cBstZddZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZedZRS(NcCsFh|_d|_d|_d|_|dj	o|i|ndS(N(tselft_infotNonet_charsett_output_charsett	_fallbacktfpt_parse(RFRL((Rt__init__s				
cCsdS(N((RFRL((RRMscCs+|io|ii|n
||_dS(N(RFRKtadd_fallbacktfallback(RFRP((RROs
cCs"|io|ii|Sn|S(N(RFRKR
tmessage(RFRQ((RR
s
cCs"|io|ii|Sn|S(N(RFRKtlgettextRQ(RFRQ((RRRs
cCsA|io|ii|||Sn|djo|Sn|SdS(Ni(RFRKRtmsgid1tmsgid2R(RFRSRTR((RRs


cCsA|io|ii|||Sn|djo|Sn|SdS(Ni(RFRKt	lngettextRSRTR(RFRSRTR((RRUs


cCs(|io|ii|Snt|S(N(RFRKtugettextRQtunicode(RFRQ((RRVs
cCsM|io|ii|||Sn|djot|Snt|SdS(Ni(RFRKt	ungettextRSRTRRW(RFRSRTR((RRXs


cCs|iS(N(RFRG(RF((RtinfoscCs|iS(N(RFRI(RF((RtcharsetscCs|iS(N(RFRJ(RF((Rtoutput_charsetscCs
||_dS(N(RZRFRJ(RFRZ((Rtset_output_charsetscCs.dk}|o
|ip|i|id<dS(NR5(t__builtin__RWRFRVR
t__dict__(RFRWR]((RRs	(t__name__t
__module__RHRNRMROR
RRRRURVRXRYRZR[R\tFalseR(((RRs												cBsStZdZdZdZdZdZdZdZdZ	d	Z
RS(
Nl*l$<cCsti}t|dd}	h|_}d|_|i	}t|}|d|d d}||ijo,|d|dd!\}}}
}d	}nO||ijo,|d
|dd!\}}}
}d}ntdd|	xtd|D]}||||
|
d
!\}}||}|||||d
!\}}||}||jo+||jo|||!}|||!}ntdd|	|djo?d}}x2|i#D] }|i%}|pqn|i&doqnd|joM|i'dd\}}|i%i)}|i%}||i*|<|}n#|o|i*|cd|7<n|djo|i'dd|_+q|djo9|i'd}|di'dd}t,||_qqWnd|jo|i'd\}}
|i'd}|i+oCt/||i+}g}|D]}|t/||i+qE~}nxnt2t|D]}|||||f<q~Wn=|i+o(t/||i+}t/||i+}n|||<|
d
7}
|d
7}qWdS(s8Override this method to support alternative .mo formats.tnameRcCst|djS(Ni(tintR(R((Rt<lambda>ss<Iiis<4Iis<IIs>4Is>IIsBad magic numberisFile is corruptt#t:is
scontent-typescharset=splural-formst;splural=tN(3tstructtunpacktgetattrRLtfilenameRFt_catalogtcatalogR treadtbufR.tbuflentmagictLE_MAGICtversiontmsgcountt	masteridxttransidxtiitBE_MAGICtIOErrortxrangeRBtmlentmofftmendttlenttoffttendtmsgttmsgRHtlastktkt
splitlinestitemtstript
startswithtsplittvtlowerRGRIR2RSRTRWR#RRA(RFRLRuRRxRRRjRSRlRTRtR~RvR R|RqRRnRRpRrRwRBRR#RRRR}R((RRMs~	
"
"
 
 












1


cCst}|ii||}||jo&|io|ii|Sn|Sn|i	o|i
|i	Sn|io|i
|iSn|S(N(tobjecttmissingRFRmtgetRQRRKR
RJtencodeRI(RFRQRR((RR
Ls	



cCst}|ii||}||jo&|io|ii|Sn|Sn|i	o|i
|i	Sn|i
tiS(N(
RRRFRmRRQRRKRRRJRR
tgetpreferredencoding(RFRQRR((RRRZs	


cCsy`|i||i|f}|io|i|iSn|io|i|iSn|SWnPt	j
oD|i
o|i
i|||Sn|djo|Sq|SnXdS(Ni(
RFRmRSR RRRJRRItKeyErrorRKRRT(RFRSRTRR((RRes



cCsyQ|i||i|f}|io|i|iSn|iti	SWnPt
j
oD|io|ii|||Sn|djo|Sq|SnXdS(Ni(RFRmRSR RRRJRR
RRRKRURT(RFRSRTRR((RRUus


cCs[t}|ii||}||jo,|io|ii|Snt	|Sn|S(N(
RRRFRmRRQRRKRVRW(RFRQRR((RRVs	

cCsy |i||i|f}Wn`tj
oT|io|ii|||Sn|djot
|}qt
|}nX|S(Ni(RFRmRSR RRRRKRXRTRW(RFRSRTRR((RRXs 

(R_R`RsRyRMR
RRRRURVRX(((RRs	S						icCsf|djo
t}n|djofg}x;dD]3}tii|}|o|i	d}Pq1q1Wd|jo|i
dqng}xC|D];}x2t
|D]$}
|
|jo|i
|
qqWqW|o
g}	nd}	xr|D]j}|djoPntii||dd|}tii|o |o|	i
|q^|SqqW|	S(	NtLANGUAGEtLC_ALLtLC_MESSAGEStLANGRftCs%s.mo(RRRR(t	localedirRHt_default_localedirt	languagestenvartostenvironRRCRR-tnelangstlangREtnelangtalltresulttpathtjointdomaintmofiletexists(RRRRRRCRRRRR((RRs@


	




cCs|djo
t}nt|||dd}	|	p(|ot	Snt
td|nd}
x|	D]}tii|}ti|}|djo%ti||t|d}nti|}|o|i|n|
djo
|}
qk|
i|qkW|
S(NRis$No translation file found for domaintrb(tclass_RHRRRRRtmofilesRPRRztENOENTRRRRtabspathtkeyt
_translationsRttt
setdefaulttopentcopyR=R\RO(RRRRRPR=RRRRR((RRs*


%

cCs,t||dtd|}|i|dS(NRPR=(RRRtTrueR=RRRW(RRRWR=R((RRstmessagescCs|dj	o
|antS(N(RRHt_current_domain(R((RRs

cCs+|dj	o|t|<nti|tS(N(RRHt_localedirsRRR(RR((RRs
cCs(|dj	o|t|<nti|S(N(R=RHt_localecodesetsRR(RR=((Rtbind_textdomain_codesets
cCsUy.t|ti|ddti|}Wntj
o|SnX|i	|S(NR=(
RRRRRHRRRzRQR
(RRQR((RRs	cCsUy.t|ti|ddti|}Wntj
o|SnX|i	|S(NR=(
RRRRRHRRRzRQRR(RRQR((Rt	ldgettexts	cCspy.t|ti|ddti|}Wn,tj
o |djo|Sq]|SnX|i|||S(NR=i(RRRRRHRRRzRRSRTR(RRSRTRR((RR	s
	cCspy.t|ti|ddti|}Wn,tj
o |djo|Sq]|SnX|i|||S(NR=i(RRRRRHRRRzRRSRTRU(RRSRTRR((Rt
ldngettexts
	cCs
tt|S(N(RRRQ(RQ((RR
*scCs
tt|S(N(RRRQ(RQ((RRR-scCstt|||S(N(R	RRSRTR(RSRTR((RR0scCstt|||S(N(RRRSRTR(RSRTR((RRU3s((t__doc__R
RRR)RitsysterrnoRt__all__RRtprefixRRR2RERRRHRRRaRRRRRRRRRRR	RR
RRRRUR(RUR
RRRiRR	RR
R)RRRRRRRRRRR2RERRRRRRRRR((Rt?s8&6
*		4	+J&								

Anon7 - 2021