At 04:15 PM 2/16/01 -0500, I wrote:
>Jeez, Barry, that itty-bitty change you made last night to not
>import _ into the namespace by default broke a *lot* of things...
>I was trying to use config_list, and had to edit several modules
>to do a from Mailman.i18n import _...
Add Bouncer.py to that.
W.r.t my newlang problems..
Since I deleted the templates/en dir I had created to test the fallback, newlang wouldn't
work, because there's no en directory to copy to the new list... It needs to catch the fact
that ok_langs is empty before the loop that prints which languages were installed runs,
otherwise the status message looks stupid :-).
Perhaps instead of saying "language not supported" it say "No template directory for
language." Particularly since that's the only check; it doesn't matter if the language is
defined or not in Defaults, and, in fact, if it's NOT defined there, you can still install
support for it with newlang, you just can't tell mailman to use it later. (Which means,
come to think of it, that in a perfect world newlang would check the supported languages
array out of Defaults as well as looking for the directory...)
Newlang also has a nasty habit of leaving the list locked if anything goes wrong.
w.r.t your comment about needing to look at the call to HTMLFormatter. You do
need to init it, because mlist._template_path is used by it, and by newlang, and it's
*not* defined in MailList; HTMLFormatter adds it to the object when it runs. The
reason it's broken, however, which came to me in a blinding flash of "duh", is that
we instantiate an mlist for the list we're looking at, but do the initvars on "list", not
"mlist"... So on newlang line 86 change list to mlist.
BTW, there's going to be either a very smart update procedure needed, or a lot of
verbiage in the Readme... Or both. People need to install EN support into
each list they own. Which they can do by hand, or with newlang. However, if
newlang does it, it'll populate the files from the template directory. Now, because
all lists default to en, they'll be using *those* templates, which might differ from the
one that are installed in the list. (Which, is, of course, a regular occupational hazard
of updating mailman, but there's a new twist.) So those templates, which haven't
been changed by anyone, won't be used anymore, without admins being any the wiser
unless they pay attention.
Two things need to happen in an upgrade, order optional. Each list needs an "en" subdir,
and all the templates in the list dir need to move to the en dir. Also, all the templates, as usual,
need to be checked by hand against the new versions. (Luckily, so far, the only difference
between any of mine, and the defaults is the revision number in the comment.)
If everyone was running an english version, I'd say just have update move *.html, installing
a new headfoot.html, since that seems to be new, into an en dir for each list, then print the
standard warning to go compare configurations. Anyone that's already done any language
changes though will find their local language sitting in the english subdir... Either way, there's
copius notage in the readme necessary to explain where things are going and why...