def get_state_css(unit):
    """Return state flags."""
    flags = []
    if unit.fuzzy:
        flags.append('state-need-edit')
    elif not unit.translated:
        flags.append('state-empty')
    elif unit.readonly:
        flags.append('state-readonly')
    elif unit.approved:
        flags.append('state-approved')
    elif unit.translated:
        flags.append('state-translated')
    if unit.has_failing_check:
        flags.append('state-alert')
    if unit.has_comment:
        flags.append('state-comment')
    if unit.has_suggestion:
        flags.append('state-suggest')
    return flags
