From: Ambrose LI <ac...@ad...> - 2006-10-25 03:49:38
|
Hi, I notice that there is this string: #: ../console/gntstatus.c:174 ../console/gntstatus.c:525 #: ../gtk/gtksavedstatuses.c:433 ../libgaim/protocols/jabber/buddy.c:283 #: ../libgaim/protocols/jabber/buddy.c:917 #: ../libgaim/protocols/novell/novell.c:1484 msgid "Title" Right now, this string cannot be translated into Chinese because "title" of a column in a list (gntstatus.c, gtksavedstatuses.c) is a completely different word than "title" of a person (jabber/buddy.c, novell.c). (Although zh_CN got it translated, the translation only makes sense for the former and is not the correct word for "title" of a person.) Can something be done to disambiguate the two? BTW, thanks very much for fixing gaim.sf.net/i18n. -- cheers, -ambrose |
From: Richard L. <rl...@wi...> - 2006-10-30 02:23:28
|
On Tue, 2006-10-24 at 23:49 -0400, Ambrose LI wrote: > Right now, this string cannot be translated into Chinese because "title" = of a column in a list (gntstatus.c, gtksavedstatuses.c) is a completely dif= ferent word than "title" of a person (jabber/buddy.c, novell.c). > Can something be done to disambiguate the two? glib's gettext, which we're using, uses the Q_() macro to do this: http://developer.gnome.org/doc/API/2.0/glib/glib-I18N.html#id2727054 However, this thread has some interesting points: http://mail.gnome.org/archives/gtk-devel-list/2005-December/msg00255.html However, my system (Ubuntu Dapper) doesn't have a pgettext() that I can find. Has the latter solution actually be implemented yet? Translators: What is your take on this? Which format would work best for your tools? If we switch, are we going to break lots of translations? It seems like we could fix things up with some careful sed'ing of the .po files, though. Richard P.S. For the record, Ambrose LI has filed these tracker items related to this issue: 1586519 1586521 1586540 |
From: Carlos <car...@ca...> - 2006-11-05 17:21:35
|
El dom, 29-10-2006 a las 20:22 -0600, Richard Laager escribi=C3=B3: Hi > On Tue, 2006-10-24 at 23:49 -0400, Ambrose LI wrote: > > Right now, this string cannot be translated into Chinese because "title= " of a column in a list (gntstatus.c, gtksavedstatuses.c) is a completely d= ifferent word than "title" of a person (jabber/buddy.c, novell.c). >=20 > > Can something be done to disambiguate the two? >=20 > glib's gettext, which we're using, uses the Q_() macro to do this: > http://developer.gnome.org/doc/API/2.0/glib/glib-I18N.html#id2727054 >=20 > However, this thread has some interesting points: > http://mail.gnome.org/archives/gtk-devel-list/2005-December/msg00255.html >=20 > However, my system (Ubuntu Dapper) doesn't have a pgettext() that I can > find. Has the latter solution actually be implemented yet? That's part of gettext 0.15. Ubuntu Edgy already has it as I guess Debian's unstable does. >=20 > Translators: What is your take on this? Which format would work best for > your tools? >=20 > If we switch, are we going to break lots of translations? It seems like > we could fix things up with some careful sed'ing of the .po files, > though. I think now that official gettext has support for that feature you should move to use it instead of use one of the existing workarounds because, at the end, you will need to move to it anyway... Cheers. >=20 > Richard >=20 > P.S. For the record, Ambrose LI has filed these tracker items related to > this issue: 1586519 1586521 1586540 >=20 > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job ea= sier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronim= o > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > _______________________________________________ Gaim-i18n mailing list Ga= im...@li... https://lists.sourceforge.net/lists/listinfo/= gaim-i18n --=20 Carlos Perell=C3=B3 Mar=C3=ADn Ubuntu =3D> http://www.ubuntu.com mailto:car...@ca... http://carlos.pemas.net Alicante - Spain |
From: Javier <jf...@co...> - 2006-11-05 00:26:21
|
On Sun, Oct 29, 2006 at 08:22:56PM -0600, Richard Laager wrote: > Translators: What is your take on this? Which format would work best for > your tools? In Debian (well, in the Debian Installer) we have used brackets in the PO strings to disambiguate strings. The po-debconf tool (which is Debian-specific) strips the brackets from PO strings so that they are not used on program output). So, you could have this: msgid "none[Refers to a man]" msgstr "ninguno" msgid "none[Refers to a woman]" msgstr "ninguna" [ Note: this is an example of a word which refers to a gender ] Brackets are, however, currently used in some msgid's in Gaim. Maybe you could use a different bracket (maybe {} ?) that would get removed somehow? > If we switch, are we going to break lots of translations? It seems like > we could fix things up with some careful sed'ing of the .po files, > though. I wouldn't mind if some strings got fuzzy because of this, that would make me review if I translated them correctly. Regards Javier |
From: Ethan B. <ebl...@cs...> - 2006-11-05 02:06:17
|
Javier Fern=E1ndez-Sanguino Pe=F1a spake unto us the following wisdom: > In Debian (well, in the Debian Installer) we have used brackets in the PO > strings to disambiguate strings. The po-debconf tool (which is > Debian-specific) strips the brackets from PO strings so that they are not > used on program output). So, you could have this: >=20 > msgid "none[Refers to a man]" > msgstr "ninguno" >=20 > msgid "none[Refers to a woman]" > msgstr "ninguna" >=20 > [ Note: this is an example of a word which refers to a gender ] >=20 > Brackets are, however, currently used in some msgid's in Gaim. Maybe you > could use a different bracket (maybe {} ?) that would get removed somehow? This is similar to the best proposal I've seen. What if we set up some sort of extremely unlikely delineation (e.g., [NB: <string>]), and then insert a pre-gettext function to be used for such strings, which strips that marker if it exists afater calling gettext? That is to say[1]: const char *gaim_annotated_string(const char *str) { static char *buf; static int blen; const char *tstr; const char *f, *t, *note; int len; tstr =3D _(str); if ((note =3D strstr(tstr, "[NB: ")) =3D=3D NULL) return tstr; len =3D strlen(tstr); if (buf =3D=3D NULL || blen < len) { buf =3D realloc(buf, len); blen =3D len; } f =3D tstr; t =3D buf; do { strncpy(t, f, note - f); t +=3D note - f; if ((f =3D strstr(f, "]") !=3D NULL) f++; } while (f && *f); t =3D '\0'; return t; } Then: gaim_annotated_string("Foo[NB: Adjective]"); > > If we switch, are we going to break lots of translations? It seems like > > we could fix things up with some careful sed'ing of the .po files, > > though. >=20 > I wouldn't mind if some strings got fuzzy because of this, that would mak= e me > review if I translated them correctly. I agree -- we're actually lucky that Ambrose caught such a thing. There could be lurking errors in there, already. Ethan [1] Completely untested, of course -- I didn't even try to compile it. --=20 The laws that forbid the carrying of arms are laws [that have no remedy for evils]. They disarm only those who are neither inclined nor determined to commit crimes. -- Cesare Beccaria, "On Crimes and Punishments", 1764 |
From: Ethan B. <ebl...@cs...> - 2006-11-05 02:28:09
|
Ethan Blanton spake unto us the following wisdom: > return t; ^^^^^^^^^ This should, of course, be 'return buf;' Ethan --=20 The laws that forbid the carrying of arms are laws [that have no remedy for evils]. They disarm only those who are neither inclined nor determined to commit crimes. -- Cesare Beccaria, "On Crimes and Punishments", 1764 |
From: Gabor K. <kel...@gn...> - 2006-11-05 12:24:05
|
Richard Laager =EDrta: > On Tue, 2006-10-24 at 23:49 -0400, Ambrose LI wrote: > =20 >> Right now, this string cannot be translated into Chinese because "titl= e" of a column in a list (gntstatus.c, gtksavedstatuses.c) is a completel= y different word than "title" of a person (jabber/buddy.c, novell.c). >> =20 > > =20 >> Can something be done to disambiguate the two? >> =20 > > glib's gettext, which we're using, uses the Q_() macro to do this: > http://developer.gnome.org/doc/API/2.0/glib/glib-I18N.html#id2727054 > > However, this thread has some interesting points: > http://mail.gnome.org/archives/gtk-devel-list/2005-December/msg00255.ht= ml > > However, my system (Ubuntu Dapper) doesn't have a pgettext() that I can > find. Has the latter solution actually be implemented yet? > > Translators: What is your take on this? Which format would work best fo= r > your tools? > > =20 According to the NEWS file of the gettext package, this functionality=20 has been implemented in version 0.15. Only problem can be it's availability in major distributions,=20 Distrowatch says it's available only in the most current versions. However, as a translator, i think the gettext functions are the best=20 solution (and not the ugly hacks like glib's Q macro or custom made=20 implementations), as gettext-based translation support systems, like=20 KBabel, Launchpad's Rosetta or Pootle will provide proper support for thi= s. Another argument against custom made hacks is the lesson of the=20 widespread usage of the Q macro in Gnome: programmers can't expect that=20 translators will completely understand the meaning and correct usage of=20 in-message context information - they will not: http://mail.gnome.org/archives/gnome-i18n/2006-March/msg00370.html http://mail.gnome.org/archives/gnome-i18n/2006-September/msg00138.html Regards, Gabor Kelemen |
From: Richard L. <rl...@wi...> - 2006-11-06 01:55:21
|
On Sun, 2006-11-05 at 13:23 +0100, Gabor Kelemen wrote: > Only problem can be it's availability in major distributions,=20 > Distrowatch says it's available only in the most current versions. > However, as a translator, i think the gettext functions are the best=20 > solution (and not the ugly hacks like glib's Q macro or custom made=20 > implementations), as gettext-based translation support systems, like=20 > KBabel, Launchpad's Rosetta or Pootle will provide proper support for thi= s. If it were just an issue of run-time function calls, I'd suggest a wrapper function IFF gettext doesn't have the right function. However, I suspect that the translation extraction tools would miss translations where we call the_new_gettext_function() instead of _() (which of course maps to gettext). Maybe we could teach intltool-extract about the new formats? Maybe that's already been done? Richard |