Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Apr 2001 12:13:19 +0300
From:      Ruslan Ermilov <ru@FreeBSD.ORG>
To:        =?koi8-r?B?4c7E0sXKIP7F0s7P1w==?= <ache@nagual.pp.ru>
Cc:        i18n@FreeBSD.ORG, ru-cvs-all@FreeBSD.org.ua
Subject:   Re: -mdoc localization support (was: Re: ** HEADS UP ** Groff 1.17 (including -mdocNG) imported)
Message-ID:  <20010418121319.A48752@sunbay.com>
In-Reply-To: <20010418124114.A33411@nagual.pp.ru>; from ache@nagual.pp.ru on Wed, Apr 18, 2001 at 12:41:16PM %2B0400
References:  <20010417163318.A47398@sunbay.com> <20010417173754.A19540@nagual.pp.ru> <20010417170419.C47398@sunbay.com> <20010417183933.C20680@nagual.pp.ru> <20010417184742.A61775@sunbay.com> <20010418124114.A33411@nagual.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 18, 2001 at 12:41:16PM +0400, Андрей Чернов wrote:
> On Tue, Apr 17, 2001 at 18:47:42 +0300, Ruslan Ermilov wrote:
> > Every localized manpage should include one prologue line (similar to
> > how this is done in calendar(1) files) that will set locale language
> > to be used.   For example, Russian manual pages would look like this:
> 
> Please explain first the need of this prologue (I don't understand why any
> special processing ever needed). F.e. I can view English manpage in
> KOI8-R locale in old variant because English is subset of KOI8-R. So, I
> can view Russian manpage too, I see no difference or any prologue needs.
> 
In the old -mdoc, KOI8-R locale support was implemented like this:

1.  tmac.doc loaded tmac/mdoc/locale/locale-list

2.  locale-list checked the value of \*[.T] variable (the argument to the
    troff(1)'s -T flag), and if that is "koi8-r", simply loaded localization
    file, mdoc/locale/koi8-r.  Neither this is necessary for English manpages,
    nor this is longer works because of the "dirrerences in implementation".
    Old -mdoc localization worked by extending some macros and implementing
    a few locale macros.  This is no longer needed with new -mdoc, see at
    the actual implementation in src/gnu/usr.bin/groff/tmac/koi8-r to get
    the idea.

3.  Current implementation still bogusly loads locale file (koi8-r) if
    \*[.T] variable is "koi8-r", but loading koi8-r locale file now
    _overwrites_ some -mdoc variables with localized values, e.g.
    standard section names, library names, etc., i.e. it assumes
    that the manpage is in ru_RU.KOI8-R.  Got it?

So we need another way to specify the language of the manual page being
processed.  I proposed that we add the \*[doc-lang] variable, similar to
the $LANG environment variable.  One way to set it is the prologue line
in every localized manpage, similar to how this is done in calendar(1).
Another way is to have man(1) automatically set this variable depending
on the share/man subdirectory like this:

    /usr/bin/groff -S -Wall -mtty-char -man -Tkoi8-r -dlang=ru.KOI8-R

The first one has an advantage that the page will be displayed correctly
irrespective of its actual location, but has an obvious disadvantage of
forcing every single manpage to have the prologue line.  The second one
has their advantages and disadvantages reversed.


Cheers,
-- 
Ruslan Ermilov		Oracle Developer/DBA,
ru@sunbay.com		Sunbay Software AG,
ru@FreeBSD.org		FreeBSD committer,
+380.652.512.251	Simferopol, Ukraine

http://www.FreeBSD.org	The Power To Serve
http://www.oracle.com	Enabling The Information Age

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-i18n" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010418121319.A48752>