def translate_month(key):
    """The month value can take weird forms. Sometimes, it's given as an int, sometimes
    as a string representing an int, and sometimes the name of the month is spelled out.
    Try to handle most of this here.
    """
    months = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep',
        'oct', 'nov', 'dec']
    try:
        return months[int(key) - 1]
    except (TypeError, ValueError):
        pass
    strings = []
    for k in key.split('-'):
        month = k[:3].lower()
        if month in months:
            strings.append(month)
        else:
            print("Unknown month value '{}'. Skipping.".format(key))
            return None
    return ' # "-" # '.join(strings)
