make it possible to translate formdata title ("%s #%s") (#2626)
This commit is contained in:
parent
60b0b6ded0
commit
aed2421073
|
@ -384,8 +384,10 @@ class JsonDirectory(Directory):
|
|||
|
||||
get_response().set_content_type('application/json')
|
||||
|
||||
return json.dumps([{'title': '%s #%s' % (x.formdef.name, x.id), 'url': x.get_url()} \
|
||||
for x in user_forms])
|
||||
return json.dumps([{'title': _('%(name)s #%(id)s') % {
|
||||
'name': x.formdef.name,
|
||||
'id': x.id},
|
||||
'url': x.get_url()} for x in user_forms])
|
||||
|
||||
|
||||
class MyspaceDirectory(Directory):
|
||||
|
|
Reference in New Issue