From: Bruno Haible Date: Sun, 2 Sep 2007 09:55:09 +0000 (+0000) Subject: Implement msgctxt for C# ResourceManagers. X-Git-Tag: v0.17~264 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6d16458876e8eb80246e72d0ee52404a98a458d;p=thirdparty%2Fgettext.git Implement msgctxt for C# ResourceManagers. --- diff --git a/gettext-tools/doc/ChangeLog b/gettext-tools/doc/ChangeLog index f85e74af8..82d6e0b73 100644 --- a/gettext-tools/doc/ChangeLog +++ b/gettext-tools/doc/ChangeLog @@ -1,3 +1,10 @@ +2007-09-02 Bruno Haible + + Implement msgctxt for C# ResourceManagers. + * gettext.texi (Java): Mention GetParticularString and + GetParticularPluralString. + * xgettext.texi (--keyword): Update defaults for C#. + 2007-09-01 Bruno Haible Implement msgctxt for Java ResourceBundles. diff --git a/gettext-tools/doc/gettext.texi b/gettext-tools/doc/gettext.texi index 7b3c63c02..f4e66e472 100644 --- a/gettext-tools/doc/gettext.texi +++ b/gettext-tools/doc/gettext.texi @@ -9848,6 +9848,8 @@ _("abc") @item gettext/ngettext functions @code{GettextResourceManager.GetString}, @code{GettextResourceManager.GetPluralString} +@code{GettextResourceManager.GetParticularString} +@code{GettextResourceManager.GetParticularPluralString} @item textdomain @code{new GettextResourceManager(domain)} @@ -9949,6 +9951,12 @@ Plural handling: A message catalog in @code{.dll} format supports the plural handling function @code{GetPluralString}. Whereas @code{.resources} files can only contain data and only support lookups that depend on a single string. +@item +Context handling: A message catalog in @code{.dll} format supports the +query-with-context functions @code{GetParticularString} and +@code{GetParticularPluralString}. Whereas @code{.resources} files can +only contain data and only support lookups that depend on a single string. + @item The @code{GettextResourceManager} that loads the message catalogs in @code{.dll} format also provides for inheritance on a per-message basis. @@ -10008,6 +10016,15 @@ a translation is missing, the @var{msgid} argument is returned unchanged. The @code{GetPluralString} function returns a string translation with plural handling, like the @code{ngettext} function in C. +The @code{GetParticularString} function returns a string's translation, +specific to a particular context, like the @code{pgettext} function in C. +Note that when a translation is missing, the @var{msgid} argument is returned +unchanged. + +The @code{GetParticularPluralString} function returns a string translation, +specific to a particular context, with plural handling, like the +@code{npgettext} function in C. + @cindex @code{libintl} for C# To use this API, one needs the @code{GNU.Gettext.dll} file which is part of the GNU gettext package and distributed under the LGPL. diff --git a/gettext-tools/doc/xgettext.texi b/gettext-tools/doc/xgettext.texi index 2be773b56..4ed5fba28 100644 --- a/gettext-tools/doc/xgettext.texi +++ b/gettext-tools/doc/xgettext.texi @@ -223,7 +223,8 @@ For Java: @code{GettextResource.gettext:2}, @code{pgettext:1c,2}, @code{npgettext:1c,2,3}, @code{getString}. @item -For C#: @code{GetString}, @code{GetPluralString:1,2}. +For C#: @code{GetString}, @code{GetPluralString:1,2}, +@code{GetParticularString:1c,2}, @code{GetParticularPluralString:1c,2,3}. @item For awk: @code{dcgettext}, @code{dcngettext:1,2}.