autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: update imported files


From: Ralf Wildenhues
Subject: FYI: update imported files
Date: Thu, 1 Jun 2006 20:17:57 +0200
User-agent: Mutt/1.5.11+cvs20060403

I've applied this.

Cheers,
Ralf

        * config/texinfo.tex, doc/standards.texi: Sync from upstream.

Index: config/texinfo.tex
===================================================================
RCS file: /cvsroot/autoconf/autoconf/config/texinfo.tex,v
retrieving revision 1.18
diff -u -r1.18 texinfo.tex
--- config/texinfo.tex  17 May 2006 02:15:30 -0000      1.18
+++ config/texinfo.tex  1 Jun 2006 18:16:21 -0000
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2006-05-07.15}
+\def\texinfoversion{2006-05-28.17}
 %
 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
@@ -1084,15 +1084,24 @@
 \def\minus{$-$}
 
 % @dots{} outputs an ellipsis using the current font.
-% We do .5em per period so that it has the same spacing in a typewriter
-% font as three actual period characters.
+% We do .5em per period so that it has the same spacing in the cm
+% typewriter fonts as three actual period characters; on the other hand,
+% in other typewriter fonts three periods are wider than 1.5em.  So do
+% whichever is larger.
 %
 \def\dots{%
   \leavevmode
-  \hbox to 1.5em{%
-    \hskip 0pt plus 0.25fil
-    .\hfil.\hfil.%
-    \hskip 0pt plus 0.5fil
+  \setbox0=\hbox{...}% get width of three periods
+  \ifdim\wd0 > 1.5em
+    \dimen0 = \wd0
+  \else
+    \dimen0 = 1.5em
+  \fi
+  \hbox to \dimen0{%
+    \hskip 0pt plus.25fil
+    .\hskip 0pt plus1fil
+    .\hskip 0pt plus1fil
+    .\hskip 0pt plus.5fil
   }%
 }
 
@@ -3391,12 +3400,39 @@
   \escapechar = `\\     % use backslash in output files.
   address@hidden@}% change to @@ when we switch to @ as escape char in index 
files.
   \def\ {\realbackslash\space }%
+  %
   % Need these in case \tex is in effect and \{ is a \delimiter again.
   % But can't use \lbracecmd and \rbracecmd because texindex assumes
   % braces and backslashes are used only as delimiters.
   \let\{ = \mylbrace
   \let\} = \myrbrace
   %
+  % I don't entirely understand this, but when an index entry is
+  % generated from a macro call, the \endinput which \scanmacro inserts
+  % causes processing to be prematurely terminated.  This is,
+  % apparently, because \indexsorttmp is fully expanded, and \endinput
+  % is an expandable command.  The redefinition below makes \endinput
+  % disappear altogether for that purpose -- although logging shows that
+  % processing continues to some further point.  On the other hand, it
+  % seems \endinput does not hurt in the printed index arg, since that
+  % is still getting written without apparent harm.
+  % 
+  % Sample source (mac-idx3.tex, reported by Graham Percival to
+  % help-texinfo, 22may06):
+  % @macro funindex {WORD}
+  % @findex xyz
+  % @end macro
+  % ...
+  % @funindex commtest
+  % 
+  % The above is not enough to reproduce the bug, but it gives the flavor.
+  % 
+  % Sample whatsit resulting:
+  % address@hidden@folio address@hidden address@hidden }}}
+  % 
+  % So:
+  \let\endinput = \empty
+  %
   % Do the redefinitions.
   \commondummies
 }
@@ -5827,7 +5863,6 @@
     \spaceisspace
     %
     % Append \endinput to make sure that TeX does not see the ending newline.
-    %
     % I've verified that it is necessary both for e-TeX and for ordinary TeX
     %                                                  --kasal, 29nov03
     \scantokens{#1\endinput}%
Index: doc/standards.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/standards.texi,v
retrieving revision 1.71
diff -u -r1.71 standards.texi
--- doc/standards.texi  17 May 2006 02:15:30 -0000      1.71
+++ doc/standards.texi  1 Jun 2006 18:16:23 -0000
@@ -3,7 +3,7 @@
 @setfilename standards.info
 @settitle GNU Coding Standards
 @c This date is automagically updated when you save this file:
address@hidden lastupdate April 23, 2006
address@hidden lastupdate May 24, 2006
 @c %**end of header
 
 @dircategory GNU organization
@@ -2952,7 +2952,7 @@
 name} for the package.  The text domain name is used to separate the
 translations for this package from the translations for other packages.
 Normally, the text domain name should be the same as the name of the
-package---for example, @samp{fileutils} for the GNU file utilities.
+package---for example, @samp{coreutils} for the GNU core utilities.
 
 @cindex message text, and internationalization
 To enable gettext to work well, avoid writing code that makes
@@ -2965,44 +2965,30 @@
 Here is an example of what not to do:
 
 @example
-printf ("%d file%s processed", nfiles,
-        nfiles != 1 ? "s" : "");
+printf ("%s is full", capacity > 5000000 ? "disk" : "floppy disk");
 @end example
 
address@hidden
-The problem with that example is that it assumes that plurals are made
-by adding `s'.  If you apply gettext to the format string, like this,
+If you apply gettext to all strings, like this,
 
 @example
-printf (gettext ("%d file%s processed"), nfiles,
-        nfiles != 1 ? "s" : "");
+printf (gettext ("%s is full"),
+        capacity > 5000000 ? gettext ("disk") : gettext ("floppy disk"));
 @end example
 
 @noindent
-the message can use different words, but it will still be forced to use
-`s' for the plural.  Here is a better way:
-
address@hidden
-printf ((nfiles != 1 ? "%d files processed"
-         : "%d file processed"),
-        nfiles);
address@hidden example
+the translator will hardly know that "disk" and "floppy disk" are meant to
+be substituted in the other string.  Worse, in some languages (like French)
+the construction will not work: the translation of the word "full" depends
+on the gender of the first part of the sentence; it happens to be not the
+same for "disk" as for "floppy disk".
 
address@hidden
-This way, you can apply gettext to each of the two strings
-independently:
+Complete sentences can be translated without problems:
 
 @example
-printf ((nfiles != 1 ? gettext ("%d files processed")
-         : gettext ("%d file processed")),
-        nfiles);
+printf (capacity > 5000000 ? gettext ("disk is full")
+        : gettext ("floppy disk is full"));
 @end example
 
address@hidden
-This can be any method of forming the plural of the word for ``file'', and
-also handles languages that require agreement in the word for
-``processed''.
-
 A similar problem appears at the level of sentence structure with this
 code:
 
@@ -3024,6 +3010,43 @@
         : "#  Implicit rule search has not been done.\n");
 @end example
 
+Another example is this one:
+
address@hidden
+printf ("%d file%s processed", nfiles,
+        nfiles != 1 ? "s" : "");
address@hidden example
+
address@hidden
+The problem with this example is that it assumes that plurals are made
+by adding `s'.  If you apply gettext to the format string, like this,
+
address@hidden
+printf (gettext ("%d file%s processed"), nfiles,
+        nfiles != 1 ? "s" : "");
address@hidden example
+
address@hidden
+the message can use different words, but it will still be forced to use
+`s' for the plural.  Here is a better way, with gettext being applied to
+the two strings independently:
+
address@hidden
+printf ((nfiles != 1 ? gettext ("%d files processed")
+         : gettext ("%d file processed")),
+        nfiles);
address@hidden example
+
address@hidden
+But this still doesn't work for languages like Polish, which has three
+plural forms: one for nfiles == 1, one for nfiles == 2, 3, 4, 22, 23, 24, ...
+and one for the rest.  The GNU @code{ngettext} function solves this problem:
+
address@hidden
+printf (ngettext ("%d files processed", "%d file processed", nfiles),
+        nfiles);
address@hidden example
+
 
 @node Character Set
 @section Character Set




reply via email to

[Prev in Thread] Current Thread [Next in Thread]