# HG changeset patch # User Charles Hébert # Date 1261145274 -3600 # Node ID a85db6fa98141785e2d9264d80b2bce6d74de611 # Parent e6d936eef7aaa79c8ae6e846cf4d2751accc3977 [mq]: plural_display_name_fix diff -r e6d936eef7aa -r a85db6fa9814 web/views/startup.py --- a/web/views/startup.py Fri Dec 18 15:07:26 2009 +0100 +++ b/web/views/startup.py Fri Dec 18 15:07:54 2009 +0100 @@ -133,7 +133,11 @@ if eschema.final or not eschema.may_have_permission('read', req): continue etype = eschema.type - label = display_name(req, etype, 'plural') + nb = req.execute('Any COUNT(X) WHERE X is %s' % etype)[0][0] + if nb > 1: + label = display_name(req, etype, 'plural') + else: + label = display_name(req, etype) nb = req.execute('Any COUNT(X) WHERE X is %s' % etype)[0][0] url = self._cw.build_url(etype) etypelink = u' %s (%d)' % (