Translate form validation error messages.
Okay, this is a long story.
There are two ways to translate validation error messages:
1) Let wtforms do it. You give wtforms a translation thingy
and it calls it for the message to be translated. Good
idea maybe. Except: The translation function is only
called for the builtin messages of wtforms. It's not
called for any handcrafted messages in the constructor.
And we can't translate the message there! Because the
message needs to be translated when the form is
rendered, for each user's locale.
This does not work for us.
2) Translate the message while it gets rendered.
Luckily we render the message completely by hand. So we
can just translate it there also!
Simple, easy, works!
This all does not cover translating the builtin messages of
wtforms. They're currently not extracted in any way, so our
translators can't translate them.
But that's another issue!