Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/mako/ext/__pycache__/babelplugin.cpython-311.pyc
�
�܋f+��D�dZddlmZddlmZGd�de��Zd�ZdS)zEgettext message extraction via Babel: https://pypi.org/project/Babel/�)�extract_python)�MessageExtractorc�*��eZdZ�fd�Zd�Zd�Z�xZS)�BabelMakoExtractorc����||_||_d�|��|�d|�dd����d�|_t�����dS)N� �input_encoding�encoding)�comment-tagsr
)�keywords�options�join�get�config�super�__init__)�selfr�comment_tagsr
� __class__s ��e/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/mako/ext/babelplugin.pyrzBabelMakoExtractor.__init__sp��� ��
�����H�H�\�2�2���� �'�+�+�j�$�"?�"?���
�
��� ����������c�,�|�|��S)N)�process_file)r�fileobjs r�__call__zBabelMakoExtractor.__call__s��� � ��)�)�)rc#�K�|jd}t||j||j��D]\}}}}||dz
z||||zfV��dS)Nr�)rrrr
) r�code�code_lineno�translator_stringsr�lineno�funcname�messages�python_translator_commentss r�process_pythonz!BabelMakoExtractor.process_pythons������{�>�2���D�$�-��t�|�
L�
L� � �
����&��v��z�*���"�%?�?� �
�
�
�
�
� r)�__name__�
__module__�__qualname__rrr%�
__classcell__)rs@rrr
sV������� � � � � �*�*�*�
�
�
�
�
�
�
rrc#�NK�t|||��}||��Ed{V��dS)aExtract messages from Mako templates.
:param fileobj: the file-like object the messages should be extracted from
:param keywords: a list of keywords (i.e. function names) that should be
recognized as translation functions
:param comment_tags: a list of translator tags to search for and include
in the results
:param options: a dictionary of additional options (optional)
:return: an iterator over ``(lineno, funcname, message, comments)`` tuples
:rtype: ``iterator``
N)r)rrrr
� extractors r�extractr,,sA����#�8�\�7�C�C�I��y��!�!�!�!�!�!�!�!�!�!�!rN)�__doc__�babel.messages.extractr�mako.ext.extractrrr,�rr�<module>r1sv��L�K�1�1�1�1�1�1�-�-�-�-�-�-������)����>
"�
"�
"�
"�
"r