def create_app(self): return create_app('testing')
import sys from babel.messages.frontend import CommandLineInterface import click from biblat_manager.config import settings COV = None if os.environ.get('FLASK_COVERAGE'): import coverage COV = coverage.coverage(branch=True, include='biblat_manager/webapp/*') COV.start() from biblat_manager.webapp import create_app, models, controllers, utils # NOQA app = create_app(os.getenv('BIBLAT_CONFIG', 'default')) # Comandos para i18n @app.cli.command() def make_messages(): """ Escanea biblat_manager/webapp buscando strings traducible y el resultado lo almacena en: biblat_manager/webapp/translations/messages.pot """ args = [ 'pybabel', 'extract', '-F', 'biblat_manager/config/babel.cfg', '-k', 'lazy_gettext', '-k', '__', '-o', 'biblat_manager/webapp/translations/messages.pot', '.' ] return CommandLineInterface().run(args)