Just to make sure there's no confusion - we are NOT calling gettext. We
are calling tr from a gettext like interface.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead use a hash to cache the translations (and allow for the ability to
clear the hash so we can even switch translations at runtime...).
Now Qt will keep track of the memory and release it for us when we are
done with it.
This avoids the memory leak introduced in commit 4ecb35bf5ff2 ("Make a
copy of the translated text").
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Otherwise the translation will get freed (and often reused) before it
makes it to the screen.
The problem with this is that it leaks memory for every translation.
Reported-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>