$ungettext('1 hit', '%(count)s hits', response.num_found, count=commify(response.num_found))
$if q and response.error: $for line in response.error.splitlines(): $line $if not loop.last:$if q and not response.error:
-
$for doc in response.docs:
$ n = doc['name']
$ key = '/subjects/' + url_map.get(doc['subject_type'], '') + n.lower().replace(' ', '_').replace('?', '').replace(',', '').replace('/', '')
- $n $def render_type(subject_type): $if subject_type == "time": $_("time") $elif subject_type == "subject": $_("subject") $elif subject_type == "place": $_("place") $elif subject_type == "org": $_("org") $elif subject_type == "event": $_("event") $elif subject_type == "person": $_("person") $elif subject_type == "work": $_("work") $else: $doc['subject_type'] $ungettext('1 book', '%(count)d books', doc['work_count'], count=doc['work_count']), $:render_type(doc['subject_type'])