Increase precision of sorting in generate-statistics-html.py.

Fix by Emdek, closes #3519.

Also remove unneeded "import os".
master
cybersphinx 2012-06-02 16:58:59 +02:00
parent b6c77bd603
commit 2228e80198
1 changed files with 1 additions and 2 deletions

View File

@ -18,7 +18,6 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import glob
import os
import re
import subprocess
@ -58,7 +57,7 @@ for i in glob.glob('*.po'):
percents['untranslated'] = (0 if messages['untranslated'] == 0 else (float(messages['untranslated']) / messages['amount']));
percents['translated'] = (1 - percents['fuzzy'] - percents['untranslated']);
catalog = '%5d%s' % (((1 - percents['translated']) * 1000), i)
catalog = '%6d%s' % (((1 - percents['translated']) * 10000), i)
catalogs[catalog] = '<li class="' + ('translation_complete' if percents['translated'] >= 0.9 else ('translation_unfinished' if percents['translated'] >= 0.8 else 'translation_incomplete')) + '">\n<span class="messages_translated" style="width: ' + str(width) + 'px" title="' + output.rstrip()[0:-1] + '">\n'