[Redirected to -i18n]

On Tue, Apr 17, 2001 at 06:39:34PM +0400, Andrey A. Chernov wrote:
> On Tue, Apr 17, 2001 at 17:04:19 +0300, Ruslan Ermilov wrote:
[...]
> 
> > difference in implementation (the current implementation simply redefines
> > some -mdoc string variables), if you run ``nroff -mdoc'' for English manpage,
> > and your LANG environment variable is set to ru_RU.KOI8-R, you will get the
> > corrupted output.
> 
> This is unacceptable and must be fixed soon (LANG supposed to be always
> set for Russians, and requiring extra argument for nroff is very
> contr-intuitive in the light of the fact that old version works without
> it).
> 
Sure, just wanted to discuss the change first.  :-)

Here is the solution I can come up with right now.

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:

Index: apropos.1
===================================================================
RCS file: /home/rucvs/frdp/doc/ru_RU.KOI8-R/man/man1/apropos.1,v
retrieving revision 1.2
diff -u -p -r1.2 apropos.1
--- apropos.1   2001/02/09 13:47:42     1.2
+++ apropos.1   2001/04/17 15:23:14
@@ -16,6 +16,7 @@
 .\" $FreeBSDru: frdp/doc/ru_RU.KOI8-R/man/man1/apropos.1,v 1.2 2001/02/09 13:47:42 ru 
Exp $
 .\" Original revision: 1.5.2.2
 .\"
+.ds lang ru_RU.KOI8-R
 .Dd 15 января 1991
 .Dt APROPOS 1
 .Os


Then, mdoc.local script would load locale-specific file depending on the
value of that variable:

Index: mdoc.local
===================================================================
RCS file: /home/ncvs/src/gnu/usr.bin/groff/tmac/mdoc.local,v
retrieving revision 1.1
diff -u -p -r1.1 mdoc.local
--- mdoc.local  2001/04/17 12:37:18     1.1
+++ mdoc.local  2001/04/17 15:35:37
@@ -58,5 +58,7 @@
 .ds doc-operating-system FreeBSD\~5.0
 .
 .
-.\" KOI8-R locale support
-.if "\*[.T]"koi8-r" .mso mdoc/koi8-r
+.\" Locale support
+.if d doc-lang \{\
+.  if "\*[doc-lang]"ru_RU.KOI8-R" .mso mdoc/koi8-r
+.\}

Note that the "doc-" prefix is stripped when mdoc-local is installed.
Does this looks acceptable to you?


Cheers,
-- 
Ruslan Ermilov          Oracle Developer/DBA,
[EMAIL PROTECTED]           Sunbay Software AG,
[EMAIL PROTECTED]          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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to