unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob d577fed748efd1fc426c549bda988d1582417d7c 1480 bytes (raw)
name: gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 
Description: docbook2man should translate the NAME section according to the REFENTRY's lang attribute
 Currently, docbook2man translates the NAME section according to the lang
 attribute provided to the REFNAMEDIV tag.
 When a lang attribute is specified in the REFENTRY tag and no lang
 attribute is specified with the REFNAMEDIV, the lang attribute of the
 REFENTRY should be used.
Author: Nicolas François <nicolas.francois@centraliens.net>
Forwarded: not-needed
Bug-Debian: http://bugs.debian.org/394511

Index: docbook-utils-0.6.14/helpers/docbook2man-spec.pl
===================================================================
--- docbook-utils-0.6.14.orig/helpers/docbook2man-spec.pl	2012-05-09 18:55:53.276783163 +0200
+++ docbook-utils-0.6.14/helpers/docbook2man-spec.pl	2012-05-09 18:58:04.792778418 +0200
@@ -359,11 +359,14 @@
 # NAME section
 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");}
+	# Use the REFNAMEDIV's lang attribute, and default to the
+	# REFENTRY's lang attribute.
+	my $lang = $_[0]->attribute('LANG')->value;
+	$lang = $manpage_lang unless defined $lang;
+	if (defined($lang) and defined $words{lc($lang)}) {
+		my $ad = $words{lc($lang)};
+		output("\n.SH $ad\n");}
+	else {	output("\n.SH NAME\n");}
 });
 
 sgml('<REFNAME>', \&save_cdata);

debug log:

solving d577fed748 ...
found d577fed748 in https://yhetil.org/guix-patches/40aa16c4ec5e774fa7ad47a488eb1c89250490b1.1692830149.git.mirai@makinata.eu/ ||
	https://yhetil.org/guix-patches/dd229d3a7357a415c0670e9591ad8c74821b60cb.1695478390.git.mirai@makinata.eu/

applying [1/1] https://yhetil.org/guix-patches/40aa16c4ec5e774fa7ad47a488eb1c89250490b1.1692830149.git.mirai@makinata.eu/
diff --git a/gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch b/gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch
new file mode 100644
index 0000000000..d577fed748

1:24: space before tab in indent.
 	my %words = qw( fr NOM es NOMBRE de NAME );
1:39: trailing whitespace.
 
Checking patch gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch...
Applied patch gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch cleanly.
warning: 2 lines add whitespace errors.

skipping https://yhetil.org/guix-patches/dd229d3a7357a415c0670e9591ad8c74821b60cb.1695478390.git.mirai@makinata.eu/ for d577fed748
index at:
100644 d577fed748efd1fc426c549bda988d1582417d7c	gnu/packages/patches/docbook-utils-respect-refentry-for-name.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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