WIP: gettext template files generation and partial french translation
This is yet another stab at getting translations rolling in Mailman 3. It's clunky, it's weird, but its' the work I've been doing to try and fix stuff like #541 (closed).
With the various bits and pieces there, I was able to successfully start translating the Mailman UI, specifically the "welcome" message. The "confirmation" messages are still not translatable but, thanks to !452 (closed), I don't have to deal with them and can send emails by hand.
There are still many things wrong with this MR:
- it uses Make to build the
.potfiles and update the.pofiles - it doesn't include a mechanism to generate and ship
.mofiles
The compilation process, in particular, doesn't have to depend on msgfmt from gettext, and can be done in pure Python. I have done so in monkeysign, see translation.py and msgfmt.py which I stole from the Deluge torrent client, according to my notes.
Anyways, once msgfmt is ran on the fr.po file included in the MR, the welcome message is fully translated (if !446 (closed) is applied as well, naturally). Here's the welcome message I received here, as an example:
Subject: Bienvenue à la liste "Test"
To: anarcat+lists@anarc.at
Date: Tue, 19 Feb 2019 20:47:51 -0500
Bienvenue sur la liste "Test"!
Ceci est une liste de discussion privée pour tester mon nouveau
serveur de listes de discussions. J'espère utiliser ceci pour
remplacer les listes d'addresses informelles que j'oublie tout le
temps, particulièrement pour le projet de calendrier mais aussi pour
rejoindre famille et amis et les garder au courant de ma vie.
Mais pour l'instant, c'est une liste de discussion, alors c'est le
party.
Whoop.
Vous pouvez faire des ajustements en écrivant un courriel à:
test-request@lists.anarc.at
avec le mot "help" (sans les guillemets) dans le sujet ou le corps du
message.
Pour vous désinscrire, écrivez à:
test-leave@lists.anarc.at
Ideally, we wouldn't have to retranslate all of mailman in all those languages. It should be possible to "merge" the various .po files with the newer messages and only translate what's missing.
This is a start in that direction.
Let me know where I should go next.