[Python-checkins] python/dist/src/Doc/lib libgettext.tex,1.12,1.13

loewis@users.sourceforge.net loewis@users.sourceforge.net
Thu, 21 Nov 2002 13:45:34 -0800


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv11193/Doc/lib

Modified Files:
	libgettext.tex 
Log Message:
Patch #633547: Support plural forms. Do TODOs in test suite.


Index: libgettext.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libgettext.tex,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** libgettext.tex	24 Jun 2002 02:22:39 -0000	1.12
--- libgettext.tex	21 Nov 2002 21:45:31 -0000	1.13
***************
*** 70,73 ****
--- 70,99 ----
  \end{funcdesc}
  
+ \begin{funcdesc}{ngettext}{singular, plural, n}
+ 
+ Like \function{gettext()}, but consider plural forms. If a translation
+ is found, apply the plural formula to \var{n}, and return the
+ resulting message (some languages have more than two plural forms).
+ If no translation is found, return \var{singular} if \var{n} is 1;
+ return \var{plural} otherwise.
+ 
+ The Plural formula is taken from the catalog header. It is a C or
+ Python expression that has a free variable n; the expression evaluates
+ to the index of the plural in the catalog. See the GNU gettext
+ documentation for the precise syntax to be used in .po files, and the
+ formulas for a variety of languages.
+ 
+ \versionadded{2.3}
+ 
+ \end{funcdesc}
+ 
+ \begin{funcdesc}{dngettext}{domain, singular, plural, n}
+ Like \function{ngettext()}, but look the message up in the specified
+ \var{domain}.
+ 
+ \versionadded{2.3}
+ \end{funcdesc}
+ 
+ 
  Note that GNU \program{gettext} also defines a \function{dcgettext()}
  method, but this was deemed not useful and so it is currently
***************
*** 208,211 ****
--- 234,252 ----
  \end{methoddesc}
  
+ \begin{methoddesc}[NullTranslations]{ngettext}{singular, plural, n}
+ If a fallback has been set, forward \method{ngettext} to the fallback.
+ Otherwise, return the translated message.  Overridden in derived classes.
+ 
+ \versionadded{2.3}
+ \end{methoddesc}
+ 
+ \begin{methoddesc}[NullTranslations]{ungettext}{singular, plural, n}
+ If a fallback has been set, forward \method{ungettext} to the fallback.
+ Otherwise, return the translated message as a Unicode string.
+ Overridden in derived classes.
+ 
+ \versionadded{2.3}
+ \end{methoddesc}
+ 
  \begin{methoddesc}[NullTranslations]{info}{}
  Return the ``protected'' \member{_info} variable.
***************
*** 264,267 ****
--- 305,311 ----
  builtin \function{unicode()} function.
  
+ To facilitate plural forms, the methods \method{ngettext} and
+ \method{ungettext} are overridden as well.
+ 
  \subsubsection{Solaris message catalog support}
  
***************
*** 535,538 ****
--- 579,583 ----
      \item Peter Funk
      \item James Henstridge
+     \Juan David Ib\'a\~nez Palomar
      \item Marc-Andr\'e Lemburg
      \item Martin von L\"owis