403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/django/utils/translation/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/django/utils/translation/__pycache__/__init__.cpython-311.pyc
�

�|�ez*����dZddlZddlmZddlmZmZddlmZm	Z	ddl
mZddlm
Z
ddlmZgd	�Zd
ZGd�de��ZGd
�d��Ze��Z[d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Ze
ee��Ze
ee��Z d�Z!d1d�Z"d�Z#d1d�Z$d1d�Z%d1d�Z&d�Z'd�Z(Gd�d e��Z)d!�Z*d"�Z+d#�Z,d$�Z-d%�Z.d2d'�Z/d(�Z0d&d)�d*�Z1d+�Z2d,�Z3d-�Z4ed.��Z5d/�Z6d0�Z7dS)3z
Internationalization support.
�N)�ContextDecorator)�ROUND_UP�Decimal)�autoreload_started�file_changed)�RemovedInDjango40Warning)�lazy)�_lazy_re_compile)�activate�
deactivate�override�deactivate_all�get_language�get_language_from_request�get_language_info�get_language_bidi�check_for_language�to_language�	to_locale�
templatize�gettext�gettext_lazy�gettext_noop�ugettext�
ugettext_lazy�
ugettext_noop�ngettext�
ngettext_lazy�	ungettext�ungettext_lazy�pgettext�
pgettext_lazy�	npgettext�npgettext_lazy�LANGUAGE_SESSION_KEY�	_languagec��eZdZdS)�TranslatorCommentWarningN)�__name__�
__module__�__qualname__���C/usr/lib/python3/dist-packages/django/utils/translation/__init__.pyr(r(s�������Dr-r(c��eZdZdZd�ZdS)�Transa
    The purpose of this class is to store the actual translation function upon
    receiving the first call to that function. After this is done, changes to
    USE_I18N will have no effect to which function is served upon request. If
    your tests rely on changing USE_I18N, you can delete all the functions
    from _trans.__dict__.

    Note that storing the function with setattr will have a noticeable
    performance effect, as access to the function goes the normal path,
    instead of using __getattr__.
    c��ddlm}|jr;ddlm}ddlm}m}tj	|d���tj	|d���nddlm}t||t||����t||��S)Nr)�settings)�
trans_real)�translation_file_changed�watch_for_translation_changesr4)�dispatch_uid)�
trans_null)�django.confr2�USE_I18N�django.utils.translationr3�!django.utils.translation.reloaderr4r5r�connectrr7�setattr�getattr)�self�	real_namer2�transr4r5s      r.�__getattr__zTrans.__getattr__7s���(�(�(�(�(�(���	E�D�D�D�D�D�D�
�
�
�
�
�
�
�
�
�&�'D�Sm�n�n�n�n�� �!9�Hb�c�c�c�c�c�D�D�D�D�D�D���i���	�!:�!:�;�;�;��u�i�(�(�(r-N)r)r*r+�__doc__rBr,r-r.r0r0*s-������
�
�)�)�)�)�)r-r0c�6�t�|��S�N)�_transr��messages r.rrLs�����w�'�'�'r-c�X�tjdtd���t|��S)zx
    A legacy compatibility wrapper for Unicode handling on Python 2.
    Alias of gettext_noop() since Django 2.0.
    zkdjango.utils.translation.ugettext_noop() is deprecated in favor of django.utils.translation.gettext_noop().���
stacklevel)�warnings�warnrrrGs r.rrP�7��

�M�	3� �Q�����
�� � � r-c�6�t�|��SrE)rFrrGs r.rr]s���>�>�'�"�"�"r-c�X�tjdtd���t|��S)zs
    A legacy compatibility wrapper for Unicode handling on Python 2.
    Alias of gettext() since Django 2.0.
    zadjango.utils.translation.ugettext() is deprecated in favor of django.utils.translation.gettext().rJrK)rMrNrrrGs r.rras7��

�M�	.� �Q�����
�7���r-c�:�t�|||��SrE)rFr��singular�plural�numbers   r.rrns���?�?�8�V�V�4�4�4r-c�\�tjdtd���t|||��S)zt
    A legacy compatibility wrapper for Unicode handling on Python 2.
    Alias of ngettext() since Django 2.0.
    zcdjango.utils.translation.ungettext() is deprecated in favor of django.utils.translation.ngettext().rJrK)rMrNrrrSs   r.rrrs;��

�M�	/� �Q�����
�H�f�f�-�-�-r-c�8�t�||��SrE)rFr!)�contextrHs  r.r!r!s���?�?�7�G�,�,�,r-c�<�t�||||��SrE)rFr#�rYrTrUrVs    r.r#r#�s�����G�X�v�v�>�>�>r-c�X�tjdtd���t|��S)z
    A legacy compatibility wrapper for Unicode handling on Python 2. Has been
    Alias of gettext_lazy since Django 2.0.
    zkdjango.utils.translation.ugettext_lazy() is deprecated in favor of django.utils.translation.gettext_lazy().rJrK)rMrNrrrGs r.rr�rOr-c��������t�t��r��d<t����di���}nL�����G���fd�d����t�fd����di���}����fd�|_|S)NrVc�D��eZdZ�fd�Z�fd�Z��fd�Z�fd�Z�fd�ZdS)�&lazy_number.<locals>.NumberAwareStringc�.��t�d��S)NrT)�bool)r?�kwargss �r.�__bool__z/lazy_number.<locals>.NumberAwareString.__bool__�s����F�:�.�/�/�/r-c�V��	|�S#t$rtd�z���wxYw)Nz|Your dictionary lacks key '%s'. Please provide it, because it is required to determine whether string is singular or plural.)�KeyError)r?�valuesrVs  �r.�_get_number_valuez8lazy_number.<locals>.NumberAwareString._get_number_value�sM����!�&�>�)������"�8�:@�A�������s��(c���|�d<�di���S)NrVr,r,)r?�number_value�funcrbs  ��r.�
_translatez1lazy_number.<locals>.NumberAwareString._translate�s���#/��x� ��t�~�~�f�~�~�%r-c���|r�r|�|��n|d}|�|��j|i|��S)Nr)rgrk�format)r?�argsrbrirVs    �r.rmz-lazy_number.<locals>.NumberAwareString.format�sP���AG�_�F�_�t�5�5�f�=�=�=�X\�]^�X_��;�t���|�4�4�;�T�L�V�L�L�Lr-c���t|t��r�r|�|��}n|}|�|��}	||z}n#t$rYnwxYw|SrE)�
isinstance�dictrgrk�	TypeError)r?�rhsri�
translatedrVs    �r.�__mod__z.lazy_number.<locals>.NumberAwareString.__mod__�s�����c�4�(�(�'�V�'�#'�#9�#9�#�#>�#>�L�L�#&�L�!�_�_�\�:�:�
��!+�c�!1�J�J�� �����D�����"�!s�A
�
A�AN)r)r*r+rcrgrkrmru)rjrbrVs���r.�NumberAwareStringr_�s��������
0�
0�
0�
0�
0�
�
�
�
�
�
&�
&�
&�
&�
&�
&�
M�
M�
M�
M�
M�
"�
"�
"�
"�
"�
"�
"r-rvc������SrEr,)rbrvs �r.�<lambda>zlazy_number.<locals>.<lambda>�s���&7�&7�&9�&9�r-c���t����ffSrE)�_lazy_number_unpickle)rjrV�original_kwargs�resultclasss����r.rxzlazy_number.<locals>.<lambda>�s���$9�D�+�v�Wf�;g�#h�r-r,)rp�intr	�copy�
__reduce__)rjr|rVrb�proxyrvr{s```` @@r.�lazy_numberr��s����������&�#���*i�!��x��'��T�;�'�'�1�1�&�1�1��� �+�+�-�-��!	"�!	"�!	"�!	"�!	"�!	"�!	"�!	"�!	"��!	"�!	"�!	"�FN��9�9�9�9�;L�M�M�W�W�PV�W�W��h�h�h�h�h�h�h����Lr-c�"�t||fd|i|��S)NrV)r�)rjr|rVrbs    r.rzrz�s���t�[�B�B��B�6�B�B�Br-c�>�ttt|||���S)NrS)r�r�strrSs   r.rr�s���x��x��v�V�V�V�Vr-c�\�tjdtd���t|||��S)z}
    A legacy compatibility wrapper for Unicode handling on Python 2.
    An alias of ungettext_lazy() since Django 2.0.
    zmdjango.utils.translation.ungettext_lazy() is deprecated in favor of django.utils.translation.ngettext_lazy().rJrK)rMrNrrrSs   r.r r �s;��

�M�	4� �Q�����
��6�6�2�2�2r-c�@�ttt||||���S)Nr[)r�r#r�r[s    r.r$r$�s���y�#�w��RX�ag�h�h�h�hr-c�6�t�|��SrE)rFr)�languages r.rr�s���?�?�8�$�$�$r-c�4�t���SrE)rFrr,r-r.rr�s�������r-c�"�eZdZdd�Zd�Zd�ZdS)r
Fc�"�||_||_dSrE)r�r)r?r�rs   r.�__init__zoverride.__init__�s�� ��
�$����r-c��t��|_|j�t|j��dSt	��dSrE)r�old_languager�rr)r?s r.�	__enter__zoverride.__enter__�s>��(�N�N����=�$��T�]�#�#�#�#�#������r-c��|j�t��dS|jrt��dSt|j��dSrE)r�rrr)r?�exc_type�	exc_value�	tracebacks    r.�__exit__zoverride.__exit__�sK����$�������
�_�	(��L�L�L�L�L��T�&�'�'�'�'�'r-N�F)r)r*r+r�r�r�r,r-r.r
r
�sF������%�%�%�%����(�(�(�(�(r-r
c�4�t���SrE)rFrr,r-r.rr�s����� � � r-c�4�t���SrE)rFrr,r-r.rrs���#�#�%�%�%r-c�6�t�|��SrE)rFr)�	lang_codes r.rrs���$�$�Y�/�/�/r-c���|�d��}|dkr?|d|����dz||dzd����zS|���S)z8Turn a locale name (en_US) into a language name (en-us).�_rN�-�)�find�lower)�locale�ps  r.rr	sf�����C���A��A�v�v��b�q�b�z���!�!�C�'�&��Q����.�*>�*>�*@�*@�@�@��|�|�~�~�r-c�,�|����d��\}}}|s|S|�d��\}}}t|��dkr|���n|���}|r|d|zz
}|dz|zS)z8Turn a language name (en-us) into a locale name (en_US).r�rJr�)r��	partition�len�title�upper)r�r��country�tails    r.rrs���#�>�>�+�+�5�5�c�:�:��H�a������
�(�(��-�-��G�Q��!$�W����!1�!1�g�m�m�o�o�o�w�}�}���G����3��:����c�>�G�#�#r-Fc�8�t�||��SrE)rFr)�request�
check_paths  r.rr"s���+�+�G�Z�@�@�@r-c�6�t�|��SrE)rF�get_language_from_path)�paths r.r�r�&s���(�(��.�.�.r-)�strictc�8�t�||��SrE)rF�get_supported_language_variant)r�r�s  r.r�r�*s���0�0��F�C�C�Cr-c� �ddlm}||fi|��S)Nr�)r)�templater)�srcrbrs   r.rr.s,��$�$�$�$�$�$��:�c�$�$�V�$�$�$r-c�4�t���SrE)rFrr,r-r.rr3s��� � �"�"�"r-c	��ddlm}	||}d|vr d|vrt|dd��}n|}no#t$rbd|vrtd|z���|�d��d}	||}n$#t$rtd|�d|�d	����wxYwYnwxYw|rt|d��|d
<|S)Nr)�	LANG_INFO�fallback�namer�zUnknown language code %s.zUnknown language code z and �.�name_translated)�django.conf.localer�rre�splitr)r�r��	lang_info�info�generic_lang_codes     r.rr7s,��,�,�,�,�,�,�
`��i�(�	���"�"�v�Y�'>�'>�$�Y�z�%:�1�%=�>�>�D�D��D����`�`�`��i����6��B�C�C�C�%�O�O�C�0�0��3��	`��.�/�D�D���	`�	`�	`��(����L]�L]�L]�^�_�_�_�	`����
�D�`�����=�".�t�F�|�"<�"<��
���Ks'�.7�;B#�3A<�;B#�<!B�B#�"B#z\s*\n\s*c�\�t�d|�����S)N� )�trim_whitespace_re�sub�strip)�ss r.�trim_whitespacer�Ps ���!�!�#�q�w�w�y�y�1�1�1r-c��tt|dz
���td��t�����dzS)Nr��0)�rounding)r}r�quantizer)�values r.�round_away_from_oner�Ts:���w�u�q�y�!�!�*�*�7�3�<�<�(�*�K�K�L�L�q�P�Pr-rEr�)8rCrM�
contextlibr�decimalrr�django.utils.autoreloadrr�django.utils.deprecationr�django.utils.functionalr	�django.utils.regex_helperr
�__all__r%�
SyntaxWarningr(r0rFrrrrrrr!r#r�rr"rr�rzrr r$rrr
rrrrrrr�r�rrrr�r�r�r,r-r.�<module>r�sp��������'�'�'�'�'�'�%�%�%�%�%�%�%�%�D�D�D�D�D�D�D�D�=�=�=�=�=�=�(�(�(�(�(�(�6�6�6�6�6�6�����#��	�	�	�	�	�}�	�	�	�)�)�)�)�)�)�)�)�8
�����
�(�(�(�
!�
!�
!�#�#�#�
�
�
�5�5�5�
.�
.�
.�-�-�-�?�?�?��t�G�S�!�!����X�s�#�#�
�
!�
!�
!�,�,�,�,�^C�C�C�W�W�W�W�
3�
3�
3�
3�i�i�i�i�%�%�%����(�(�(�(�(��(�(�(�*!�!�!�&�&�&�0�0�0����
$�
$�
$� A�A�A�A�/�/�/�9>�D�D�D�D�D�%�%�%�
#�#�#����,&�%�k�2�2��2�2�2�Q�Q�Q�Q�Qr-

Youez - 2016 - github.com/yon3zu
LinuXploit