From: Bruno Haible Date: Sat, 1 Sep 2007 21:40:13 +0000 (+0000) Subject: Document pgettext and npgettext for Java. X-Git-Tag: v0.17~271 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=985fdfc8ba1c03973b2e0b02fba9b501e10435d7;p=thirdparty%2Fgettext.git Document pgettext and npgettext for Java. --- diff --git a/gettext-tools/doc/ChangeLog b/gettext-tools/doc/ChangeLog index 7877fb886..f85e74af8 100644 --- a/gettext-tools/doc/ChangeLog +++ b/gettext-tools/doc/ChangeLog @@ -1,3 +1,10 @@ +2007-09-01 Bruno Haible + + Implement msgctxt for Java ResourceBundles. + * gettext.texi (Java): Mention pgettext and npgettext. + * xgettext.texi (--keyword): Update defaults for Java. + Suggested by Felix Berger. + 2007-08-18 Bruno Haible * gettext.texi (Why): Don't oppose commercial software to free diff --git a/gettext-tools/doc/gettext.texi b/gettext-tools/doc/gettext.texi index c5e629a98..7b3c63c02 100644 --- a/gettext-tools/doc/gettext.texi +++ b/gettext-tools/doc/gettext.texi @@ -9651,7 +9651,8 @@ java, java2 _("abc") @item gettext/ngettext functions -@code{GettextResource.gettext}, @code{GettextResource.ngettext} +@code{GettextResource.gettext}, @code{GettextResource.ngettext}, +@code{GettextResource.pgettext}, @code{GettextResource.npgettext} @item textdomain ---, use @code{ResourceBundle.getResource} instead @@ -9729,16 +9730,15 @@ a PO file with plural handling. @item The @code{gnu.gettext.GettextResource} API. -Reference documentation in Javadoc 1.1 style format -is in the @uref{javadoc1/tree.html,javadoc1 directory} and -in Javadoc 2 style format -in the @uref{javadoc2/index.html,javadoc2 directory}. +Reference documentation in Javadoc 1.1 style format is in the +@uref{javadoc2/index.html,javadoc2 directory}. Its @code{gettext} function returns a string translation. Note that when a translation is missing, the @var{msgid} argument is returned unchanged. This has the advantage of having the @code{ngettext} function for plural -handling. +handling and the @code{pgettext} and @code{npgettext} for strings constraint +to a particular context. @cindex @code{libintl} for Java To use this API, one needs the @code{libintl.jar} file which is part of diff --git a/gettext-tools/doc/xgettext.texi b/gettext-tools/doc/xgettext.texi index d519f1365..2be773b56 100644 --- a/gettext-tools/doc/xgettext.texi +++ b/gettext-tools/doc/xgettext.texi @@ -218,8 +218,9 @@ For Scheme: @code{gettext}, @code{ngettext:1,2}, @code{gettext-noop}. @item For Java: @code{GettextResource.gettext:2}, -@code{GettextResource.ngettext:2,3}, @code{gettext}, @code{ngettext:1,2}, -@code{getString}. +@code{GettextResource.ngettext:2,3}, @code{GettextResource.pgettext:2c,3}, +@code{GettextResource.npgettext:2c,3,4}, @code{gettext}, @code{ngettext:1,2}, +@code{pgettext:1c,2}, @code{npgettext:1c,2,3}, @code{getString}. @item For C#: @code{GetString}, @code{GetPluralString:1,2}.