newlist: preferred_language not put into available_languages

Bug #266448 reported by Porridge-users
2
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
Medium
Mark Sapiro

Bug Description

When I run newlist with -l pl, then preferred_language does get set to
'pl', but available_languages is set to just ['en'].

This causes two problems for me:
 - editing the default language on the language properties page gets tricky
(you need to apply the settings twice, going through a page in english).
 - the installation scripts logic in the debian package reads
available_languages to find out which language message files to install.
Not having the preferred language in the available list means I will have
to jump through some extra tricky hoops to get it working properly.

Also, the comment in the config file does say that the default language
should be in the available languages list, so I guess some assumptions are
made in other parts of the codebase, which will cause undesired behavior.

I guess the best way to fix this is to create a proper mutator method which
will contain some logic to also update the available_languages property if
need be.

[http://sourceforge.net/tracker/index.php?func=detail&aid=1906368&group_id=103&atid=100103]

Revision history for this message
Mark Sapiro (msapiro) wrote :

Originator: NO

This is a bug in newlist fixed by the attached patch which will be in
Mailman 2.1.10.

The patch will add the selected language to available_languages if it is
other than the server default language.

As far as the Debian installation scripts logic is concerned, this is not
something that the Mailman project has any control over, but I must not
understand correctly in any case. It seems that you are saying that the
package will not install any templates or message catalogs for languages
that are not listed in available_languages of the existing lists, but this
would result in a new installation containg support for only those
languages listed as available for the packaged site list if that, so you
must be saying something else.
File Added: newlist.patch

Revision history for this message
Porridge-users (porridge-users) wrote :

Originator: YES

Thanks for the patch and the quick response. This is really impressive!

My problem with the debian installation scripts is somewhat complicated.
What they do on install/upgrade, is first issue an
interactive question for the list of languages to install, and then they
automagically add to that list any languages that
were not given, but are used by the existing mailing lists. This works
fine for most users, but for me it would require some
configuration preseeding, when building a machine with a pre-existing
/var/lib/mailman (e.g. disaster recovery).

Luckily, with your patch it should just do the right thing for me now.

thanks again!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.