Your IP : 3.145.76.161
�
��bg+ � �D � d Z ddlmZ ddlmZ G d� de� � Zd� ZdS )zEgettext message extraction via Babel: https://pypi.org/project/Babel/� )�extract_python)�MessageExtractorc �* � � e Zd Z� fd�Zd� Zd� Z� xZS )�BabelMakoExtractorc �� �� || _ || _ d� |� � |� d|� dd � � � � d�| _ t � � � � � d S )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.7/venv/lib/python3.11/site-packages/mako/ext/babelplugin.pyr zBabelMakoExtractor.__init__ sp �� � ��
�����H�H�\�2�2���� �'�+�+�j�$�"?�"?�� �
�
��� ���������� c �, � | � |� � S )N)�process_file)r �fileobjs r �__call__zBabelMakoExtractor.__call__ s � �� � ��)�)�)r c # � K � | j d }t || j || j � � D ]\ }}}}||dz
z ||||z fV � �d S )Nr � )r r r r
) r �code�code_lineno�translator_stringsr �lineno�funcname�messages�python_translator_commentss r �process_pythonz!BabelMakoExtractor.process_python s� � � � ��{�>�2�� �D�$�-��t�|�
L�
L� � �
����&� �v��z�*���"�%?�?� �
�
�
�
�
� r )�__name__�
__module__�__qualname__r r r% �
__classcell__)r s @r r r
sV �� � � � � � � � � � �*� *� *�
�
�
�
�
�
�
r r c # �N K � t |||� � } || � � E d{V �� dS )a Extract 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 )r r r r
� extractors r �extractr, , sA � � � � #�8�\�7�C�C�I��y��!�!�!�!�!�!�!�!�!�!�!r N)�__doc__�babel.messages.extractr �mako.ext.extractr r r, � r r �<module>r1 sv �� L� K� 1� 1� 1� 1� 1� 1� -� -� -� -� -� -�� � � � �)� � � �>
"�
"�
"�
"�
"r