diff options
author | Jun Kuriyama <kuriyama@FreeBSD.org> | 2006-05-24 07:30:14 +0000 |
---|---|---|
committer | Jun Kuriyama <kuriyama@FreeBSD.org> | 2006-05-24 07:30:14 +0000 |
commit | ef700029d72fdbe5919abad616974f736bad2154 (patch) | |
tree | 1343622d2dc495da2e44017d5929d17fac1f7251 | |
parent | 4ea9382b734e478f6f4c0bcc33f291ff9dff54a8 (diff) | |
download | ports-ef700029d72fdbe5919abad616974f736bad2154.tar.gz ports-ef700029d72fdbe5919abad616974f736bad2154.zip |
Notes
-rw-r--r-- | japanese/trac/Makefile | 1 | ||||
-rw-r--r-- | japanese/trac/files/patch-Notify.py | 21 |
2 files changed, 17 insertions, 5 deletions
diff --git a/japanese/trac/Makefile b/japanese/trac/Makefile index e6264ba61115..d6269bc58474 100644 --- a/japanese/trac/Makefile +++ b/japanese/trac/Makefile @@ -7,6 +7,7 @@ PORTNAME= trac PORTVERSION= 0.9.5 +PORTREVISION= 1 CATEGORIES= japanese www devel python MASTER_SITES= http://dist.bsdlab.org/ \ http://www.i-act.co.jp/project/products/downloads/ diff --git a/japanese/trac/files/patch-Notify.py b/japanese/trac/files/patch-Notify.py index ce2a7f04625b..56ea29d2cf0c 100644 --- a/japanese/trac/files/patch-Notify.py +++ b/japanese/trac/files/patch-Notify.py @@ -1,13 +1,22 @@ ---- trac/Notify.py.orig Thu Dec 15 23:47:03 2005 -+++ trac/Notify.py Thu Dec 15 23:48:21 2005 -@@ -124,15 +124,14 @@ +--- trac/Notify.py.orig Thu Feb 16 10:47:21 2006 ++++ trac/Notify.py Wed May 24 16:12:07 2006 +@@ -23,6 +23,7 @@ + import md5 + import time + import smtplib ++import string + + + class Notify: +@@ -123,15 +124,17 @@ from email.Header import Header from email.Utils import formatdate body = self.hdf.render(self.template_name) - msg = MIMEMultipart() - msg.attach(MIMEText(body, 'plain', 'utf-8')) - msg.epilogue = '' -+ body = unicode(body, 'utf-8').encode('japanese.c.iso-2022-jp') ++ body_esc = string.replace(unicode(body, 'utf-8'), u'\uff5e', u'\u301c') ++ body = body_esc.encode('japanese.c.iso-2022-jp') + msg = MIMEText(body, 'plain', 'iso-2022-jp') msg['X-Mailer'] = 'Trac %s, by Edgewall Software' % __version__ msg['X-Trac-Version'] = __version__ @@ -15,7 +24,9 @@ msg['X-Trac-Project'] = projname msg['X-URL'] = self.config.get('project','url') - msg['Subject'] = Header(self.subject, 'utf-8') -+ msg['Subject'] = Header(unicode(self.subject, 'utf-8').encode('japanese.c.iso-2022-jp'), 'iso-2022-jp') ++ subj = unicode(self.subject, 'utf-8') ++ subj_esc = string.replace(subj, u'\uff5e', u'\u301c') ++ msg['Subject'] = Header(subj_esc.encode('japanese.c.iso-2022-jp'), 'iso-2022-jp') msg['From'] = '%s <%s>' % (projname, self.from_email) msg['Sender'] = self.from_email msg['Reply-To'] = self.replyto_email |