관리-도구
편집 파일: linguaplugin.cpython-311.pyc
� �܋f� � �d � d dl Z d dlZd dlmZ d dlmZ d dlmZ d dlmZ G d� dee� � ZdS )� N)� Extractor)� get_extractor)�Message)�MessageExtractorc �4 � e Zd ZdZdZdgZddd�Zd d�Zd � ZdS )�LinguaMakoExtractorzMako templatesFz.makozutf-8� )�encodingzcomment-tagsNc # � K � || _ || _ t d� � | _ |�t |d� � }nt j |� � }|5 }| � |� � E d {V �� d d d � � d S # 1 swxY w Y d S )Nzx.py�r)�options�filenamer �python_extractor�open� contextlib�nullcontext�process_file)�selfr r �fileobj�ctx�file_s �f/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/mako/ext/linguaplugin.py�__call__zLinguaMakoExtractor.__call__ s� � � � ���� �� � -�f� 5� 5����?��x��%�%�C�C��(��1�1�C� � 0�E��(�(��/�/�/�/�/�/�/�/�/� 0� 0� 0� 0� 0� 0� 0� 0� 0� 0� 0� 0���� 0� 0� 0� 0� 0� 0s �A7�7A;�>A;c # �" K � |� � � � � � }|� d� � r@|dv s|� d� � rd}n|� d� � r |dd � }|dz }t j |� � }| � | j | j ||dz � � D ]W}|rOt |j |j |j |j d � ||j gz � � |j |j � � }|V � �Xd S ) N�:)ztry:zelse:�exceptr �elif� �pass� � )�getvalue�strip�endswith� startswith�io�StringIOr r r r �msgctxt�msgid�msgid_plural�flags�join�comment�tcomment�location)r �code�code_lineno�translator_strings�source�msgs r �process_pythonz"LinguaMakoExtractor.process_python# s- � � � ������&�&�(�(���?�?�3��� ��*�*�*�f�.?�.?��.I�.I�*�����"�"�6�*�*� $��������f��F��{�6�"�"���(�(��M�4�<��{�Q�� � � � �C� "� ���K��I��$��I��H�H�/�3�;�-�?�@�@��L��L�� �� �I�I�I�I� � � )N) �__name__� __module__�__qualname__�__doc__� use_bytes� extensions�default_configr r5 � r6 r r r sV � � � � � ����I���J�")�2�>�>�N� 0� 0� 0� 0�� � � � r6 r ) r r&