def short_language_code(code=None):
    if code is None:
        code = translation.get_language()

    pos = code.find('-')
    if pos > -1:
        return code[:pos]
    return code
Log error and then send it.
dataset/ETHPy150Open feincms/feincms/feincms/translations.py/short_language_code--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/spread/pb.py/Broker._sendFailure