On Fri, Jul 11, 2025 at 07:14:13PM +0200, Sebastian Meyer wrote:
> Now that CTAN no longer contains the translation files (following a recent
> thread on this list,
> <https://lists.gnu.org/archive/html/bug-texinfo/2025-06/msg00061.html>), the
> texinfo bundle from CTAN is no longer sufficient to process the following
> minimal Texinfo document
> 
>     \input texinfo
>     @settitle Test of document language
>     @documentlanguage en
>     foo
>     @bye
> 
> texi2pdf will fail from trying to read the language file txi-en.tex:
> 
> > ./test.texi:3: Cannot read language file txi-en.tex.
> > @documentlanguagetrywithoutunderscore ...i-#1.tex}
> >                                                   @else @globaldefs = 1 
> > @inp...
> > 
> > @\documentlanguage ...ithoutunderscore #1_@finish
> > @else @globaldefs = 1 @inp...
> > l.3 @documentlanguage en
> >                          ? ./test.texi:3: Emergency stop.
> 
> This is a pity as reading txi-en.tex seems to be a no-op in this case: it
> only replicates the English defaults from the main texinfo.tex. However,
> declaring the document language is good practice, and it isn't a no-op for
> `texi2any --html` where it is used to set the "lang" attribute.
> 
> Would it make sense for texinfo.tex to skip over @documentlanguage en when
> no other language has been set before?

It seems like it is a special case for not much benefit. txi-LL.tex would
be read for any other value of LL and so I expect users would generally
expect txi-en.tex to be read the same way.

Although there was some discussion on this list the packaging decisions
of CTAN and/or MikTeX are not the Texinfo project's responsibility and
this is not an issue we have caused (just for the avoidance of any doubt,
I'm not saying that anybody was saying this).

It seems like the issue is easily fixed by distributing txi-en.tex as
before - or by removing the "@documentlanguage en" line.

The translation files do not take up a lot of space so I don't think
there should be an issue with distributing them, or at the very least
txi-en.tex.

$ du --si -c txi-??.tex
4.1k    txi-ca.tex
4.1k    txi-cs.tex
4.1k    txi-de.tex
4.1k    txi-en.tex
4.1k    txi-es.tex
4.1k    txi-fi.tex
4.1k    txi-fr.tex
4.1k    txi-hu.tex
4.1k    txi-is.tex
4.1k    txi-it.tex
25k     txi-ja.tex
4.1k    txi-nb.tex
4.1k    txi-nl.tex
4.1k    txi-nn.tex
4.1k    txi-pl.tex
4.1k    txi-pt.tex
4.1k    txi-ru.tex
4.1k    txi-sr.tex
4.1k    txi-tr.tex
4.1k    txi-uk.tex
13k     txi-zh.tex
115k    total
 

Reply via email to