Commit 8cdcbd5a authored by Michal Čihař's avatar Michal Čihař

Round percentages even with Python 3

With Python 2 the calculation is automatically truncated to integer,
with Python 3 we need to round it.

Fixes #1055
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent f73d506a
......@@ -176,7 +176,7 @@ def translation_percent(translated, total):
'''
Returns translation percentage.
'''
return (1000 * translated / total) / 10.0
return round(1000 * translated / total) / 10.0
def add_configuration_error(name, message):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment