def _get_checker(self): checkerclasses = [ checks.projectcheckers.get(self.project.checkstyle, checks.StandardChecker), checks.StandardUnitChecker ] return checks.TeeChecker(checkerclasses=checkerclasses, errorhandler=self.filtererrorhandler, languagecode=self.language.code)
def _get_checker(self): from translate.filters import checks checkerclasses = [checks.projectcheckers.get(self.project.checkstyle, checks.StandardChecker), checks.StandardUnitChecker] return checks.TeeChecker(checkerclasses=checkerclasses, excludefilters=['hassuggestion'], errorhandler=self.filtererrorhandler, languagecode=self.language.code)
def checker(self): from translate.filters import checks checkerclasses = [ checks.projectcheckers.get(self.project.checkstyle, checks.StandardChecker) ] return checks.TeeChecker(checkerclasses=checkerclasses, excludefilters=EXCLUDED_FILTERS, errorhandler=self.filtererrorhandler, languagecode=self.language.code)
def checker(self): from translate.filters import checks # We do not use default Translate Toolkit checkers; instead use # our own one checkerclasses = [ENChecker] return checks.TeeChecker(checkerclasses=checkerclasses, excludefilters=excluded_filters, errorhandler=self.filtererrorhandler, languagecode=self.language.code)
def __init__(self, options, checkerclasses=None, checkerconfig=None): # excludefilters={}, limitfilters=None, includefuzzy=True, includereview=True, autocorrect=False): """Builds a checkfilter using the given checker (a list is allowed too)""" if checkerclasses is None: checkerclasses = [checks.StandardChecker, checks.StandardUnitChecker] self.checker = checks.TeeChecker(checkerconfig=checkerconfig, excludefilters=options.excludefilters, limitfilters=options.limitfilters, checkerclasses=checkerclasses, languagecode=checkerconfig.targetlanguage) self.options = options
def checker(self): from translate.filters import checks # We do not use default Translate Toolkit checkers; instead use # our own one if settings.POOTLE_QUALITY_CHECKER: from pootle_misc.util import import_func checkerclasses = [import_func(settings.POOTLE_QUALITY_CHECKER)] else: checkerclasses = [ checks.projectcheckers.get(self.project.checkstyle, checks.StandardUnitChecker) ] return checks.TeeChecker(checkerclasses=checkerclasses, excludefilters=excluded_filters, errorhandler=self.filtererrorhandler, languagecode=self.language.code)