From: Philippe Batailler <pbatailler@teaser.fr>
To: docbook-tools-discuss@sources.redhat.com
Subject: about docbook2man (docbook2man-spec.pl)
Date: Sat, 27 Jul 2002 08:52:00 -0000 [thread overview]
Message-ID: <20020727155552.GA617@clalis> (raw)
Message-ID: <20020727085200.t9VbACElkcXuq2zIx4bUWLoVeOBedJbY0NGPCSVgWIk@z> (raw)
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('<REFNAMEDIV>', "\n.SH NAME\n");
+# one can add key-value pair in '%words'
+# and the good 'name' will be printed.
+man_sgml('<REFNAMEDIV>', 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('<REFNAME>', \&save_cdata);
sgml('</REFNAME>', 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
next reply other threads:[~2002-07-27 15:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-20 19:23 Philippe Batailler [this message]
2002-07-27 8:52 ` Philippe Batailler
2002-12-20 19:23 ` Tim Waugh
2002-07-28 11:14 ` Tim Waugh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020727155552.GA617@clalis \
--to=pbatailler@teaser.fr \
--cc=docbook-tools-discuss@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).