A short link to this page is https://wiki.list.org/x/17892046

Clear message

How do I edit message strings built in to the source code?

Aside from the obvious "edit the source code" answer, you can use Mailman's i18n functionality to do this.

There are drawbacks to editing the source code. Namely, all the messages in the source are in English, and changing the source message will make the lookup of the translated message for another language fail.

If you want to edit a non-English message, you need to find that message and its translation in Mailman's messages/xx/LC_MESSAGES/mailman.po file for the particular language code (xx) you are interested in. This file contains some preamble information followed by a bunch of entries of the form

#: Mailman/Archiver/HyperArch.py:124
msgid "size not available"
msgstr "translation"

The comments indicate where in the source the 'msgid' string is found and 'msgstr' contains the translation of that message in the target language.

You can change 'msgstr' to be anything you want and recompile with a command like:

msgfmt -o mailman.mo mailman.po

The interesting part is you can do the same thing to change English language messages. For this, you need to create messages/en/LC_MESSAGES/mailman.po. You can copy and edit the preamble information from any other language or from messages/mailman.pot (the template) in a source distribution, and then you only need to add 'msgid' and 'msgstr' for those messages you want to change, and compile as above.