Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Sep 1996 21:34:19 -0500 (EST)
From:      John Fieber <jfieber@indiana.edu>
To:        Satoshi Asami <asami@freebsd.org>
Cc:        doc@freebsd.org
Subject:   Re: language-specific manuals
Message-ID:  <Pine.BSI.3.95.960912204530.1328G-100000@fallout.campusview.indiana.edu>
In-Reply-To: <199609121029.DAA01831@silvia.HIP.Berkeley.EDU>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 12 Sep 1996, Satoshi Asami wrote:

> What do you think is the right place to put localized man pages?

You must be reading my mind!  I was just thinking about this.

> /usr/share/man/man?/${LANG}
> /usr/share/man/${LANG}/man?
> /usr/share/${LANG}/man/man?
> /usr/${LANG}/share/man/man?
> 
> My guess would be the second, since that way you can just stick in the 
> value of ${LANG} between the manpath component and the section
> subdirectories.

In the latest version of man(1) that Wolfram mentioned, the second
is implemented.  It seems reasonable to me.

What I'm not so sure on is how they should be laid out in the source
tree.  For the message catalogs, I looked at how ee was laid out:

ee/
  nls/
    de_DE.ISO_8859-1/
      ee.msg
    en_US.ISO_8859-1/
      ee.msg
    fr_FR.ISO_8859-1/
      ee.msg

Which amounts to more directories than files.  On the other hand, it
does nicely mirror the installed state.  The top level makefile runs
gencat as part of the installation process, depositing the output
directly in the install directory.  This, of course, opens
possibilties for build errors occuring during an install which isn't
aesthetically pleasing.  It would be nice if they were built in the
all target, but dealing with obj directories could get messy when all
subdirs are done with a single makefile. Adding makefiles to the
above directories would create more makefiles than files to make!

For man pages, one approach would be to use a similar scheme,
slightly modified to infer the man? layer of directories from the
filename extension:

ee/
  man/
    de_DE.ISO_8859-1/
      ee.1
    en_US.ISO_8859-1/
      ee.1
    fr_FR.ISO_8859-1/
      ee.1

Also note that this puts the english man page on a level with the
other languages.  Some might appreciate this turn of events.  Of
course, if they were actually installed that way, man(1) would have
to know which language to fall back on if no page was found in the
directory indicated by $LANG.

If the layout is standardized enough, then populating the nls and man
directories with Makefiles could probably be avoided.

Or, we could cut out the man an nls directory layer entirely and
merge the two, but then you have files in a single directory being
installed in different places in the system (assuming both catalogs
and man pages).

Finally, how about selective building and installing?  Japanese man
pages, for example, wouldn't be very helpful to me.  I can imagine
the binary distribution having optional "language packs" including
any localized man pages and message catalogs.  But then how about
installing a hybrid including localized man pages, and a subset
of english man pages to fill in where the localized ones are not
present...   (Having a panic attack yet Jordan?)

With the handbook, the problem arises of having multiple translations
of some files, but not others, yet *a* version of each is needed to
build the whole handbook, regardless of language.  Consequently, some
files may be shared between different versions.  Actually, this isn't
a difficult problem to solve, but should the english version be
installed in /usr/share/doc/handbook, or 
/usr/share/doc/handbook/en_US.ISO_8859-1?

There are a lot of logistical details once you start thinking about
it.

-john

== jfieber@indiana.edu ===========================================
== http://fallout.campusview.indiana.edu/~jfieber ================




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.3.95.960912204530.1328G-100000>