Commit 5e263c6ecacbbbee2c9658049ea8da6ab531c96e

Authored by Marco
1 parent 212286ef

Fixing chart's translation

Showing 1 changed file with 6 additions and 3 deletions   Show diff stats
src/home/views.py
@@ -24,19 +24,22 @@ def index(request): @@ -24,19 +24,22 @@ def index(request):
24 if count_types is None: 24 if count_types is None:
25 count_types = OrderedDict() 25 count_types = OrderedDict()
26 for type in ['thread', 'changeset', 'attachment']: 26 for type in ['thread', 'changeset', 'attachment']:
27 - count_types[trans(type)] = SearchQuerySet().filter( 27 + count_types[type] = SearchQuerySet().filter(
28 type=type, 28 type=type,
29 ).count() 29 ).count()
30 30
31 - count_types[trans('ticket')] = sum([ 31 + count_types['ticket'] = sum([
32 ticket.count for ticket in TicketCollabCount.objects.all() 32 ticket.count for ticket in TicketCollabCount.objects.all()
33 ]) 33 ])
34 34
35 - count_types[trans('wiki')] = sum([ 35 + count_types['wiki'] = sum([
36 wiki.count for wiki in WikiCollabCount.objects.all() 36 wiki.count for wiki in WikiCollabCount.objects.all()
37 ]) 37 ])
38 cache.set('home_chart', count_types) 38 cache.set('home_chart', count_types)
39 39
  40 + for key in count_types.keys():
  41 + count_types[trans(key)] = count_types.pop(key)
  42 +
40 context = { 43 context = {
41 'hottest_threads': hottest_threads[:6], 44 'hottest_threads': hottest_threads[:6],
42 'latest_threads': latest_threads, 45 'latest_threads': latest_threads,