diff options
| author | Barry Warsaw | 2009-02-12 20:36:21 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2009-02-12 20:36:21 -0500 |
| commit | 62f4c909f90535986614a411db982bdcccaec3a1 (patch) | |
| tree | 2fe5dd3316cea73f63cb34230d848758050eade3 /src/mailman/bin/config_list.py | |
| parent | 2b28803e7165e91d812cd9e9e3804a6d9bdce8a1 (diff) | |
| download | mailman-62f4c909f90535986614a411db982bdcccaec3a1.tar.gz mailman-62f4c909f90535986614a411db982bdcccaec3a1.tar.zst mailman-62f4c909f90535986614a411db982bdcccaec3a1.zip | |
Much clean up of the language code, though more can be done. Factor out the
language manager stuff into a separate Language class, and be clearer in the
APIs about whether we want a language code or a Language instance.
The impetus to this was to get rid of Utils.GetCharSet(), which is done.
Diffstat (limited to 'src/mailman/bin/config_list.py')
| -rw-r--r-- | src/mailman/bin/config_list.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mailman/bin/config_list.py b/src/mailman/bin/config_list.py index a5cec9480..89a9892cd 100644 --- a/src/mailman/bin/config_list.py +++ b/src/mailman/bin/config_list.py @@ -20,10 +20,10 @@ import sys import time import optparse -from mailman import errors from mailman import MailList -from mailman import Utils +from mailman import errors from mailman import i18n +from mailman.Utils import wrap from mailman.configuration import config from mailman.version import MAILMAN_VERSION @@ -100,9 +100,8 @@ def do_output(listname, outfile, parser): except errors.MMListError: parser.error(_('No such list: $listname')) # Preamble for the config info. PEP 263 charset and capture time. - language = mlist.preferred_language - charset = Utils.GetCharSet(language) - i18n.set_language(language) + charset = mlist.preferred_language.charset + i18n.set_language(mlist.preferred_language.code) if not charset: charset = 'us-ascii' when = time.ctime(time.time()) @@ -132,7 +131,7 @@ def do_list_categories(mlist, k, subcat, outfp): label, gui = mlist.GetConfigCategories()[k] if info is None: return - charset = Utils.GetCharSet(mlist.preferred_language) + charset = mlist.preferred_language.charset print >> outfp, '##', k.capitalize(), _('options') print >> outfp, '#' # First, massage the descripton text, which could have obnoxious |
