test_translations.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:pyt 作者: python-security 项目源码 文件源码
def _compile_translations():
    PLUGINS_FOLDER = os.path.join(current_app.root_path, "plugins")
    translations_folder = os.path.join(current_app.root_path, "translations")

    subprocess.call(["pybabel", "compile", "-d", translations_folder])

    for plugin in plugin_manager.all_plugins:
        plugin_folder = os.path.join(PLUGINS_FOLDER, plugin)
        translations_folder = os.path.join(plugin_folder, "translations")
        subprocess.call(["pybabel", "compile", "-d", translations_folder])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号