From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8028 invoked by alias); 14 Oct 2002 14:17: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 8018 invoked from network); 14 Oct 2002 14:17:17 -0000 Received: from unknown (HELO zobe.linuxfr.org) (213.193.17.3) by sources.redhat.com with SMTP; 14 Oct 2002 14:17:17 -0000 Received: by zobe.linuxfr.org (Postfix, from userid 1015) id C466AEC94; Mon, 14 Oct 2002 16:16:03 +0200 (CEST) Date: Fri, 20 Dec 2002 19:23:00 -0000 To: docbook-tools-discuss@sources.redhat.com Subject: docbook2man and translated manpages, Act II Message-ID: <20021014141603.GA32621@zobe.linuxfr.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="DocE+STaALJfprDB" Content-Disposition: inline User-Agent: Mutt/1.3.28i From: barbier@linuxfr.org (Denis Barbier) X-SW-Source: 2002/txt/msg00142.txt.bz2 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 784 [I am not subscribed to this ML, please Cc me] Hi Tim and others, Here are your comments about the patch I sent to the Debian Bug Tracking System, which is also attached: > The problem with the patch is that it uses $LANG to determine the > language that the document is written in---unfortunately, it just > tells us the language that the current user is using, not the > languange used by the document author. For that, we must use the > current value of the 'lang' attribute. (That way a single document > could contain all of the translations.) Could you please have a second look on it? Take any manpage written with docbook, replace by and run docbook2man, it still generates foo.1 Now apply this patch and foo.xx.1 is generated. Denis --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="docbook2man-spec.pl.patch" Content-length: 803 --- docbook2man-spec.pl.orig Mon Jul 8 16:00:49 2002 +++ docbook2man-spec.pl Tue Jul 16 00:25:42 2002 @@ -244,6 +244,14 @@ $manpage_misc = ''; $list_nestlevel = 0; # Indent certain nested content. + + # check refentry's language + if(defined($_[0]->attribute('LANG')->value)) { + $manpage_lang = $_[0]->attribute('LANG')->value; + } + else { + $manpage_lang = ''; + } }); sgml('', sub { if(!$newline_last) { @@ -256,7 +264,11 @@ }); sgml('', sub { - push_output('file', "$manpage_title.$manpage_sect"); + if ($manpage_lang) { + push_output('file', "$manpage_title.$manpage_lang.$manpage_sect"); + } else { + push_output('file', "$manpage_title.$manpage_sect"); + } output <<_END_BANNER; .\\" This manpage has been automatically generated by docbook2man --DocE+STaALJfprDB-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8028 invoked by alias); 14 Oct 2002 14:17: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 8018 invoked from network); 14 Oct 2002 14:17:17 -0000 Received: from unknown (HELO zobe.linuxfr.org) (213.193.17.3) by sources.redhat.com with SMTP; 14 Oct 2002 14:17:17 -0000 Received: by zobe.linuxfr.org (Postfix, from userid 1015) id C466AEC94; Mon, 14 Oct 2002 16:16:03 +0200 (CEST) Date: Mon, 14 Oct 2002 07:17:00 -0000 To: docbook-tools-discuss@sources.redhat.com Subject: docbook2man and translated manpages, Act II Message-ID: <20021014141603.GA32621@zobe.linuxfr.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="DocE+STaALJfprDB" Content-Disposition: inline User-Agent: Mutt/1.3.28i From: barbier@linuxfr.org (Denis Barbier) X-SW-Source: 2002-q4/txt/msg00010.txt.bz2 Message-ID: <20021014071700.iWVNUNStOtJL4KKU-wBjOc_1AiVbCNUhZ3ujaN0rVSs@z> --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 784 [I am not subscribed to this ML, please Cc me] Hi Tim and others, Here are your comments about the patch I sent to the Debian Bug Tracking System, which is also attached: > The problem with the patch is that it uses $LANG to determine the > language that the document is written in---unfortunately, it just > tells us the language that the current user is using, not the > languange used by the document author. For that, we must use the > current value of the 'lang' attribute. (That way a single document > could contain all of the translations.) Could you please have a second look on it? Take any manpage written with docbook, replace by and run docbook2man, it still generates foo.1 Now apply this patch and foo.xx.1 is generated. Denis --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="docbook2man-spec.pl.patch" Content-length: 803 --- docbook2man-spec.pl.orig Mon Jul 8 16:00:49 2002 +++ docbook2man-spec.pl Tue Jul 16 00:25:42 2002 @@ -244,6 +244,14 @@ $manpage_misc = ''; $list_nestlevel = 0; # Indent certain nested content. + + # check refentry's language + if(defined($_[0]->attribute('LANG')->value)) { + $manpage_lang = $_[0]->attribute('LANG')->value; + } + else { + $manpage_lang = ''; + } }); sgml('', sub { if(!$newline_last) { @@ -256,7 +264,11 @@ }); sgml('', sub { - push_output('file', "$manpage_title.$manpage_sect"); + if ($manpage_lang) { + push_output('file', "$manpage_title.$manpage_lang.$manpage_sect"); + } else { + push_output('file', "$manpage_title.$manpage_sect"); + } output <<_END_BANNER; .\\" This manpage has been automatically generated by docbook2man --DocE+STaALJfprDB--