Lookup in-tree templates for each language in search (Fixes #535)
commit58402426719f01d3d3664c6afbc9f02c46360493
authorJonas Meurer <jonas@freesources.org>
Sun, 27 Jan 2019 22:19:04 +0000 (27 23:19 +0100)
committerJonas Meurer <jonas@freesources.org>
Mon, 28 Jan 2019 22:49:54 +0000 (28 23:49 +0100)
tree50e5a713e68f369452cc7d47d65dabe9badae14c
parent8d9f8055933887570fa93fab44a5cc41a03a700c
Lookup in-tree templates for each language in search (Fixes #535)

* Until now, the in-tree templates were only taken into account after
  custom templates for all preferred languages were scanned. This is
  changed now: at the end of each language, a search for in-tree
  templates for that language is added. This fixes two separate issues:
  * If the list of preferred languages in a search contained first
    english (but no custom english templates existed) and then another
    language with existing custom templates, then the custom template
    of that second language was picked. But the in-tree english template
    should have had priority.
  * If mailman later ships in-tree templates for other languages, they
    will be taken into account.
src/mailman/docs/NEWS.rst
src/mailman/utilities/i18n.py
src/mailman/utilities/tests/test_templates.py