sort custom emails and texts on their *translated* description
This commit is contained in:
parent
0f952b0277
commit
929edd6484
|
@ -87,8 +87,8 @@ class EmailsDirectory(Directory):
|
|||
'<ul>'
|
||||
'<li><a href="options">%s</a></li>' % _('General Options')
|
||||
keys = self.emails_dict.keys()
|
||||
keys.sort(lambda x,y: cmp(self.emails_dict[x]['description'],
|
||||
self.emails_dict[y]['description']))
|
||||
keys.sort(lambda x,y: cmp(_(self.emails_dict[x]['description']),
|
||||
_(self.emails_dict[y]['description'])))
|
||||
for email_key in keys:
|
||||
email_values = self.emails_dict[email_key]
|
||||
'<li><a href="%s">%s %s</a></li>' % (email_key,
|
||||
|
|
|
@ -50,8 +50,8 @@ class TextsDirectory(Directory):
|
|||
|
||||
'<ul>'
|
||||
keys = self.texts_dict.keys()
|
||||
keys.sort(lambda x,y: cmp(self.texts_dict[x]['description'],
|
||||
self.texts_dict[y]['description']))
|
||||
keys.sort(lambda x,y: cmp(_(self.texts_dict[x]['description']),
|
||||
_(self.texts_dict[y]['description'])))
|
||||
for text_key in keys:
|
||||
text_values = self.texts_dict[text_key]
|
||||
'<li><a href="%s">%s %s</a></li>' % (text_key,
|
||||
|
|
Loading…
Reference in New Issue