control: retitle -1 [XML] default bookinfo handling

Hi,

The root cause of the lack of translator credit support via po4a on XML
(DocBook) is the default option data to characterize <bookinfo>-tag
which includes author credit and copyright information.

I have initially discussed this at https://github.com/mquinson/po4a/issues/76
then posted its fix at https://github.com/mquinson/po4a/pull/145 as
https://github.com/mquinson/po4a/files/2363619/po4a-patch.zip

I initially thought about solving this problem with brute force
approach but it has side effects for non-DocBook data.

This inew root cause fix approach is essentially 1 line change:

>From f446899a8634e5c4cad245d8ec4d411715f5a0dd Mon Sep 17 00:00:00 2001
From: Osamu Aoki <os...@debian.org>
Date: Sat, 8 Sep 2018 23:13:26 +0900
Subject: [PATCH 2/3] DocBook: bookinfo has a displayed block

Signed-off-by: Osamu Aoki <os...@debian.org>
---
 lib/Locale/Po4a/Docbook.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/Locale/Po4a/Docbook.pm b/lib/Locale/Po4a/Docbook.pm
index f3f11bac..a4f64efb 100644
--- a/lib/Locale/Po4a/Docbook.pm
+++ b/lib/Locale/Po4a/Docbook.pm
@@ -326,9 +326,10 @@ sub initialize {
     $self->{options}{'_default_untranslated'} .= " <bookbiblio>";
     $self->{options}{'_default_break'} .= " <bookbiblio>";
 
-    # bookinfo; does not contain text; v4, not in v5
+    # bookinfo; does not contain text; Formatted as a displayed block;
+    # v4, not in v5
     $self->{options}{'_default_untranslated'} .= " <bookinfo>";
-    $self->{options}{'_default_placeholder'} .= " <bookinfo>";
+    $self->{options}{'_default_break'} .= " <bookinfo>";
 
     # bridgehead; contains text; Formatted as a displayed block
     $self->{options}{'_default_translated'} .= " <bridgehead>";
-- 
2.18.0

I realize this problem was not noticed and fixed earlier mostly because
debug output was not sufficient enough to understand the real problem.
I also had hard time to understand the manpage po4a(7) or to empirically
come up with addendum data previously.  So I addressed them iwith other
patches in this set of patches.

Osamu

Reply via email to