diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-01-02 11:26:07 +0100 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-01-02 11:26:07 +0100 |
commit | fdc8d24c941681f344f999cbb8266e275760db1c (patch) | |
tree | 5b73e362f95db2dfee2badc55bfa041ac22399fe /source/utils.py | |
parent | Numbers are printed with commas as thousands separators. (diff) | |
download | newspipe-fdc8d24c941681f344f999cbb8266e275760db1c.tar.gz newspipe-fdc8d24c941681f344f999cbb8266e275760db1c.tar.bz2 newspipe-fdc8d24c941681f344f999cbb8266e275760db1c.zip |
Numbers are printed with commas as thousands separators without taking into account the locale of the system.
Diffstat (limited to 'source/utils.py')
-rwxr-xr-x | source/utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/utils.py b/source/utils.py index fea123b4..9994c006 100755 --- a/source/utils.py +++ b/source/utils.py @@ -134,15 +134,15 @@ def tag_cloud(tags, query="word_count"): if query == "word_count": # tags cloud from the management page return ' '.join([('<font size=%d><a href="/search/?query=%s" title="Count: %s">%s</a></font>\n' % \ - (min(1 + count * 7 / max([tag[1] for tag in tags]), 7), word, count, word)) \ + (min(1 + count * 7 / max([tag[1] for tag in tags]), 7), word, format(count, ',d'), word)) \ for (word, count) in tags]) if query == "year": # tags cloud for the history return ' '.join([('<font size=%d><a href="/history/?query=%s:%s" title="Count: %s">%s</a></font>\n' % \ - (min(1 + count * 7 / max([tag[1] for tag in tags]), 7), query, word, count, word)) \ + (min(1 + count * 7 / max([tag[1] for tag in tags]), 7), query, word, format(count, ',d'), word)) \ for (word, count) in tags]) return ' '.join([('<font size=%d><a href="/history/?query=%s:%s" title="Count: %s">%s</a></font>\n' % \ - (min(1 + count * 7 / max([tag[1] for tag in tags]), 7), query, word, count, calendar.month_name[int(word)])) \ + (min(1 + count * 7 / max([tag[1] for tag in tags]), 7), query, word, format(count, ',d'), calendar.month_name[int(word)])) \ for (word, count) in tags]) def send_mail(mfrom, mto, feed_title, article_title, description): |