def value_quality(value):
    """Calculate value quality."""
    if not value:
        return 0
    if '[translate me]' in value:
        return 1
    if '[auto]' in value:
        return 2
    return 3
