def validate_log_translations(logical_line, physical_line, filename):
    if (('manila/tests' in filename) or ('manila_tempest_tests' in filename) or ('contrib/tempest' in filename)):
        return
    if pep8.noqa(physical_line):
        return
    msg = 'M327: LOG.critical messages require translations `_LC()`!'
    if log_translation_LC.match(logical_line):
        (yield (0, msg))
    msg = 'M328: LOG.error and LOG.exception messages require translations `_LE()`!'
    if log_translation_LE.match(logical_line):
        (yield (0, msg))
    msg = 'M329: LOG.info messages require translations `_LI()`!'
    if log_translation_LI.match(logical_line):
        (yield (0, msg))
    msg = 'M330: LOG.warning messages require translations `_LW()`!'
    if log_translation_LW.match(logical_line):
        (yield (0, msg))
    msg = 'M331: Log messages require translations!'
    if log_translation.match(logical_line):
        (yield (0, msg))
def validate_log_translations(logical_line, physical_line, filename):
    if (('manila/tests' in filename) or ('manila_tempest_tests' in filename) or ('contrib/tempest' in filename)):
        return
    if pep8.noqa(physical_line):
        return
    msg = 'M327: LOG.critical messages require translations `_LC()`!'
    if log_translation_LC.match(logical_line):
        (yield (0, msg))
    msg = 'M328: LOG.error and LOG.exception messages require translations `_LE()`!'
    if log_translation_LE.match(logical_line):
        (yield (0, msg))
    msg = 'M329: LOG.info messages require translations `_LI()`!'
    if log_translation_LI.match(logical_line):
        (yield (0, msg))
    msg = 'M330: LOG.warning messages require translations `_LW()`!'
    if log_translation_LW.match(logical_line):
        (yield (0, msg))
    msg = 'M331: Log messages require translations!'
    if log_translation.match(logical_line):
        (yield (0, msg))