diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-10-21 11:34:11 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-10-21 11:40:30 -0700 |
commit | 016365c5f1b254eec0ccdc7b237eb8e77438574e (patch) | |
tree | f0a502c4f97f546388d714ede8bc01aa9f3f77d3 /save-xml.c | |
parent | e47b52ecdb8a96046511929272f541d0eea6ae00 (diff) | |
download | subsurface-016365c5f1b254eec0ccdc7b237eb8e77438574e.tar.gz |
Fix the way we handle translated event names
Here is what Linus reported:
I think you have made a mistake in trying to translate some of
libdivecomputer.c
Translating some of those things based on locale is *wrong*, because
they are saved in the XML file.
That covers at least the warnings: they'll get translated when you
import them, and then saved to the XML file as that translation, but
now if you start subsurface in another locale, they will not get
translated back.
So translating XML file contents is fundamentally buggy. It just
shouldn't be done.
So all the "translations" for the event handling are buggy, and
generate crap. Please don't do that. Leave them as English.
And of course he is absolutely right. However, instead of not translating
them at all, this commit fixes things a better way - we now mark the
strings for translation but store the original English strings everywhere
(in the in-memory data structure as well as in the XML file). Only when we
actually display something on the screen (in a tooltip or in the filter
dialog) do we actually translate the strings into the native language.
This should address both Linus' issue and the desire to have localized
event texts.
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'save-xml.c')
0 files changed, 0 insertions, 0 deletions