mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-08 06:14:47 +03:00
Marked OrderingFilter's order labels for translation.
This commit is contained in:
parent
dff5f80592
commit
f6a475bfe9
|
@ -271,8 +271,8 @@ class OrderingFilter(BaseFilterBackend):
|
|||
current = None if current is None else current[0]
|
||||
options = []
|
||||
for key, label in self.get_valid_fields(queryset, view):
|
||||
options.append((key, '%s - ascending' % label))
|
||||
options.append(('-' + key, '%s - descending' % label))
|
||||
options.append((key, '%s - %s' % (label, _('ascending'))))
|
||||
options.append(('-' + key, '%s - %s' % (label, _('descending'))))
|
||||
return {
|
||||
'request': request,
|
||||
'current': current,
|
||||
|
|
Loading…
Reference in New Issue
Block a user