From owner-freebsd-i18n Tue Apr 17 8:48:31 2001 Delivered-To: freebsd-i18n@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 287A737B423; Tue, 17 Apr 2001 08:48:20 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f3HFlgd64382; Tue, 17 Apr 2001 18:47:42 +0300 (EEST) (envelope-from ru) Date: Tue, 17 Apr 2001 18:47:42 +0300 From: Ruslan Ermilov To: "Andrey A. Chernov" Cc: i18n@FreeBSD.ORG, ru-cvs-all@FreeBSD.org.ua Subject: -mdoc localization support (was: Re: ** HEADS UP ** Groff 1.17 (including -mdocNG) imported) Message-ID: <20010417184742.A61775@sunbay.com> References: <20010417163318.A47398@sunbay.com> <20010417173754.A19540@nagual.pp.ru> <20010417170419.C47398@sunbay.com> <20010417183933.C20680@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: <20010417183933.C20680@nagual.pp.ru>; from ache@nagual.pp.ru on Tue, Apr 17, 2001 at 06:39:34PM +0400 Sender: owner-freebsd-i18n@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [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, 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