[Mailman-Developers] Translating notifications raised by mailman-core in postorius
simon.hanna at serve-me.info
Tue May 17 05:15:14 EDT 2016
Currently Postorius handles form submissions like this:
1. Check to see if inputs are malformed, raise error if so
2. Submit to mailman-core and see what the response is.
- ConnectionError: Mailman-core is unreachable, display error message
- Success: Display some success notification
- HttpError: This happens when mailman-core rejects the request for
Currently the HttpErrors are passed without modification to the user in
a notification. Postorius should have some way of translating these.
We can't translate the raw messages because they sometimes contain
specific strings like emails and it would require us to manually add the
strings to the .pot files.
Theoretically the core could translate the messages before passing them
to postorius. This would require core to know about the language it
should translate to. I don't think this is a very good approach because
we would have to make sure we offer the same languages for core and
postorius and I'm not sure how we would pass the languages to core...
I propose core to return an error code with each request. That way
postorius can add strings for all the errors that it cares about and
translate them accordingly. This would require an api change. Since 3.1
would change the api anyway, it would be nice to include the changes there.
What do you think of my proposal? Do you have a better idea?
The specifics have to be worked out of course.
More information about the Mailman-Developers