Update of /cvsroot/mailman/mailman/cron
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30295
Modified Files:
Tag: Release_2_1-maint
mailpasswds
Log Message:
i18n minor bug fix.
Index: mailpasswds
===================================================================
RCS file: /cvsroot/mailman/mailman/cron/mailpasswds,v
retrieving revision 2.13.2.3
retrieving revision 2.13.2.4
diff -u -d -r2.13.2.3 -r2.13.2.4
--- mailpasswds 22 Sep 2003 02:29:51 -0000 2.13.2.3
+++ mailpasswds 7 Nov 2004 11:58:42 -0000 2.13.2.4
@@ -193,9 +193,6 @@
poplang = lang
langcnt = cnt
enc = Utils.GetCharSet(poplang)
- # Craft the table header
- header = '%-40s %-10s\n%-40s %-10s' % (
- _('List'), _('Password // URL'), '----', '--------')
# Now we're finally ready to send the email!
siteowner = Utils.get_site_email(host, 'owner')
sitereq = Utils.get_site_email(host, 'request')
@@ -210,16 +207,22 @@
# Coerce everything to Unicode
text = tounicode(text, enc)
table = [tounicode(_t, enc) for _t in table]
- # Add the table to the end so it doesn't get wrapped/filled
- text += (header + '\n' + NL.join(table))
# Translate the message and headers to user's suggested lang
otrans = i18n.get_translation()
try:
i18n.set_language(poplang)
+ # Craft table header after language was set
+ header = '%-40s %-10s\n%-40s %-10s' % (
+ _('List'), _('Password // URL'), '----', '--------')
+ header = tounicode(header, enc)
+ # Add the table to the end so it doesn't get wrapped/filled
+ text += (header + '\n' + NL.join(table))
msg = Message.UserNotification(
addr, siteowner,
_('%(host)s mailing list memberships reminder'),
- text, poplang)
+ text.encode(enc), poplang)
+ # Note that text must be encoded into 'enc' because unicode
+ # cause error within email module in some language (Japanese).
finally:
i18n.set_translation(otrans)
msg['X-No-Archive'] = 'yes'
_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org