def potfile():
"""
Updates Transpyler lib main potfile.
You probably has little use for this command unless you are a Transpyler
developer.
"""
from transpyler.translate import L10N_PATH
from transpyler.utils import collect_mod_namespace
from transpyler.translate import extract_translations
from transpyler.translate import create_pot_file
click.echo('Updating transpyler.pot file...', nl=False)
path = os.path.join(L10N_PATH, 'transpyler.pot')
names = collect_mod_namespace()
translations = extract_translations(names)
create_pot_file(translations, path)
click.echo(' Done!')
评论列表
文章目录