def configure_coverage(app):
<EOL>app.config['<STR_LIT>'] = True if app.debug else False<EOL>if chanjo_api:<EOL><INDENT>chanjo_api.init_app(app)<EOL>configure_template_filters(app)<EOL>app.register_blueprint(report_bp, url_prefix='<STR_LIT>')<EOL><DEDENT>babel = Babel(app)<EOL>@babel.localeselector<EOL>def get_locale():<EOL><INDENT>"""<STR_LIT>"""<EOL>accept_languages = current_app.config.get('<STR_LIT>', ['<STR_LIT>'])<EOL>session_language = request.args.get('<STR_LIT>')<EOL>if session_language in accept_languages:<EOL><INDENT>current_app.logger.info("<STR_LIT>", session_language)<EOL>return session_language<EOL><DEDENT>user_language = current_app.config.get('<STR_LIT>')<EOL>if user_language:<EOL><INDENT>return user_language<EOL><DEDENT>return request.accept_languages.best_match(accept_languages)<EOL><DEDENT>
Setup coverage related extensions.