示例#1
0
def babel_extract(fileobj, keywords, comment_tags, options):
    """
    Simple extractor to get some basic Babel support.
    """
    env = Environment()
    for lineno, sg, pl in env.get_translations_for_string(fileobj.read()):
        yield lineno, None, (sg, pl), ''
示例#2
0
文件: _jinja.py 项目: wiless/IMTAphy
def babel_extract(fileobj, keywords, comment_tags, options):
    """
    Simple extractor to get some basic Babel support.
    """
    env = Environment()
    for lineno, sg, pl in env.get_translations_for_string(fileobj.read()):
        yield lineno, None, (sg, pl), ''