aboutsummaryrefslogtreecommitdiffstats
path: root/japanese/trac/files
diff options
context:
space:
mode:
authorkuriyama <kuriyama@FreeBSD.org>2007-03-04 21:11:55 +0800
committerkuriyama <kuriyama@FreeBSD.org>2007-03-04 21:11:55 +0800
commite7dfb88d0c020061b958eaf61735fc127acae47f (patch)
treeb479aaa8beedd14c218e87a6655f59c89d5b86b9 /japanese/trac/files
parent1cccb14143dc1b05fefd65a79a8ff4c833e63714 (diff)
downloadfreebsd-ports-gnome-e7dfb88d0c020061b958eaf61735fc127acae47f.tar.gz
freebsd-ports-gnome-e7dfb88d0c020061b958eaf61735fc127acae47f.tar.zst
freebsd-ports-gnome-e7dfb88d0c020061b958eaf61735fc127acae47f.zip
- Upgrade to 0.10.3-ja-1 [1].
- Integrate my local timezone patch as non-optional, but not activated until "[notification] local_timezone = true" set. PR: ports/109242 [1] Submitted by: TAKATSU Tomonari <tota@rtfm.jp> [1]
Diffstat (limited to 'japanese/trac/files')
-rw-r--r--japanese/trac/files/extra-patch-Notify.py11
-rw-r--r--japanese/trac/files/patch-Notify.py32
-rw-r--r--japanese/trac/files/patch-db_default.py11
-rw-r--r--japanese/trac/files/patch-formatter.py11
-rw-r--r--japanese/trac/files/patch-notification.py35
5 files changed, 35 insertions, 65 deletions
diff --git a/japanese/trac/files/extra-patch-Notify.py b/japanese/trac/files/extra-patch-Notify.py
deleted file mode 100644
index 5e7d1e044d10..000000000000
--- a/japanese/trac/files/extra-patch-Notify.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- trac/Notify.py.orig2 Tue Aug 22 19:47:42 2006
-+++ trac/Notify.py Tue Aug 22 19:48:00 2006
-@@ -139,7 +139,7 @@
- msg['Sender'] = self.from_email
- msg['Reply-To'] = self.replyto_email
- msg['To'] = rcpt
-- msg['Date'] = formatdate()
-+ msg['Date'] = formatdate(time.time(), self.config.getbool('notification', 'local_timezone'))
- for hdr in mime_headers.keys():
- msg[hdr] = mime_headers[hdr]
- self.env.log.debug("Sending SMTP notification to %s on port %d"
diff --git a/japanese/trac/files/patch-Notify.py b/japanese/trac/files/patch-Notify.py
deleted file mode 100644
index 0bd01259038a..000000000000
--- a/japanese/trac/files/patch-Notify.py
+++ /dev/null
@@ -1,32 +0,0 @@
---- 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_esc = string.replace(unicode(body, 'utf-8'), u'\uff5e', u'\u301c').replace(u'\u2225', u'\u2016').replace(u'\uff0d', u'\u2212')
-+ 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__
- projname = self.config.get('project','name')
- msg['X-Trac-Project'] = projname
- msg['X-URL'] = self.config.get('project','url')
-- msg['Subject'] = Header(self.subject, 'utf-8')
-+ subj = unicode(self.subject, 'utf-8')
-+ subj_esc = string.replace(subj, u'\uff5e', u'\u301c').replace(u'\u2225', u'\u2016').replace(u'\uff0d', u'\u2212')
-+ 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
diff --git a/japanese/trac/files/patch-db_default.py b/japanese/trac/files/patch-db_default.py
deleted file mode 100644
index 51b4d26243ac..000000000000
--- a/japanese/trac/files/patch-db_default.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- trac/db_default.py.orig Sat Jul 8 08:40:03 2006
-+++ trac/db_default.py Sat Jul 8 08:40:05 2006
-@@ -385,7 +385,7 @@
- (('trac', 'repository_dir', ''),
- ('trac', 'templates_dir', default_dir('templates')),
- ('trac', 'database', 'sqlite:db/trac.db'),
-- ('trac', 'default_charset', 'iso-8859-15'),
-+ ('trac', 'default_charset', 'utf-8'),
- ('trac', 'default_handler', 'WikiModule'),
- ('trac', 'check_auth_ip', 'true'),
- ('trac', 'ignore_auth_case', 'false'),
diff --git a/japanese/trac/files/patch-formatter.py b/japanese/trac/files/patch-formatter.py
deleted file mode 100644
index 1d73a2ad43ac..000000000000
--- a/japanese/trac/files/patch-formatter.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- trac/wiki/formatter.py.orig Thu Aug 24 12:45:42 2006
-+++ trac/wiki/formatter.py Thu Aug 24 12:46:01 2006
-@@ -307,7 +307,7 @@
- return '<img src="%s" alt="%s" />' % (url, title or text)
- if not url.startswith(self._local):
- return '<a class="ext-link" href="%s"%s><span class="icon">' \
-- '</span>%s</a>' % (url, title_attr, text)
-+ '%s</span></a>' % (url, title_attr, text)
- else:
- return '<a href="%s"%s>%s</a>' % (url, title_attr, text)
-
diff --git a/japanese/trac/files/patch-notification.py b/japanese/trac/files/patch-notification.py
new file mode 100644
index 000000000000..74841dd648da
--- /dev/null
+++ b/japanese/trac/files/patch-notification.py
@@ -0,0 +1,35 @@
+--- ./trac/notification.py.orig Sun Mar 4 18:14:39 2007
++++ ./trac/notification.py Sun Mar 4 21:58:03 2007
+@@ -225,6 +225,13 @@
+ tmp = name.encode('ascii')
+ header = Header(tmp, 'ascii', maxlinelen=maxlength)
+ except UnicodeEncodeError:
++ if self.env.config.get('notification', 'mime_encoding').lower() == 'none':
++ try:
++ tmp = name.encode('iso-2022-jp')
++ header = Header(tmp, 'iso-2022-jp', maxlinelen=maxlength)
++ except UnicodeEncodeError:
++ pass
++ if not header:
+ header = Header(name, self._charset, maxlinelen=maxlength)
+ if not email:
+ return header
+@@ -343,12 +350,17 @@
+ headers['To'] = ', '.join(toaddrs)
+ if pcc:
+ headers['Cc'] = ', '.join(pcc)
+- headers['Date'] = formatdate()
++ headers['Date'] = formatdate(time.time(), self.config.getbool('notification', 'local_timezone'))
+ # sanity check
+ if not self._charset.body_encoding:
+ try:
+ dummy = body.encode('ascii')
+ except UnicodeDecodeError:
++ try:
++ dummy = unicode(body, 'utf8');
++ body = dummy.encode('iso-2022-jp')
++ self._charset.output_charset = 'iso-2022-jp'
++ except UnicodeDecodeError:
+ raise TracError, "Ticket contains non-Ascii chars. " \
+ "Please change encoding setting"
+ msg = MIMEText(body, 'plain')