<commit_before>from flask_babelex import Domain
from flask_security import translations


class CustomDomain(Domain):
    def __init__(self):
        super(CustomDomain, self).__init__(
            translations.__path__[0], domain='security')

domain = CustomDomain()

gettext = domain.gettext
ngettext = domain.ngettext
lazy_gettext = domain.lazy_gettext

try:
    from wtforms.i18n import messages_path
except ImportError:
    from wtforms.ext.i18n.utils import messages_path

wtforms_domain = Domain(messages_path(), domain='wtforms')


class Translations(object):
    ''' Fixes WTForms translation support and uses wtforms translations '''

    def gettext(self, string):
        return wtforms_domain.gettext(string)<commit_msg>Coverall fix<commit_after>from flask_babelex import Domain
from flask_security import translations


class CustomDomain(Domain):
    def __init__(self):
        super(CustomDomain, self).__init__(
            translations.__path__[0], domain='security')

domain = CustomDomain()

gettext = domain.gettext
ngettext = domain.ngettext
lazy_gettext = domain.lazy_gettext

from wtforms.i18n import messages_path

wtforms_domain = Domain(messages_path(), domain='wtforms')


class Translations(object):
    ''' Fixes WTForms translation support and uses wtforms translations '''

    def gettext(self, string):
        return wtforms_domain.gettext(string)
{'fraction_non_alphanumeric': 0.08604483007953724, 'fraction_numerical': 0.005784526391901663, 'mean_word_length': 4.864406779661017, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '776490', 'n_tokens_mistral': 428, 'n_tokens_neox': 391, 'n_words': 99}