Your IP : 18.226.214.1


Current Path : /opt/alt/python311/lib64/python3.11/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/__pycache__/gettext.cpython-311.pyc

�

c��fHS���dZddlZddlZddlZddlZgd�Zej�ejdd��Z	ej
dejejz��Z
d�Zd�Zd	Zd
�eed��D��Zdd
dd�Zd)d�Zd�Zd�Zd�ZGd�d��ZGd�de��Zd*d�ZiZ		d+d�Zd,dd�d�Ziadad,d�Zd,d �Z d!�Z!d"�Z"d#�Z#d$�Z$d%�Z%d&�Z&d'�Z'd(�Z(eZ)dS)-a�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.

�N)�NullTranslations�GNUTranslations�Catalog�bindtextdomain�find�translation�install�
textdomain�dgettext�	dngettext�gettext�ngettext�pgettext�	dpgettext�	npgettext�
dnpgettext�share�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
    c#��K�tjt|��D]A}|j}|dkr�|�|��}|dkrtd|z���|V��BdV�dS)N�WHITESPACES�INVALIDz invalid token in plural form: %s�)�re�finditer�_token_pattern�	lastgroup�group�
ValueError)�plural�mo�kind�values    �./opt/alt/python311/lib64/python3.11/gettext.py�	_tokenizer$Ws|�����k�.�&�1�1�����|���=� � ����������9����?�%�G�H�H�H������
�H�H�H�H�H�c�H�|rtd|z��Std��S)Nz#unexpected token in plural form: %szunexpected end of plural form)r)r"s r#�_errorr'cs-���;��?�%�G�H�H�H��9�:�:�:r%))�||)�&&)z==z!=)�<�>z<=z>=)�+�-)�*�/�%c�$�i|]
\}}|D]}||���S�r2)�.0�i�ops�ops    r#�
<dictcomp>r7rs+��K�K�K���C�s�K�K��r�1�K�K�K�Kr%��or�andz//)r(r)r/���c�B�d}t|��}|dkr|dz
}t|��}|dk�|dkr0t|��\}}|�d|�d�}|dkrtd���nD|dkr|�|��}n7	t|d��}n#t$rt	|��d�wxYwd	||fz}t|��}d
}|t
vrgt
|}||krnS|dvr	|dvrd|z}t�||��}t||d
z��\}	}|�d|�d|	��}|}|t
v�g||cxkrdkrnnd|z}|dkrU|dkrOt|d��\}
}|dkrt	|���t|��\}}|
�d|�d|��}|dkrd|z}||fS)Nr�!znot �(�)z%unbalanced parenthesis in plural form�n�
z%s%d�d)��z(%s)r8� rD�?r�:z if z else )�next�_parser�intr'�_binary_ops�	_c2py_ops�get)�tokens�priority�result�nexttok�subr"�jr4r6�right�if_true�if_falses            r#rIrIvs0��
�F��6�l�l�G�
�S�.�.��&����v�,�,���S�.�.��#�~�~��f�~�~���W�#�V�V�S�S�S�)���c�>�>��D�E�E�E��	�C���!�6�7�7�+���	,����$�$�E�E���	,�	,�	,���/�/�t�+�	,�����6�5�/�)���6�l�l�G��A�
�[�
 �
 ��� ���x�<�<����;�;�1��;�;��f�_�F�
�]�]�7�G�
,�
,�����A��.�.���w�%�v�v�r�r�r�5�5�1��
���[�
 �
 �	�H������������&����#�~�~�(�a�-�-�!�&�!�,�,�����c�>�>���/�/�!�"�6�N�N���'�'.�w�w������A���q�=�=��f�_�F��7�?�s�6B�B"c���	t|��n+#t$rtd|jj����d�wxYwddl}tjd��}d}|j�Y|j�	d��tkr6|dz
}|j}|j�#|j�	d��tk�6|�
d|jj��t|��|S)Nz%Plural value must be an integer, got rr8��__name__)�round�	TypeError�	__class__rY�warnings�sys�	_getframe�f_back�	f_globalsrM�warn�DeprecationWarning)r@r]�frame�
stacklevels    r#�_as_intrf�s��;�
�a�������;�;�;��i���-�-�0�1�1�6:�	;�;�����O�O�O��M�!���E��J�
�,�
"�u��':�':�:�'F�'F�(�'R�'R��a��
�����,�
"�u��':�':�:�'F�'F�(�'R�'R�
�M�M�M��;�'�'�*�$�����
�Hs��(:c��t|��dkrtd���	tt|����\}}|rt	|���d}|D].}|dkr|dz
}|dkrtd����#|dkr|dz}�/t
td	�}td
|z|��|dS#t$rtd���wxYw)z�Gets a C expression as used in PO files for plural forms and returns a
    Python function that implements an equivalent expression.
    i�z"plural form expression is too longrr>r8�z%plural form expression is too complexr?)rfrYz�if True:
            def func(n):
                if not isinstance(n, int):
                    n = _as_int(n)
                return int(%s)
            �func)	�lenrrIr$r'rfrY�exec�RecursionError)rrPrQ�depth�c�nss      r#�c2pyrp�s��
�6�{�{�T����=�>�>�>�B� ��6�!2�!2�3�3�����	"���/�/�!����	�	�A��C�x�x���
���2�:�:�%�%L�M�M�M���c�����
��� �h�
7�
7����
��
�	�	�	��&�z����B�B�B��@�A�A�A�B���s�BB1�1Cc�b�ddl}|�|��}d}d}d}d}|�d��}|dkr||d�}|d|�}||z}nd}|�d��}|dkr||d�}|d|�}||z}nd}|�d��}|dkr||d�}	|d|�}||z}nd}	|}
g}t|dz��D]=}||zs5|
}
||zr|
|	z
}
||zr|
|z
}
||zr|
|z
}
|�|
���>|���|S)	Nrr8rXrD�@r�.�_)r�	normalizer�range�append�reverse)�locr�COMPONENT_CODESET�COMPONENT_TERRITORY�COMPONENT_MODIFIER�mask�pos�modifier�codeset�	territory�language�retr4�vals              r#�_expand_langr��s����M�M�M�
�
�
�3�
�
�C� �� �� ���D�

�(�(�3�-�-�C�
�a�x�x��s�t�t�9���$�3�$�i���"�"�����

�(�(�3�-�-�C�
�a�x�x��c�d�d�)���$�3�$�i���!�!�����

�(�(�3�-�-�C�
�a�x�x�����I�	��$�3�$�i���#�#����	��H�
�C�
�4��6�]�]�����T�E�	�	��C��&�&�8��y�(8���$�$�6��w����%�%�7��x����J�J�s�O�O�O���K�K�M�M�M��Jr%c�N�eZdZdd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zdd�ZdS)
rNc�b�i|_d|_d|_|�|�|��dSdS�N)�_info�_charset�	_fallbackrI��self�fps  r#�__init__zNullTranslations.__init__s6����
���
����
�>��K�K��O�O�O�O�O��>r%c��dSr�r2r�s  r#rIzNullTranslations._parses���r%c�Z�|jr|j�|��dS||_dSr�)r��add_fallback)r��fallbacks  r#r�zNullTranslations.add_fallbacks3���>�	&��N�'�'��1�1�1�1�1�%�D�N�N�Nr%c�H�|jr|j�|��S|Sr�)r�r
)r��messages  r#r
zNullTranslations.gettexts'���>�	3��>�)�)�'�2�2�2��r%c�\�|jr|j�|||��S|dkr|S|S�Nr8)r�r)r��msgid1�msgid2r@s    r#rzNullTranslations.ngettext s9���>�	>��>�*�*�6�6�1�=�=�=���6�6��M��Mr%c�J�|jr|j�||��S|Sr�)r�r)r��contextr�s   r#rzNullTranslations.pgettext(s)���>�	=��>�*�*�7�G�<�<�<��r%c�^�|jr|j�||||��S|dkr|S|Sr�)r�r)r�r�r�r�r@s     r#rzNullTranslations.npgettext-s<���>�	H��>�+�+�G�V�V�Q�G�G�G���6�6��M��Mr%c��|jSr�)r��r�s r#�infozNullTranslations.info5s
���z�r%c��|jSr�)r�r�s r#�charsetzNullTranslations.charset8s
���}�r%c��ddl}|j|jd<|�1hd�}|t|��zD]}t	||��|j|<�dSdS)Nrrt>r
rrr)�builtinsr
�__dict__�set�getattr)r��namesr��allowed�names     r#r	zNullTranslations.install;sq������!%����#����F�F�F�G��#�e�*�*�,�
>�
>��*1�$��*=�*=��!�$�'�'���
>�
>r%r�)
rY�
__module__�__qualname__r�rIr�r
rrrr�r�r	r2r%r#rr
s�����������
�
�
�&�&�&����
������
���������>�>�>�>�>�>r%rc�B�eZdZdZdZdZdZd�Zd�Zd�Z	d�Z
d	�Zd
�ZdS)rl�*l�$<z%s%s)rr8c��|dz	|dzfS)z/Returns a tuple of major version, minor version�i��r2)r��versions  r#�
_get_versionszGNUTranslations._get_versionsPs���2�
�w��/�0�0r%c�>�ddlm}t|dd��}ix|_}d�|_|���}t
|��}|d|dd���d}||jkr|d	|dd
���\}}	}
}d}n8||jkr|d|dd
���\}}	}
}d
}ntdd|���|�
|��\}
}|
|jvr!tddt|
��z|���td|	��D�]�}||||
|
dz���\}}||z}|||||dz���\}}||z}||kr||kr|||�}|||�}ntdd|���|dk�rjd}|�d��D�]Q}|������}|s�,|�d��r|�d��r�Wdx}}d|vr`|�dd��\}}|������}|���}||j|<|}n|r|j|xxd|zz
cc<|dkr"|�d��d|_��|dkrJ|�d��}|d�d��d}t-|��|_��S|jpd}d|vrh|�d��\}} |�d��}t||��}t/|��D]\}}!t|!|��|||f<�n!t||��|t||��<|
dz
}
|dz
}���dS)z8Override this method to support alternative .mo formats.r)�unpackr�rc�(�t|dk��Sr�)rJ)r@s r#�<lambda>z(GNUTranslations._parse.<locals>.<lambda>]s���A��F���r%z<INrDz<4Irhz<IIz>4Iz>IIzBad magic numberzBad version number �zFile is corrupt�
z	#-#-#-#-#rGr8�
zcontent-typezcharset=zplural-forms�;zplural=�ascii�)�structr�r��_catalogr�readrj�LE_MAGIC�BE_MAGIC�OSErrorr��VERSIONS�strrv�split�decode�strip�
startswith�endswith�lowerr�r�rp�	enumerate)"r�r�r��filename�catalog�buf�buflen�magicr��msgcount�	masteridx�transidx�ii�
major_version�
minor_versionr4�mlen�moff�mend�tlen�toff�tend�msg�tmsg�lastk�b_item�item�k�vrr�r�r��xs"                                  r#rIzGNUTranslations._parseTs��	"�!�!�!�!�!��2�v�r�*�*��#%�$��
��+�+����g�g�i�i���S������t�S��!��W�%�%�a�(���D�M�!�!�5;�V�E�3�q��t�9�5M�5M�2�G�X�y�(��B�B�
�d�m�
#�
#�5;�V�E�3�q��t�9�5M�5M�2�G�X�y�(��B�B��!�/��:�:�:�'+�'9�'9�'�'B�'B�$�
�}���
�-�-��!�2�S��5G�5G�G��R�R�R��q�(�#�#�9	�9	�A����C�	�)�A�+�(=�$>�?�?�J�D�$��$�;�D����C���!��(;�$<�=�=�J�D�$��$�;�D��f�}�}������$�t�)�n���4��9�~����a�!2�H�=�=�=��q�y�y���"�j�j��/�/�3�3�F�!�=�=�?�?�0�0�2�2�D��!� ����{�3�3�!��
�
�k�8R�8R�!� � �L�A���d�{�{�#�z�z�#�q�1�1���1��G�G�I�I�O�O�-�-���G�G�I�I��()��
�1�
� !����9��
�5�)�)�)�T�D�[�8�)�)�)��N�*�*�()���
�(;�(;�A�(>��
�
��n�,�,��G�G�C�L�L��!"�1����I�!6�!6�q�!9��&*�6�l�l�����m�.�w�G��#�~�~�!$���7�!3�!3�����z�z�'�*�*���V�W�-�-��%�d�O�O�;�;�D�A�q�+.�q�'�?�?�G�V�Q�K�(�(�;�.1��w�-?�-?���C��)�)�*���N�I���M�H�H�s9	�9	r%c��t��}|j�||��}||ur0|j�||�d��f|��}||ur|S|jr|j�|��S|Sr�)�objectr�rMrr�r
)r�r��missingr�s    r#r
zGNUTranslations.gettext�s����(�(���}� � ��'�2�2���7�?�?��=�$�$�g�t�{�{�1�~�~�%>��H�H�D��w����K��>�	3��>�)�)�'�2�2�2��r%c���	|j||�|��f}n@#t$r3|jr|j�|||��cYS|dkr|}n|}YnwxYw|Sr�)r�r�KeyErrorr�r)r�r�r�r@r�s     r#rzGNUTranslations.ngettext�s���	��=�&�$�+�+�a�.�.�!9�:�D�D���	�	�	��~�
B��~�.�.�v�v�q�A�A�A�A�A��A�v�v��������
	�����s�"%�-A"�A"�!A"c�(�|j||fz}t��}|j�||��}||ur0|j�||�d��f|��}||ur|S|jr|j�||��S|Sr�)�CONTEXTr�r�rMrr�r)r�r�r��ctxt_msg_idr�r�s      r#rzGNUTranslations.pgettext�s����l�g�w�%7�7���(�(���}� � ��g�6�6���7�?�?��=�$�$�k�4�;�;�q�>�>�%B�G�L�L�D��w����K��>�	=��>�*�*�7�G�<�<�<��r%c���|j||fz}	|j||�|��f}nA#t$r4|jr|j�||||��cYS|dkr|}n|}YnwxYw|Sr�)r�r�rr�r�r)r�r�r�r�r@r�r�s       r#rzGNUTranslations.npgettext�s����l�g�v�%6�6��	��=��d�k�k�!�n�n�!<�=�D�D���	�	�	��~�
L��~�/�/�����K�K�K�K�K��A�v�v��������
	�����s�"1�.A/�!A/�.A/N)
rYr�r�r�r�r�r�r�rIr
rrrr2r%r#rrDs��������H��H��G��H�1�1�1�W�W�W�r	�	�	�
�
�
�
�
�
�����r%rFc��|�t}|�Xg}dD]:}tj�|��}|r|�d��}n�;d|vr|�d��g}|D]-}t
|��D]}||vr|�|����.|rg}	nd}	|D]j}|dkrnatj�||dd|z��}
tj�	|
��r|r|	�|
���f|
cS�k|	S)N)�LANGUAGE�LC_ALL�LC_MESSAGES�LANGrG�Cr�z%s.mo)
�_default_localedir�os�environrMr�rwr��path�join�exists)�domain�	localedir�	languages�all�envarr��nelangs�lang�nelangrP�mofiles           r#rr�sc����&�	����	�B�	�	�E��*�.�.��'�'�C��
��I�I�c�N�N�	���
��i������S�!�!�!��G��'�'��"�4�(�(�	'�	'�F��W�$�$����v�&�&�&��	'�������������3�;�;��E�����i��}�g��>N�O�O��
�7�>�>�&�!�!�	��
��
�
�f�%�%�%�%��
�
�
�		�
�Mr%c��|�t}t|||d���}|s'|rt��Sddlm}t|d|���d}|D]�}|tj�|��f}	t�
|	��}
|
�Lt|d��5}t�|	||����}
ddd��n#1swxYwYddl
}|�
|
��}
|�|
}��|�|
����|S)NT)r�r)�ENOENTz$No translation file found for domain�rb)rrr�errnor�FileNotFoundErrorr�r��abspath�
_translationsrM�open�
setdefault�copyr�)
r�r�r��class_r��mofilesrrPr�key�tr�r
s
             r#rrst��
�~� ���6�9�i�T�:�:�:�G��P��	&�#�%�%�%� � � � � � ��� F��P�P�	P��F��#�#���r�w���v�.�.�/�����c�"�"���9��f�d�#�#�
>�r�!�,�,�S�&�&��*�*�=�=��
>�
>�
>�
>�
>�
>�
>�
>�
>�
>�
>����
>�
>�
>�
>�	�����I�I�a�L�L���>��F�F�����"�"�"�"��Ms�%C
�
C	�C	)r�c�T�t||d���}|�|��dS)NT)r�)rr	)r�r�r�rs    r#r	r	)s.���F�I��5�5�5�A��I�I�e�����r%�messagesc��|�|atSr�)�_current_domain)r�s r#r
r
4s��
�� ���r%c�Z�|�
|t|<t�|t��Sr�)�_localedirsrMr�)r�r�s  r#rr;s'����'��F���?�?�6�#5�6�6�6r%c��	t|t�|d����}n#t$r|cYSwxYw|�|��Sr�)rrrMr�r
)r�r�rs   r#rrBs\���������� =� =�>�>�����������������9�9�W�����),�;�;c��	t|t�|d����}n#t$r|dkr|cYS|cYSwxYw|�|||��Sr�)rrrMr�r)r�r�r�r@rs     r#rrJst���������� =� =�>�>����������6�6��M�M�M��M�M�M�	����

�:�:�f�f�a�(�(�(��),�A�A�Ac��	t|t�|d����}n#t$r|cYSwxYw|�||��Sr�)rrrMr�r)r�r�r�rs    r#rrUs^���������� =� =�>�>�����������������:�:�g�w�'�'�'rc��	t|t�|d����}n#t$r|dkr|cYS|cYSwxYw|�||||��Sr�)rrrMr�r)r�r�r�r�r@rs      r#rr]sv���������� =� =�>�>����������6�6��M�M�M��M�M�M�	����

�;�;�w����2�2�2rc�,�tt|��Sr�)rr)r�s r#r
r
hs���O�W�-�-�-r%c�0�tt|||��Sr�)rr)r�r�r@s   r#rrls���_�f�f�a�8�8�8r%c�.�tt||��Sr�)rr)r�r�s  r#rrps���_�g�w�7�7�7r%c�2�tt||||��Sr�)rr)r�r�r�r@s    r#rrts���o�w����B�B�Br%)r;)NNF)NNNFr�)*�__doc__�operatorr�rr^�__all__r�r��base_prefixr��compile�VERBOSE�DOTALLrr$r'rKr�rLrIrfrpr�rrrrrr	rrr
rrrrrr
rrrrr2r%r#�<module>r&s���
�
�`����	�	�	�	�	�	�	�	�
�
�
�
�
�
�
���W�\�\�#�/�7�H�E�E������
��B�I�	����	
�	
�	
�;�;�;���L�K�9�9�[�!�#<�#<�K�K�K���u�4�0�0�	�/�/�/�/�d
�
�
�(!B�!B�!B�H'�'�'�T7>�7>�7>�7>�7>�7>�7>�7>�tW�W�W�W�W�&�W�W�W�v!�!�!�!�J�
�37�&+�����D�T��������������7�7�7�7����)�)�)�(�(�(�3�3�3�.�.�.�9�9�9�8�8�8�C�C�C�$���r%

?>