Changeset - 3078f33e13d3
[Not reviewed]
default
0 1 0
Mads Kiilerich - 11 years ago 2015-02-11 02:40:28
madski@unity3d.com
notification: handle unicode translations (Issue #95)

Would fail with localization after 8e1491a7e3af.
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/model/notification.py
Show inline comments
 
@@ -35,6 +35,7 @@ from sqlalchemy.orm import joinedload, s
 

	
 
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 @@ class EmailNotificationModel(BaseModel):
 
        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
0 comments (0 inline, 0 general)