Mercurial > kallithea
changeset 4805:3078f33e13d3
notification: handle unicode translations (Issue #95)
Would fail with localization after 8e1491a7e3af.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 11 Feb 2015 02:40:28 +0100 |
parents | 5923d7474287 |
children | ddfb998e3898 |
files | kallithea/model/notification.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/model/notification.py Fri Feb 06 03:35:40 2015 +0100 +++ b/kallithea/model/notification.py Wed Feb 11 02:40:28 2015 +0100 @@ -35,6 +35,7 @@ import kallithea from kallithea.lib import helpers as h +from kallithea.lib.utils2 import safe_unicode from kallithea.model import BaseModel from kallithea.model.db import Notification, User, UserNotification from kallithea.model.meta import Session @@ -302,7 +303,7 @@ except KeyError, e: log.error('error generating email subject for %r from %s: %s', type_, ','.join(self._subj_map.keys()), e) raise - l = [str(x) for x in [kwargs.get('status_change'), kwargs.get('closing_pr') and _('Closing')] if x] + l = [safe_unicode(x) for x in [kwargs.get('status_change'), kwargs.get('closing_pr') and _('Closing')] if x] if l: subj += ' (%s)' % (', '.join(l)) return subj