File manager - Edit - /usr/lib/python3.10/__pycache__/gettext.cpython-310.pyc
Back
o ����}�5h-l����������������������@���s���d�Z�ddlZddlZddlZg�d�Zej�ejdd�Ze� dej ejB��Zdd��Z d d ��ZdZdd ��eed�D��Zdddd�ZdGdd�Zdd��Zdd��Zdd��ZG�dd��d�ZG�dd��de�ZdHd!d"�Zi�Zd#gZdddd efd$d%�Zdedfd&d'�Zi�ai�ad(adId)d*�Z dId+d,�Z!dId-d.�Z"d/d0��Z#d1d2��Z$d3d4��Z%d5d6��Z&d7d8��Z'd9d:��Z(d;d<��Z)d=d>��Z*d?d@��Z+dAdB��Z,dCdD��Z-dEdF��Z.eZ/dS�)Ja���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�find�translation�install� textdomain�bindtextdomain�bind_textdomain_codeset�dgettext� dngettext�gettext�lgettext� ldgettext� ldngettext� lngettext�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�����������������c���sR�����t��t|��D�]}|j}|dkrq|�|�}|dkr td|���|V��qdV��d�S�)N�WHITESPACES�INVALIDz invalid token in plural form: %s��)�re�finditer�_token_pattern� lastgroup�group� ValueError)�plural�mo�kind�value��r&����/usr/lib/python3.10/gettext.py� _tokenizeV���s���� r(���c�����������������C���s���|�rt�d|���S�t�d�S�)Nz#unexpected token in plural form: %szunexpected end of plural form)r!���)r%���r&���r&���r'����_errora���s���r)���))�||)�&&)z==z!=)�<�>z<=z>=)�+�-)�*�/�%c�����������������C���s ���i�|�]\}}|D�]}||�qqS�r&���r&���)�.0�i�ops�opr&���r&���r'���� <dictcomp>o���s��� �r7��������or�andz//)r*���r+���r1������c�����������������C���s���d}t�|��}|dkr|d7�}t�|��}|dks |dkr/t|��\}}d||f�}|dkr.td��n%|dkr:d ||f�}nzt|d �}W�n�tyM���t|�d��w�d||f�}t�|��}d}|tv�r�t|�}||k�rgn(|d v�rs|d v�rsd|�}t�||�}t|�|d��\} }d||| f�}|}|tv�s^||��kr�dkr�n�nd|�}|dkr�|dkr�t|�d�\} }|dkr�t|��t|��\}}d| ||f�}|dkr�d|�}||fS�)Nr����!znot �(z%s(%s)�)z%unbalanced parenthesis in plural form�nz%s%s� ���z%s%d�d���)��������z(%s)r8���z%s %s %srC����?r����:z%s if %s else %s)�next�_parser!����intr)����_binary_ops� _c2py_ops�get)�tokens�priority�result�nexttok�subr%����jr4���r6����right�if_true�if_falser&���r&���r'���rG���r���sX����� ��rG���c�����������������C���sT���zt�|��}W�n�ty���td|�jjf��d��w�dd�l}|�d|�jjf�td��|�S�)Nz'Plural value must be an integer, got %sr���rC���)�round� TypeError� __class__�__name__�warnings�warn�DeprecationWarning)r?���r4���rY���r&���r&���r'����_as_int����s ��������r\���c�����������������C���s����t�|��dkr td��z>tt|���\}}|rt|��d}|D�]}|dkr0|d7�}|dkr/td��q|dkr8|d8�}qd ti}td |�|��|d�W�S��tyS���td��w�)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 longr���r=���r8�������z%plural form expression is too complexr>���r\���z�if True: def func(n): if not isinstance(n, int): n = _as_int(n) return int(%s) �func)�lenr!���rG���r(���r)���r\����exec�RecursionError)r"���rN���rO����depth�c�nsr&���r&���r'����c2py����s4������� �re���c�����������������C���s8��dd�l�}|�|��}�d}d}d}d}|��d�}|dkr+|�|d���}|�d�|��}�||O�}nd}|��d�}|dkrG|�|d���}|�d�|��}�||O�}nd}|��d�}|dkrc|�|d���} |�d�|��}�||O�}nd} |�} g�}t|d��D�]&}||�@�s�| } ||@�r�| | 7�} ||@�r�| |7�} ||@�r�| |7�} |�| ��qo|����|S�) Nr���r8�������rC����@r����.�_)r���� normalizer����range�append�reverse)�locr����COMPONENT_CODESET�COMPONENT_TERRITORY�COMPONENT_MODIFIER�mask�pos�modifier�codeset� territory�language�retr4����valr&���r&���r'����_expand_lang����sH��� �rz���c�������������������@���s����e�Zd�Zddd�Zdd��Zdd��Zdd ��Zd d��Zdd ��Zdd��Z dd��Z dd��Zdd��Zdd��Z dd��Zdd��Zddd�ZdS�)r���Nc�����������������C���s2���i�|�_�d�|�_d�|�_d�|�_|d�ur|��|��d�S�d�S��N)�_info�_charset�_output_charset� _fallbackrG�����self�fpr&���r&���r'����__init__����s����zNullTranslations.__init__c�����������������C���s���d�S�r{���r&���r����r&���r&���r'���rG�����s���zNullTranslations._parsec�����������������C���s ���|�j�r|�j��|��d�S�||�_�d�S�r{���)r����add_fallback)r�����fallbackr&���r&���r'���r���� ��s��� zNullTranslations.add_fallbackc�����������������C���s���|�j�r |�j��|�S�|S�r{���)r���r ���)r�����messager&���r&���r'���r �����s���zNullTranslations.gettextc�����������������C���s����dd�l�}|�dtd��dd�l}|�jr3|�����|�ddt��|�j�|�W��d�����S�1�s.w���Y��|�jr<|� |�j�S�|� |� ���S�)Nr����/lgettext() is deprecated, use gettext() insteadrf����ignore�.*\blgettext\b.*)rY���rZ���r[���r���r����catch_warnings�filterwarningsr���r~����encode�getpreferredencoding)r����r����rY���r���r&���r&���r'���r�����s���� � �zNullTranslations.lgettextc�����������������C���s&���|�j�r|�j��|||�S�|dkr|S�|S��Nr8���)r���r���)r�����msgid1�msgid2r?���r&���r&���r'���r���#��s ���zNullTranslations.ngettextc�����������������C���s����dd�l�}|�dtd��dd�l}|�jr5|�����|�ddt��|�j�|||�W��d�����S�1�s0w���Y��|dkr<|}n|}|�jrG|� |�j�S�|� |� ���S�)Nr����1lngettext() is deprecated, use ngettext() insteadrf���r�����.*\blngettext\b.*r8���)rY���rZ���r[���r���r���r����r����r���r~���r����r�����r����r����r����r?���rY���r����tmsgr&���r&���r'���r���+��s$���� � �zNullTranslations.lngettextc�����������������C���s���|�j�r |�j��||�S�|S�r{���)r���r���)r�����contextr����r&���r&���r'���r���=��s���zNullTranslations.pgettextc�����������������C���s(���|�j�r|�j��||||�S�|dkr|S�|S�r����)r���r���)r����r����r����r����r?���r&���r&���r'���r���B��s ���zNullTranslations.npgettextc�����������������C�������|�j�S�r{���)r|����r����r&���r&���r'����infoJ������zNullTranslations.infoc�����������������C���r����r{���)r}���r����r&���r&���r'����charsetM��r����zNullTranslations.charsetc�����������������C���s���dd�l�}|�dtd��|�jS�)Nr���zoutput_charset() is deprecatedrf����rY���rZ���r[���r~���)r����rY���r&���r&���r'����output_charsetP��s ����zNullTranslations.output_charsetc�����������������C���s ���dd�l�}|�dtd��||�_d�S�)Nr���z"set_output_charset() is deprecatedrf���r����)r����r����rY���r&���r&���r'����set_output_charsetV��s ���� z#NullTranslations.set_output_charsetc�����������������C���sN���dd�l�}|�j|jd<�|d�ur#h�d�}|t|�@�D�]}t|�|�|j|<�qd�S�d�S�)Nr���ri���>���r ���r���r���r���r���r���)�builtinsr ����__dict__�set�getattr)r�����namesr�����allowed�namer&���r&���r'���r���\��s����zNullTranslations.installr{���)rX���� __module__�__qualname__r����rG���r����r ���r���r���r���r���r���r����r����r����r����r���r&���r&���r&���r'���r�������s���� r���c�������������������@���s\���e�Zd�ZdZdZdZdZdd��Zdd��Zd d ��Z dd��Z d d��Zdd��Zdd��Z dd��ZdS�)r���l����*�l����$<�z%s%s)r���r8���c�����������������C���s���|d?�|d@�fS�)z/Returns a tuple of major version, minor version����i����r&���)r�����versionr&���r&���r'���� _get_versionsr��s���zGNUTranslations._get_versionsc�����������"������C���s���ddl�m}�t|dd�}i��|�_}dd��|�_|���}t|�}|d|dd ���d�}||�jkr>|d |d d���\}} } }d}n||�jkrS|d |d d���\}} } }d}nt dd|��|�� |�\} }| |�jvrot ddt| ��|��t d| �D�]�}|||| | d����\}}||�}|||||d����\}}||�}||k�r�||k�r�|||��}|||��}nt dd|��|dk�r,d}|�d�D�]l}|������}|s�q�|�d�r�|�d�r�q�d�}}d|v�r�|�dd�\}}|������}|���}||�j|<�|}n|�r|�j|��d|�7��<�|dk�r|�d�d�|�_q�|dk�r+|�d�}|d��d�d�}t|�|�_q�|�j�p1d}d|v��r\|�d�\}} |�d�}t||�}t|�D�]\}}!t|!|�|||f<��qLn t||�|t||�<�| d7�} |d7�}qtdS�)z8Override this method to support alternative .mo formats.r���)�unpackr����r���c�����������������S���s���t�|�dk�S�r����)rH���)r?���r&���r&���r'����<lambda>��s����z(GNUTranslations._parse.<locals>.<lambda>z<INrC���z<4Ir]���z<IIz>4Iz>IIzBad magic numberzBad version number ����zFile is corrupt���� z #-#-#-#-#rE���r8���� zcontent-typezcharset=zplural-forms�;zplural=�ascii�����)�structr����r�����_catalogr"����readr_����LE_MAGIC�BE_MAGIC�OSErrorr�����VERSIONS�strrk����split�decode�strip� startswith�endswith�lowerr|���r}���re���� enumerate)"r����r����r�����filename�catalog�buf�buflen�magicr�����msgcount� masteridx�transidx�ii� major_version� minor_versionr4����mlen�moff�mend�tlen�toff�tend�msgr�����lastk�b_item�item�k�vr"���r����r����r�����xr&���r&���r'���rG���v��s|��� � � �zGNUTranslations._parsec�����������������C���sp���dd�l�}|�dtd��dd�l}t��}|�j�||�}||u�r(|�jr&|�j�|�S�|}|�j r1|� |�j �S�|� |����S�)Nr���r����rf���)rY���rZ���r[���r����objectr����rK���r���r���r~���r����r����)r����r����rY���r����missingr����r&���r&���r'���r������s����zGNUTranslations.lgettextc�����������������C���s����dd�l�}|�dtd��dd�l}z|�j||��|�f�}W�n�ty:���|�jr/|�j�|||��Y�S�|dkr6|}n|}Y�nw�|�j rD|� |�j �S�|� |����S�)Nr���r����rf���r8���)rY���rZ���r[���r���r����r"����KeyErrorr���r���r~���r����r����r����r&���r&���r'���r������s$������zGNUTranslations.lngettextc�����������������C���s6���t���}|�j�||�}||u�r|�jr|�j�|�S�|S�|S�r{���)r����r����rK���r���r ���)r����r����r����r����r&���r&���r'���r ������s���zGNUTranslations.gettextc�����������������C���s`���z |�j�||��|�f�}W�|S��ty/���|�jr!|�j�|||��Y�S�|dkr*|}Y�|S�|}Y�|S�w�r����)r����r"���r����r���r���)r����r����r����r?���r����r&���r&���r'���r������s������zGNUTranslations.ngettextc�����������������C���sF���|�j�||f�}t��}|�j�||�}||u�r!|�jr|�j�||�S�|S�|S�r{���)�CONTEXTr����r����rK���r���r���)r����r����r�����ctxt_msg_idr����r����r&���r&���r'���r�����s���zGNUTranslations.pgettextc�������������� ���C���sp���|�j�||f�}z |�j||��|�f�}W�|S��ty7���|�jr)|�j�||||��Y�S�|dkr2|}Y�|S�|}Y�|S�w�r����)r����r����r"���r����r���r���)r����r����r����r����r?���r����r����r&���r&���r'���r�����s������zGNUTranslations.npgettextN)rX���r����r����r����r����r����r����r����rG���r���r���r ���r���r���r���r&���r&���r&���r'���r���f��s����Y r���Fc�����������������C���s��|d�u�rt�}|d�u�r)g�}dD�]}tj�|�}|r|�d�}�nqd|vr)|�d��g�}|D�]}t|�D�]}||vr>|�|��q3q-|rEg�} nd�} |D�]C}|dkrR�| S�tj�||dd|���} tj�d|dd|���}tj� | �rz|rv| �| ��n| ��S�tj� |�r�|r�| �|��qI|��S�qI| S�)N)�LANGUAGE�LC_ALL�LC_MESSAGES�LANGrE����Cr����z%s.moz/usr/share/locale-langpack) �_default_localedir�os�environrK���r����rl���rz����path�join�exists)�domain� localedir� languages�all�envarry����nelangs�lang�nelangrN����mofile� mofile_lpr&���r&���r'���r�����sP��� � ��� ��r����unspecifiedc�������������� ���C���s<��|d�u�rt�}t|�||dd�}|s!|rt��S�ddlm}�t|d|���d�}|D�]v} |tj�| �f} t � | �}|d�u�rUt| d��}t �| ||��}W�d�����n1�sPw���Y��dd�l } | � |�}|tur�dd�l}|�dtd��|r�|�����|�d d t��|�|��W�d�����n1�s�w���Y��|d�u�r�|}q%|�|��q%|S�)NT)r����r���)�ENOENTz$No translation file found for domain�rbzparameter codeset is deprecatedrf���r����z.*\bset_output_charset\b.*)r���r���r����errnor�����FileNotFoundErrorr����r�����abspath� _translationsrK����open� setdefault�copy�_unspecifiedrY���rZ���r[���r����r����r����r����)r����r����r�����class_r����ru����mofilesr����rN���r�����key�tr����r����rY���r&���r&���r'���r���V��sH���� � � ��r���c�����������������C���s���t�|�|d|d�}|�|��d�S�)NT)r����ru���)r���r���)r����r����ru���r����r��r&���r&���r'���r������s���r����messagesc�����������������C���s���|�d�ur|�a�t�S�r{���)�_current_domain)r����r&���r&���r'���r������s���r���c�����������������C���s���|d�ur|t�|�<�t��|�t�S�r{���)�_localedirsrK���r����)r����r����r&���r&���r'���r ������s���r ���c�����������������C���s0���dd�l�}|�dtd��|d�ur|t|�<�t�|��S�)Nr���z'bind_textdomain_codeset() is deprecatedrf���)rY���rZ���r[����_localecodesetsrK���)r����ru���rY���r&���r&���r'���r ������s���� r ���c�����������������C���s8���zt�|�t�|�d���}W�n�ty���|�Y�S�w�|�|�S�r{���)r���r��rK���r����r ���)r����r����r��r&���r&���r'���r������s���� r���c�����������������C���s����dd�l�}|�dtd��dd�l}t�|��}z(|�����|�ddt��t|�t �|�d��|d�}W�d�����n1�s6w���Y��W�n�t yN���|�|pJ|�����Y�S�w�|�����|�ddt��|� |�W��d�����S�1�sjw���Y��d�S�)Nr���z1ldgettext() is deprecated, use dgettext() insteadrf���r�����.*\bparameter codeset\b.*�ru���r����)rY���rZ���r[���r���r��rK���r����r����r���r��r����r����r����r���)r����r����rY���r���ru���r��r&���r&���r'���r������s.���� ���� �$�r���c�����������������C���sL���zt�|�t�|�d���}W�n�ty���|dkr|�Y�S�|�Y�S�w�|�|||�S�r����)r���r��rK���r����r���)r����r����r����r?���r��r&���r&���r'���r������s����r���c����������� ������C���s����dd�l�}|�dtd��dd�l}t�|��}z(|�����|�ddt��t|�t �|�d��|d�}W�d�����n1�s6w���Y��W�n�t yW���|dkrJ|}n|}|�|pS|�����Y�S�w�|�����|�ddt��|� |||�W��d�����S�1�suw���Y��d�S�) Nr���z3ldngettext() is deprecated, use dngettext() insteadrf���r����r��r��r8���r����)rY���rZ���r[���r���r��rK���r����r����r���r��r����r����r����r���) r����r����r����r?���rY���r���ru���r��r����r&���r&���r'���r������s4���� ���� �$�r���c�����������������C���s:���zt�|�t�|�d���}W�n�ty���|�Y�S�w�|�||�S�r{���)r���r��rK���r����r���)r����r����r����r��r&���r&���r'���r������s����r���c�����������������C���sN���zt�|�t�|�d���}W�n�ty���|dkr|�Y�S�|�Y�S�w�|�||||�S�r����)r���r��rK���r����r���)r����r����r����r����r?���r��r&���r&���r'���r������s����r���c�����������������C���s ���t�t|��S�r{���)r���r��)r����r&���r&���r'���r ������s��� r ���c�����������������C���sZ���dd�l�}|�dtd��|�����|�ddt��tt|��W��d�����S�1�s&w���Y��d�S�)Nr���r����rf���r����z.*\bldgettext\b.*)rY���rZ���r[���r����r����r���r��)r����rY���r&���r&���r'���r������s���� �$�r���c�����������������C���s���t�t|�||�S�r{���)r���r��)r����r����r?���r&���r&���r'���r������s���r���c�����������������C���s^���dd�l�}|�dtd��|�����|�ddt��tt|�||�W��d�����S�1�s(w���Y��d�S�)Nr���r����rf���r����z.*\bldngettext\b.*)rY���rZ���r[���r����r����r���r��)r����r����r?���rY���r&���r&���r'���r�����s���� �$�r���c�����������������C���s���t�t|�|�S�r{���)r���r��)r����r����r&���r&���r'���r��� ��s���r���c�����������������C���s���t�t|�|||�S�r{���)r���r��)r����r����r����r?���r&���r&���r'���r�����s���r���)r;���)NNFr{���)0�__doc__r����r����sys�__all__r����r�����base_prefixr�����compile�VERBOSE�DOTALLr���r(���r)���rI���r����rJ���rG���r\���re���rz���r���r���r���r����r����r���r���r��r��r��r���r ���r ���r���r���r���r���r���r���r ���r���r���r���r���r���r���r&���r&���r&���r'����<module>���s^����0 � 1$+h� 95 �+
| ver. 1.4 |
Github
|
.
| PHP 8.2.28 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings