Peter Münster writes:
If the "final fallback" as mentioned in https://gitlab.com/mailman/mailman/-/blob/master/src/mailman/utilities/i18n.... worked, that would be a good feature. Only one template in templates/site/en and everything works as expected, independently of any language settings.
But that's not the way it works. If I understand correctly, you're referring to the overriding site-specific templates, but in fact there is always the fallback of the builtin template. I don't see how this can work any other way. The Mailman project is fortunate to have a team of translators handling all the default templates. They need to stay for many, if not the great majority, of sites. For example, on my site, I have to support English, Japanese, and Chinese. I can do the first two myself, but except for trivial cases like "suppress footer with empty template file", I definitely want to fall back to the default Chinese even if I've added site-specific or clarifying wording to the English and Japanese. If you think this kind of use case is really important (and I can imagine many other similar use cases, I just think they're too rare to justify even more complexity in the I18N algorithm), you could file an issue, requesting an "LC_ALL-like" override pseudo-language, such that if that template is set, all languages use it.
Note, I've already figured out how to do this. I think it would do less good (save you a few "cp <template file> ../fr" copies) than harm (confuse people reading the docs who don't have a use case). All you need to do is convince at least one of the active core (me, Mark, Abhilash) that it's a good idea and I'll implement.
For reference, from src/mailman/utilities/i18n.py:
The <language> path component is variable, and described below.
* The list-specific language directory
$template_dir/lists/<mlist.list_id>/<language>
$template_dir/lists/<mlist.fqdn_listname>/<language> (deprecated)
* The domain-specific language directory
$template_dir/domains/<mlist.mail_host>/<language>
* The site-wide language directory
$template_dir/site/<language>
-------------------------------- HERE --------------------------------
* The template directory within the mailman source tree
<source_dir>/templates/<language>
----------------------------------------------------------------------
The <language> path component is calculated as follows, in this order:
* The `language` parameter if given
* `mlist.preferred_language` if given
* The server's default language
* English ('en')