changeset 3033:6d9bdb12163f

stats.languages: small fix (Thanks to Nina Kuisma) (port from 1.6)
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 03 Feb 2008 20:23:53 +0100
parents c242772754c5
children d0d9fbc0f0ee
files MoinMoin/stats/languages.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/stats/languages.py	Sun Feb 03 20:22:23 2008 +0100
+++ b/MoinMoin/stats/languages.py	Sun Feb 03 20:23:53 2008 +0100
@@ -67,12 +67,12 @@
         for cnt, lang in data:
             try:
                 if lang == u'browser':
-                    languages.addRow((browserlang, "%(percent).2f (%(count)s)" % {
+                    languages.addRow((browserlang, "%(percent).2f%% (%(count)d)" % {
                         'percent': 100.0 * cnt / sum,
                         'count': cnt}))
                 else:
                     lang = i18n.wikiLanguages()[lang]['x-language-in-english']
-                    languages.addRow((lang, "%(percent).2f (%(count)s)" % {
+                    languages.addRow((lang, "%(percent).2f%% (%(count)d)" % {
                         'percent': 100.0 * cnt / sum,
                         'count': cnt}))
                 cnt_printed += cnt
@@ -82,7 +82,9 @@
         languages.addRow((browserlang, "100% (1)"))
 
     if sum > cnt_printed:
-        languages.addRow((_('Others', formatted=False), "%.2f" % (100 * (sum - cnt_printed) / sum)))
+        languages.addRow((_('Others', formatted=False), "%(percent).2f%% (%(count)d)" % {
+            'percent': 100.0 * (sum - cnt_printed) / sum,
+            'count': sum - cnt_printed}))
 
     table = DataBrowserWidget(request)
     table.setData(languages)