From 8938d65327611dded72c7876ffe52e4d4d12ce76 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 10 Dec 2009 22:32:25 -0500 Subject: * Refactor the language manager off of the config object and into a utility. * Fix a few small typos in exception handlers. * Move the initialization of the Zope Component Architecture into the first initialization step. The only reason we couldn't do that previously was because the domain object referenced the config, causing a circularity problem. Refactor the Domain implementation to avoid that. --- src/mailman/chains/hold.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mailman/chains/hold.py') diff --git a/src/mailman/chains/hold.py b/src/mailman/chains/hold.py index 32e2ce0b3..2726535d1 100644 --- a/src/mailman/chains/hold.py +++ b/src/mailman/chains/hold.py @@ -41,6 +41,7 @@ from mailman.config import config from mailman.core.i18n import _ from mailman.email.message import UserNotification from mailman.interfaces.autorespond import IAutoResponseSet, Response +from mailman.interfaces.languages import ILanguageManager from mailman.interfaces.pending import IPendable, IPendings from mailman.interfaces.usermanager import IUserManager @@ -189,8 +190,9 @@ class HoldChain(TerminalChainBase): text = maketext('postheld.txt', substitutions, lang=send_language_code, mlist=mlist) adminaddr = mlist.bounces_address - nmsg = UserNotification(msg.sender, adminaddr, subject, text, - config.languages[send_language_code]) + nmsg = UserNotification( + msg.sender, adminaddr, subject, text, + getUtility(ILanguageManager)[send_language_code]) nmsg.send(mlist) # Now the message for the list moderators. This one should appear to # come from -owner since we really don't need to do bounce -- cgit v1.2.3-70-g09d2