Re: translated manuals output file and directory name/location

Patrice Dumas <[email protected]> Mon, 3 Aug 2026 21:48:18 +0200
Newsgroups gmane.comp.tex.texinfo.bugs
Message-ID <[email protected]>
On Tue, Jul 21, 2026 at 02:25:47PM +0200, Patrice Dumas wrote:
> I already answered in the other thread, if we install manuals in LL, it
> means that we need to add the LL information in the Info file and
> process it with install-info, and have /usr/share/info/LL added to the
> INFOPATH, either manually by the user, or automatically based on
> LANGUAGE or something like that.  This is possible, but requires some
> changes to the commands, in contrast with installing all the files in
> the same directory.  Since that kind of change is needed for dir anyway,
> this is not such an issue, however.

Do we have a consensus on that subject?  Assuming that we do, here is a
more detailed proposal for discussion and implementation:

* we should settle on a representation of the @documentlanguage,
  @documentscript and @documentlanguagevariant, as a LL string that can
  be used as a subdirectory.  The main choices could be a BCP47 language
  tag or an XPG locale.  The BCP47 language tag tend to have my
  preference, for two reasons, one is that it is the most common way to
  specify languages, and second it can already represent all the
  languages, but an XPG locale would be ok too.
* The manuals are installed in a LL subdirectory by install-info, LL being
  based on @documentlanguage, @documentscript and
  @documentlanguagevariant as described in the previous point.  The
  manual information is added to the dir file in this subdirectory.

  The user could add such directories to INFOPATH manually.
* The Info readers should also have a way to add the LL subdirectory
  (semi-)automatically to merge the dir directory from there to search
  for manual names and perform other computations on merged dir files.

  Adding the LL subdirectory(ies) could be done with
   - a customization variable in the Info readers
   - an environment variable, like INFO_LANGUAGES=LL:OO::MM_mm-Latn
   - a way to signal that the LANGUAGE environment variable should be
     used, for example a directory consisting only in a special character
     in the INFOPATH, such as @ could be considered to signal to use
     LANGUAGE, or a customization variable in the Info reader could be
     set to trigger using LANGUAGE languages to set the list of
     info languages (possibly converting XPG locale to BCP47 language
     tag).

Changes to be done to texi2any:

when generating the Info file, the @documentlanguage, @documentscript
and @documentlanguagevariant information should be made available in the
Info file.  I propose to use the same method as the one used to convey
that information to Info readers that output translated strings.  Given
the previous discussion:
  https://lists.gnu.org/archive/html/bug-texinfo/2026-05/msg00009.html
this should be through variables, Info-documentlanguage,
Info-documentscript (and Info-documentlanguagevariant for consistency).

Changes to be done to install-info:

read Info-documentlanguage, Info-documentscript and
Info-documentlanguagevariant, generate a LL language name, install
the manual in the LL subdirectory and put the manual in the LL/dir
file.

Changes to be done to Info readers:

Cf point above on adding some language subdirectories automatically to
the INFOPATH.

-- 
Pat