Re: Mistranslations in gtk
- From: danilo gnome org (Danilo Åegan)
- To: Pablo Saratxaga <srtxg chanae alphanet ch>
- Cc: gnome-i18n gnome org
- Subject: Re: Mistranslations in gtk
- Date: Sat, 15 Jan 2005 12:12:13 +0100
Hi Pablo,
Yesterday at 22:20, Pablo Saratxaga wrote:
> You mean that if you translate the context part it is displayed?
> If so that is indeed a very serious bug! (translators translating it
> is indeed a very common thing).
It's even worse, Pablo: if you don't translate the context part, but
*include* it untranslated in the message, it is still displayed.
> (and I wonder how that is implemented? it has extra code to
> differenciate when gettext returns a translation and when it fails
> to do so? or the stripping of the context is done not on looking just
> the delimiter but on a byte by byte compareason of all the context
> string?)
It just differentiates between cases where gettext returns a
translation and where it doesn't.
Look at g_strip_context function at
http://cvs.gnome.org/viewcvs/glib/glib/gstrfuncs.c?rev=1.114&view=markup
It's called with two parameters, such as:
g_strip_context(msgid,gettext(msgid))
and relies on gettext returning the same pointer when there's no
translation. You most likely don't want to call it directly, unless
you rely on compiler optimising static strings to be at the same place
in memory (otherwise, g_strip_context("blah|blah",
gettext("blah|blah")) might not work as you expect).
Cheers,
Danilo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]