To: TP Cc: Adam, Deb18n ___ Hi Adam and the TP list :)This email is forwarded by me from Deb18n to the Translation Project list, since Adam needs detailed gettext info. Adam is evidently determined to handle L10N correctly, so he deserves our best help.
I don't think Adam is a TP list member, so please CC any replies to him. Thankyou. :) On 10/03/2008, at 7:43 PM, Adam Spragg wrote:
Dear Debian i18n experts, I am currently trying to i14e[0] a bit of software that I'm writing on Debian GNU/Linux, and have been reading up on gettext and its associated applications and libraries.I have figured out that I need use contexts to distinguish between someshort strings in my application.
Yes, please do: use of contextual information will ensure a more accurate translation.
To this end, I've created a sample .pot file and translated .po files with the requisite msgid, msgstr and msgctxt lines. However, in order to use the strings at runtime, I need to be able to call [d[c]]pgettext(), as described in the gettext manual[1]. Despite having all the gettext-related packages that I can find installed on my system, these functions do not appear to be declaredanywhere.[2] Is there a package I should have installed? I already havelibc6-dev 2.7-9 (owner of libintl.h) and gettext 0.17-2 installed. To investigate further, I downloaded the GNU sources for gettext 0.17and had a look at them. According to their header file, pgettext() justcalls gettext(), passing its msgctxt argument as gettext()'s msgid. As a test, I tried calling gettext() directly with a context id as a message id on the Debian library. This did not work. And neither can I get a translation for a message that has a context even if it is the only message with a particular msgid. So, I need to use gettext contexts, but I can't figure out how to dothis on my Debian system. If a message has a context, it simply appears to be unavailable. (Messages without contexts load fine, so I know thatI'm putting the .mo files in the right place, setting the locale properly and binding to the correct domain, etc...) Am I missing something? Or is this a bug in libc6/gettext?I tried googling[3] for more info but nothing particularly useful turnedup. Thanks, Adam Spragg. [0] Internationalise [1] http://www.gnu.org/software/gettext/manual/gettext.html#Contexts [2] find /usr/include/ -name \*.h | xargs grep pgettext [3] http://www.google.co.uk/search?q=pgettext+site%3Alists.debian.org
from Clytie Vietnamese Free Software Translation Team http://vnoss.net/dokuwiki/doku.php?id=projects:l10n
Attachment:
PGP.sig
Description: This is a digitally signed message part