On 9/23/23 07:40, testeur via Mailman-users wrote:
|# mailman shell -l testlist@domain.tld |
It looks like you are running mailman shell
as root
. You should
always run mailman commands including starting mailman as the Mailman
user, never as root. Running thing as root can create things that later
can't be read by the mailman user.
||>>> from mailman.interfaces.action import Action >>> for mbr in m.members.members: mbr.moderation_action = Action.defer |||commit()|
|||>>> from mailman.interfaces.action import Action |||||||>>> english = getUtility(ILanguageManager).get('en')| >>> for mbr in m.members.members: || mbr.preferences.acknowledge_posts = False mbr.preferences.delivery_mode = DeliveryMode.regular mbr.preferences.delivery_status = DeliveryStatus.enabled mbr.preferences.hide_address = False mbr.preferences.preferred_language = english mbr.preferences.receive_list_copy = False mbr.preferences.receive_own_postings = True|commit()||
I'm not sure what the above actually says. The interaction should look like
>>> from mailman.interfaces.action import Action
>>> english = getUtility(ILanguageManager).get('en')
>>> for mbr in m.members.members:
... mbr.preferences.acknowledge_posts = False
... mbr.preferences.delivery_mode = DeliveryMode.regular
... mbr.preferences.delivery_status = DeliveryStatus.enabled
... mbr.preferences.hide_address = False
... mbr.preferences.preferred_language = english
... mbr.preferences.receive_list_copy = False
... mbr.preferences.receive_own_postings = True
...
>>> commit()
Actually, importing Action is not necessary as it is among the things
defined by default in mailman shell
in interactive mode.
Before the shell command, the web interface was with an other language (i tested with italian one) and other options preferences, but after the shell command, after a web interface refresh, it doesn't change.
The above shell interaction sets the preferred_language for all list members to english. This has nothing to do with the language for the web UI. This is set by Django. See <https://docs.djangoproject.com/en/4.2/topics/i18n/translation/#how-django-discovers-language-preference>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan