make it possible to translate formdata title ("%s #%s") (#2626)

This commit is contained in:
Frédéric Péters 2013-03-27 13:41:25 +01:00
parent 60b0b6ded0
commit aed2421073
1 changed files with 4 additions and 2 deletions

View File

@ -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):