• File: babelplugin.cpython-37.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib/python3.7/site-packages/mako/ext/__pycache__/babelplugin.cpython-37.pyc
  • Date Modified: 06/27/2022 10:09 PM
  • File size: 2.05 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

C]Z@s8dZddlmZddlmZGdddeZddZdS)	z@gettext message extraction via Babel: http://babel.edgewall.org/)extract_python)MessageExtractorcs,eZdZfddZddZddZZS)BabelMakoExtractorcs@||_||_d||d|ddd|_tt|dS)N Zinput_encodingencoding)zcomment-tagsr)keywordsoptionsjoingetconfigsuperr__init__)selfrcomment_tagsr)	__class__E/opt/alt/python37/lib/python3.7/site-packages/mako/ext/babelplugin.pyr
szBabelMakoExtractor.__init__cCs
||S)N)Zprocess_file)rfileobjrrr__call__szBabelMakoExtractor.__call__c	csL|jd}x<t||j||jD]&\}}}}||d||||fVqWdS)Nzcomment-tags)rrrr)	rcodeZcode_linenoZtranslator_stringsrlinenofuncnameZmessagesZpython_translator_commentsrrrprocess_pythons

z!BabelMakoExtractor.process_python)__name__
__module____qualname__r
rr
__classcell__rr)rrr
srccs(t|||}x||D]
}|VqWdS)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)rrrrZ	extractormessagerrrextract,srN)__doc__Zbabel.messages.extractrZmako.ext.extractrrrrrrr<module>s