- return _("%(user)s %(was_were)s awarded %(value)s reputation points: %(message)s") % {
- 'user': self.hyperlink(self.user.get_profile_url(), self.friendly_username(viewer, self.user)),
- 'was_were': self.viewer_or_user_verb(viewer, self.user, _('were'), _('was')),
- 'value': value, 'message': message
- }
+ try:
+ if int(value) > 0:
+ return _("%(user)s awarded an extra %(value)s reputation points to %(users)s: %(message)s") % {
+ 'user': self.hyperlink(self.user.get_profile_url(), self.friendly_username(viewer, self.user)),
+ 'value': value, 'users':self.affected_links(viewer), 'message': message
+ }
+ else:
+ return _("%(user)s penalised %(users)s in %(value)s reputation points: %(message)s") % {
+ 'user': self.hyperlink(self.user.get_profile_url(), self.friendly_username(viewer, self.user)),
+ 'value': value, 'users':self.affected_links(viewer), 'message': message
+ }
+ except Exception, e:
+ return ''