From 5e263c6ecacbbbee2c9658049ea8da6ab531c96e Mon Sep 17 00:00:00 2001 From: Marco Rougeth Date: Wed, 7 May 2014 10:59:54 -0300 Subject: [PATCH] Fixing chart's translation --- src/home/views.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/home/views.py b/src/home/views.py index d204792..5ff89cf 100644 --- a/src/home/views.py +++ b/src/home/views.py @@ -24,19 +24,22 @@ def index(request): if count_types is None: count_types = OrderedDict() for type in ['thread', 'changeset', 'attachment']: - count_types[trans(type)] = SearchQuerySet().filter( + count_types[type] = SearchQuerySet().filter( type=type, ).count() - count_types[trans('ticket')] = sum([ + count_types['ticket'] = sum([ ticket.count for ticket in TicketCollabCount.objects.all() ]) - count_types[trans('wiki')] = sum([ + count_types['wiki'] = sum([ wiki.count for wiki in WikiCollabCount.objects.all() ]) cache.set('home_chart', count_types) + for key in count_types.keys(): + count_types[trans(key)] = count_types.pop(key) + context = { 'hottest_threads': hottest_threads[:6], 'latest_threads': latest_threads, -- libgit2 0.21.2