0001-forms-fix-creation-of-captcha-answer-when-using-tran.patch
wcs/qommon/form.py | ||
---|---|---|
1610 | 1610 |
operator = random.choice([_('plus'), _('minus')]) |
1611 | 1611 |
else: |
1612 | 1612 |
operator = random.choice([_('times'), _('plus'), _('minus')]) |
1613 |
if operator == 'times':
|
|
1613 |
if operator == _('times'):
|
|
1614 | 1614 |
answer = a * b |
1615 |
elif operator == 'plus':
|
|
1615 |
elif operator == _('plus'):
|
|
1616 | 1616 |
answer = a + b |
1617 |
elif operator == 'minus':
|
|
1617 |
elif operator == _('minus'):
|
|
1618 | 1618 |
if b > a: |
1619 | 1619 |
a, b = b, a |
1620 | 1620 |
answer = a - b |
1621 |
- |