It turned out to be few lines of code but it took me some time to figure them out as translate-toolkit internals are not really good documented. Anyway I've hacked something what works for Weblate (and one random project I've tried) so it might be actually useful. You can find the code for it in pull request, let's see if it will get upstream.
To use that, you need patched translate-toolkit (see above) and latest Git checkout from Weblate. As the changes on Weblate side were quite minor and not intrusive, I've decided to put this into 1.0 release, even if I originally did not plan to do so.