Commit 5e263c6ecacbbbee2c9658049ea8da6ab531c96e
1 parent
212286ef
Exists in
master
and in
39 other branches
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 | 24 | if count_types is None: |
25 | 25 | count_types = OrderedDict() |
26 | 26 | for type in ['thread', 'changeset', 'attachment']: |
27 | - count_types[trans(type)] = SearchQuerySet().filter( | |
27 | + count_types[type] = SearchQuerySet().filter( | |
28 | 28 | type=type, |
29 | 29 | ).count() |
30 | 30 | |
31 | - count_types[trans('ticket')] = sum([ | |
31 | + count_types['ticket'] = sum([ | |
32 | 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 | 36 | wiki.count for wiki in WikiCollabCount.objects.all() |
37 | 37 | ]) |
38 | 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 | 43 | context = { |
41 | 44 | 'hottest_threads': hottest_threads[:6], |
42 | 45 | 'latest_threads': latest_threads, | ... | ... |