From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25651 invoked by alias); 27 Jul 2002 15:52:18 -0000 Mailing-List: contact docbook-tools-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: docbook-tools-discuss-owner@sources.redhat.com Received: (qmail 25637 invoked from network); 27 Jul 2002 15:52:14 -0000 Received: from unknown (HELO math.teaser.net) (213.91.2.4) by sources.redhat.com with SMTP; 27 Jul 2002 15:52:14 -0000 Received: from clalis.pclnet (d45-210.ppp.teaser.fr [213.91.45.210]) by math.teaser.net (Postfix) with ESMTP id 3226F6C820 for ; Sat, 27 Jul 2002 17:52:13 +0200 (CEST) Received: by clalis.pclnet (Postfix, from userid 1000) id 08B8C181C1; Sat, 27 Jul 2002 17:55:52 +0200 (CEST) Date: Sat, 27 Jul 2002 08:52:00 -0000 From: Philippe Batailler To: docbook-tools-discuss@sources.redhat.com Subject: about docbook2man (docbook2man-spec.pl) Message-ID: <20020727155552.GA617@clalis> Reply-To: pbatailler@teaser.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.25i X-SW-Source: 2002-q3/txt/msg00024.txt.bz2 Message-ID: <20020727085200.t9VbACElkcXuq2zIx4bUWLoVeOBedJbY0NGPCSVgWIk@z> Hello, When using package docbook-utils, version 0.6.11, and docbook2man to create a manpage, the output shows "NAME" for every language. It should be localized. Also, the non breakable space, nbsp, is handled like a simple space; and, for french language, we need a declaration of "thinsp". What do you think of the kind of patch I attach to this mail ? Please, cc me. Regards, -- philippe batailler in girum imus nocte et consumimur igni ----------------------------------------------- --- docbook2man-spec.pl Thu Jul 25 22:55:11 2002 +++ docbook2man-spec.pl.new Thu Jul 25 22:59:57 2002 @@ -344,7 +344,16 @@ # NAME section -man_sgml('', "\n.SH NAME\n"); +# one can add key-value pair in '%words' +# and the good 'name' will be printed. +man_sgml('', sub { + my %words = qw( fr NOM es NOMBRE de NAME ); + if (defined($_[0]->attribute('LANG')->value)) { + my $id = $_[0]->attribute('LANG')->value; + my $ad = $words{$id}; + output("\n.SH $ad\n");} + else {output("\n.SH NAME\n");} +}); sgml('', \&save_cdata); sgml('', sub { @@ -1154,7 +1163,8 @@ man_sgml('|[lt ]|', '<'); man_sgml('|[gt ]|', '>'); man_sgml('|[amp ]|', '&'); -man_sgml('|[nbsp ]|', ' '); +man_sgml('|[nbsp ]|', '\~'); +man_sgml('|[thinsp ]|', '\~'); # # Default handlers (uncomment these if needed). Right now, these are set