[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
texinfo update (Wed Jun 20 16:53:01 EDT 2007)
From: |
Karl Berry |
Subject: |
texinfo update (Wed Jun 20 16:53:01 EDT 2007) |
Date: |
Wed, 20 Jun 2007 16:53:03 -0400 |
Index: ChangeLog
===================================================================
RCS file: /sources/texinfo/texinfo/ChangeLog,v
retrieving revision 1.708
retrieving revision 1.709
diff -u -r1.708 -r1.709
--- ChangeLog 20 Jun 2007 20:05:41 -0000 1.708
+++ ChangeLog 20 Jun 2007 20:27:40 -0000 1.709
@@ -1,5 +1,9 @@
2007-06-20 Karl Berry <address@hidden>
-
+
+ * texinfo.tex (\documentlanguagetrywithoutunderscore): new macro,
+ to try txi-de.tex if @documentlanguage de_DE.
+ (\documentlanguage): call it.
+
* lang.c (default_country_for_lang): just return country code, not
whole locale string.
Index: doc/texinfo.tex
===================================================================
RCS file: /sources/texinfo/texinfo/doc/texinfo.tex,v
retrieving revision 1.238
retrieving revision 1.239
diff -u -r1.238 -r1.239
--- doc/texinfo.tex 17 Jun 2007 15:22:19 -0000 1.238
+++ doc/texinfo.tex 20 Jun 2007 20:27:41 -0000 1.239
@@ -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{2007-06-16.10}
+\def\texinfoversion{2007-06-20.13}
%
% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -7434,22 +7434,41 @@
% @documentlanguage is usually given very early, just after
% @setfilename. If done too late, it may not override everything
-% properly. Single argument is the language abbreviation.
-% It would be nice if we could set up a hyphenation file here.
+% properly. Single argument is the language (de) or locale (de_DE)
+% abbreviation. It would be nice if we could set up a hyphenation file.
%
-\parseargdef\documentlanguage{%
+{
+ \catcode`\_ = \active
+ \globaldefs=1
+\parseargdef\documentlanguage{\begingroup
+ \let_=\normalunderscore % normal _ character for filenames
\tex % read txi-??.tex file in plain TeX.
- % Read the file if it exists.
+ % Read the file by the name they passed if it exists.
\openin 1 txi-#1.tex
\ifeof 1
- \errhelp = \nolanghelp
- \errmessage{Cannot read language file txi-#1.tex}%
+ \documentlanguagetrywithoutunderscore{#1_\finish}%
\else
\input txi-#1.tex
\fi
\closein 1
\endgroup
+\endgroup}
}
+%
+% If they passed de_DE, and txi-de_DE.tex doesn't exist,
+% try txi-de.tex.
+%
+\def\documentlanguagetrywithoutunderscore#1_#2\finish{%
+ \openin 1 txi-#1.tex
+ \ifeof 1
+ \errhelp = \nolanghelp
+ \errmessage{Cannot read language file txi-#1.tex}%
+ \else
+ \input txi-#1.tex
+ \fi
+ \closein 1
+}
+%
\newhelp\nolanghelp{The given language definition file cannot be found or
is empty. Maybe you need to install it? In the current directory
should work if nowhere else does.}
Index: doc/texinfo.txi
===================================================================
RCS file: /sources/texinfo/texinfo/doc/texinfo.txi,v
retrieving revision 1.194
retrieving revision 1.195
diff -u -r1.194 -r1.195
--- doc/texinfo.txi 17 Jun 2007 22:50:12 -0000 1.194
+++ doc/texinfo.txi 20 Jun 2007 20:27:41 -0000 1.195
@@ -1,5 +1,5 @@
\input texinfo.tex @c -*-texinfo-*-
address@hidden $Id: texinfo.txi,v 1.194 2007/06/17 22:50:12 karl Exp $
address@hidden $Id: texinfo.txi,v 1.195 2007/06/20 20:27:41 karl Exp $
@c Ordinarily, Texinfo files have the extension .texi. But texinfo.texi
@c clashes with texinfo.tex on 8.3 filesystems, so we use texinfo.txi.
@@ -13385,10 +13385,11 @@
@findex documentlanguage
@cindex Language, declaring
address@hidden Locale, declaring
@cindex Document language, declaring
The @code{@@documentlanguage} command declares the current document
-language. Write it on a line by itself, near the beginning of the
+locale. Write it on a line by itself, near the beginning of the
file, but after @code{@@setfilename}
(@pxref{setfilename,,@code{@@setfilename}}).
@@ -13400,8 +13401,9 @@
the default is @code{en_US} for US English.
As with GNU Gettext (@pxref{Top,,,gettext, Gettext}), if the country
-code is omitted, the main dialect is assumed. For example, @code{de}
-is equivalent to @code{de_DE} (German as spoken in Germany).
+code is omitted, the main dialect is assumed where possible. For
+example, @code{de} is equivalent to @code{de_DE} (German as spoken in
+Germany).
@cindex Document strings, translation of
For Info and other online output, this command changes the translation
@@ -13412,15 +13414,18 @@
there; they are translated in other output formats.
@cindex @address@hidden
-For @TeX{}, this command causes the file @address@hidden to be
-read (if it exists). Such a file appropriately redefines the various
-English words used in @TeX{} output, such as `Chapter', `See', and so
-on.
-
-We are aware that individual words like these cannot always be
-translated in isolation, and that a very different strategy would be
-required for ideographic (among other) scripts. Help in improving
-Texinfo's language support would be welcome.
+For @TeX{}, this command causes a file @address@hidden to
+be read (if it exists). If @code{@@setdocumentlanguage} argument
+contains the optional @address@hidden suffix, this is tried first.
+For example, with @code{@@setdocumentlanguage de_DE}, @TeX{} first
+looks for @file{txi-de_DE.tex}, then @file{txi-de.tex}.
+
+Such a @file{txi-*} file is intended to redefine the various English
+words used in @TeX{} output, such as `Chapter', `See', and so on. We
+are aware that individual words like these cannot always be translated
+in isolation, and that a very different strategy would be required for
+ideographic (among other) scripts. Help in improving Texinfo's
+language support is welcome.
@cindex Hyphenation patterns, language-dependent
It would also be desirable for this command to also change @TeX{}'s
@@ -18739,7 +18744,7 @@
(@url{http://www.gnu.org/software/rcs}) version control systems, which
expand it into a string such as:
@example
-$Id: texinfo.txi,v 1.194 2007/06/17 22:50:12 karl Exp $
+$Id: texinfo.txi,v 1.195 2007/06/20 20:27:41 karl Exp $
@end example
(This is useful in all sources that use version control, not just manuals.)
You may wish to include the @samp{$Id:} comment in the @code{@@copying}
@@ -18805,7 +18810,7 @@
@verbatim
\input texinfo @c -*-texinfo-*-
address@hidden $Id: texinfo.txi,v 1.194 2007/06/17 22:50:12 karl Exp $
address@hidden $Id: texinfo.txi,v 1.195 2007/06/20 20:27:41 karl Exp $
@comment %**start of header
@setfilename sample.info
@include version.texi
P ChangeLog
P doc/texinfo.tex
P doc/texinfo.txi
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- texinfo update (Wed Jun 20 16:53:01 EDT 2007),
Karl Berry <=