diff options
| author | Barry Warsaw | 2016-07-16 15:44:07 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2016-07-16 15:44:07 -0400 |
| commit | dbde6231ec897379ed38ed4cd015b8ab20ed5fa1 (patch) | |
| tree | 1226d06a238314262a1d04d0bbf9c4dc0b72c309 /src/mailman/commands/cli_lists.py | |
| parent | 3387791beb7112dbe07664041f117fdcc20df53d (diff) | |
| download | mailman-dbde6231ec897379ed38ed4cd015b8ab20ed5fa1.tar.gz mailman-dbde6231ec897379ed38ed4cd015b8ab20ed5fa1.tar.zst mailman-dbde6231ec897379ed38ed4cd015b8ab20ed5fa1.zip | |
Diffstat (limited to 'src/mailman/commands/cli_lists.py')
| -rw-r--r-- | src/mailman/commands/cli_lists.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mailman/commands/cli_lists.py b/src/mailman/commands/cli_lists.py index 352accab2..9813da29c 100644 --- a/src/mailman/commands/cli_lists.py +++ b/src/mailman/commands/cli_lists.py @@ -30,7 +30,8 @@ from mailman.interfaces.domain import ( BadDomainSpecificationError, IDomainManager) from mailman.interfaces.languages import ILanguageManager from mailman.interfaces.listmanager import IListManager, ListAlreadyExistsError -from mailman.utilities.i18n import make +from mailman.interfaces.template import ITemplateLoader +from mailman.utilities.string import expand, wrap from zope.component import getUtility from zope.interface import implementer @@ -221,14 +222,13 @@ class Create: if not args.quiet: print(_('Created mailing list: $mlist.fqdn_listname')) if args.notify: - d = dict( - listname = mlist.fqdn_listname, # noqa - admin_url = mlist.script_url('admin'), # noqa - listinfo_url = mlist.script_url('listinfo'), # noqa - requestaddr = mlist.request_address, # noqa - siteowner = mlist.no_reply_address, # noqa - ) - text = make('newlist.txt', mailing_list=mlist, **d) + template = getUtility(ITemplateLoader).get( + 'domain:admin:notice:new-list', mlist) + text = wrap(expand(template, mlist, dict( + # For backward compatibility. + requestaddr=mlist.request_address, + siteowner=mlist.no_reply_address, + ))) # Set the I18N language to the list's preferred language so the # header will match the template language. Stashing and restoring # the old translation context is just (healthy? :) paranoia. |
