Skip to content

Commit

Permalink
Merge branch 'master' into bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Oct 13, 2014
2 parents 46799ab + 70eeade commit d7fc93d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 0 additions & 2 deletions weblate/html/language.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
<div class="panel-heading"><h4 class="panel-title">{% trans "Projects" %}</h4></div>
<div class="panel-body">

{% with object.translation_set.enabled as translations %}
{% include "list-translations.html" %}
{% endwith %}

</div>
</div>
Expand Down
9 changes: 6 additions & 3 deletions weblate/lang/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ def show_language(request, lang):
dicts = Dictionary.objects.filter(
language=obj
).values_list('project', flat=True).distinct()
projects = Project.objects.all_acl(request.user)
translations = obj.translation_set.enabled().filter(
subproject__project__in=projects
)

return render(
request,
Expand All @@ -56,8 +60,7 @@ def show_language(request, lang):
'rss-language', kwargs={'lang': obj.code}
),
'last_changes_url': urlencode({'lang': obj.code}),
'dicts': Project.objects.all_acl(request.user).filter(
id__in=dicts
),
'dicts': projects.filter(id__in=dicts),
'translations': translations,
}
)

0 comments on commit d7fc93d

Please sign in to comment.