[Mailman-Users] Changing preferred language for all users
Jolin M Warren
JolinWarren at OakandApple.org
Sun Jul 11 11:16:03 CEST 2004
Hello Jim,
At 11:29 on 11-7-04, Jim Tittsler wrote:
> bin/withlist is the tool for making arbitrary changes to
> mailing list objects. You can write functions for things
> you expect to do frequently, or use it interactively with
> the full power of Python to do one off changes.
I had a feeling that this was what I needed to use. My problem is
that I've never used Python before, so wasn't quite sure where to
start.
At 11:29 on 11-7-04, Jim Tittsler wrote:
> Mailman/MemberAdapter.py is the best source for documentation
> on manipulating members and their preferences.
Thanks for the pointer, I will use that in the future when trying to
work out how to use 'withlist' -- I can see that I need to learn how
to use it because it looks quite flexible. In the meantime, I really
appreciate your sending me the code I need to change the language of
all members of a list. That is exactly what I needed!
Something that is interesting, though is that the code you sent
allows me to set the members' language to anything -- i.e. I can set
them to any valid language code, but also to a meaningless one like
'japa'. If, for instance, I switch the members to 'ja' without
Japanese being enabled on the list, there is no error given. When I
do a 'dumpdb' on the list, the users are listed as:
'language': { 'user1 at oakandapple.org': 'ja',
'user2 at oakandapple.org': 'ja'},
However, in the web admin interface, they still show up with their
language set to 'English' (as that is the only one supported on the
list). If I then go and enable 'Japanese' for the list, when I go
back to the members page, they show up with their language set to
Japanese. If I use 'withlist' to set the members' language to
something invalid like, 'japa', on the members admin page, their
language just shows up as the list's default language (even though a
'dumpdb' reveals that internally they are set to 'japa'). So it looks
like you can set members to use any 'language' and they will just
fall back to the default. But then if the language code (if it
exists) is subsequently enabled, they automatically switch over.
Could be useful, but I don't know if this is a bug or a feature. :-)
Thanks so much for your help.
Cheers,
Jolin
More information about the Mailman-Users
mailing list