public inbox for docbook-tools-discuss@sourceware.org
 help / color / mirror / Atom feed
* about docbook2man (docbook2man-spec.pl)
@ 2002-12-20 19:23 Philippe Batailler
  2002-07-27  8:52 ` Philippe Batailler
  2002-12-20 19:23 ` Tim Waugh
  0 siblings, 2 replies; 4+ messages in thread
From: Philippe Batailler @ 2002-12-20 19:23 UTC (permalink / raw)
  To: docbook-tools-discuss

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-07-28 18:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-20 19:23 about docbook2man (docbook2man-spec.pl) Philippe Batailler
2002-07-27  8:52 ` Philippe Batailler
2002-12-20 19:23 ` Tim Waugh
2002-07-28 11:14   ` Tim Waugh

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).