@register.inclusion_tag("resources/stats_bar_actions.html")
def stats_bar_actions(stat, width=100):
    """
    Create a HTML bar to present the statistics of an object.

    The object should have attributes trans_percent/untrans_percent.
    Accepts an optional parameter to specify the width of the total bar.
    """
    try:
        trans_percent = (stat.translated * 100 / stat.total)
    except ZeroDivisionError:
        trans_percent = 100
    untrans_percent = trans_percent - 100
    return {'untrans_percent': untrans_percent,
            'trans_percent': trans_percent,
            'pos': StatBarsPositions([('trans', trans_percent),
                                      ('untrans', untrans_percent)], width),
            'width':width}
dataset/ETHPy150Open rvanlaar/easy-transifex/src/transifex/transifex/resources/templatetags/statistics_resources.py/stats_bar_actions/swapped operands of `-`