[Po4a-commits] "po4a/lib/Locale/Po4a Xml.pm, 1.75, 1.76 Xhtml.pm, 1.9, 1.10 Guide.pm, 1.12, 1.13 Docbook.pm, 1.23, 1.24 Dia.pm, 1.14, 1.15"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Sat Aug 23 01:37:09 UTC 2008


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory alioth:/tmp/cvs-serv27610/lib/Locale/Po4a

Modified Files:
	Xml.pm Xhtml.pm Guide.pm Docbook.pm Dia.pm 
Log Message:
	* NEWS, lib/Locale/Po4a/Xml.pm: Fix the handling of the nodefault
	option (it canceled the behavior defined on the command line).
	Added _default_tags and _default_inline categories (to be used
	only by derivative modules).
	* lib/Locale/Po4a/Xhtml.pm, lib/Locale/Po4a/Guide.pm,
	lib/Locale/Po4a/Docbook.pm, lib/Locale/Po4a/Dia.pm: Fix the Xml
	module derivatives accordingly.


Index: Docbook.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Docbook.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- Docbook.pm	22 Aug 2008 22:39:59 -0000	1.23
+++ Docbook.pm	23 Aug 2008 01:37:07 -0000	1.24
@@ -8,6 +8,7 @@
 # documents.
 #
 # Copyright (c) 2004 by Jordi Vilalta  <jvprat at gmail.com>
+# Copyright (c) 2007-2008 by Nicolas François <nicolas.francois at centraliens.net>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -64,6 +65,7 @@
 =head1 COPYRIGHT AND LICENSE
 
 Copyright (c) 2004 by Jordi Vilalta  <jvprat at gmail.com>
+Copyright (c) 2007-2008 by Nicolas François <nicolas.francois at centraliens.net>
 
 This program is free software; you may redistribute it and/or modify it
 under the terms of GPL (see the COPYING file).
@@ -89,7 +91,7 @@
 	$self->{options}{'tagsonly'}=1;
 	$self->{options}{'wrap'}=1;
 	$self->{options}{'doctype'}=$self->{options}{'doctype'} || 'docbook xml';
-	$self->{options}{'tags'} .= '
+	$self->{options}{'_default_tags'} = '
 		<abbrev>
 		<acronym>
 		W<address>
@@ -173,7 +175,7 @@
 		<title>
 		<titleabbrev>
 		<userinput>';
-	$self->{options}{'inline'} .= '
+	$self->{options}{'_default_inline'} = '
 		<action>
 		<anchor>
 		<application>

Index: Guide.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Guide.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- Guide.pm	17 Jun 2007 00:19:39 -0000	1.12
+++ Guide.pm	23 Aug 2008 01:37:07 -0000	1.13
@@ -85,7 +85,7 @@
 #TODO: <include href="..."> includes a file
 	$self->SUPER::initialize(%options);
 	$self->{options}{'tagsonly'}=1;
-	$self->{options}{'tags'}.='
+	$self->{options}{'_default_tags'}.='
 		w<abstract>
 		<author>
 		<b>
@@ -129,7 +129,7 @@
 		<guide>link
 		<p>by
 		<pre>caption';
-	$self->{options}{'inline'}.='
+	$self->{options}{'_default_inline'}.='
 		<b>
 		<brite>
 		<c>

Index: Xml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Xml.pm,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- Xml.pm	20 Jul 2008 17:35:42 -0000	1.75
+++ Xml.pm	23 Aug 2008 01:37:07 -0000	1.76
@@ -363,6 +363,9 @@
 			$self->{options}{$opt} = $options{$opt};
 		}
 	}
+	# Default options set by modules. Forbidden for users.
+	$self->{options}{'_default_tags'}='';
+	$self->{options}{'_default_inline'}='';
 
 	#It will maintain the list of the translatable tags
 	$self->{tags}=();
@@ -1524,12 +1527,16 @@
 	$self->{options}{'nodefault'} =~ /\s*(.*)\s*/s;
 	my %list_nodefault;
 	foreach (split(/\s+/s,$1)) {
-	    $list_nodefault{$_} = 1;
+		$list_nodefault{$_} = 1;
 	}
 	$self->{nodefault} = \%list_nodefault;
 
-	$self->{options}{'tags'} =~ /\s*(.*)\s*/s;
 	my @list_tags;
+	$self->{options}{'tags'} =~ /\s*(.*)\s*/s;
+	foreach my $tag (split(/\s+/s,$1)) {
+		push @list_tags, $tag;
+	}
+	$self->{options}{'_default_tags'} =~ /\s*(.*)\s*/s;
 	foreach my $tag (split(/\s+/s,$1)) {
 		push @list_tags, $tag
 			unless $list_nodefault{$tag};
@@ -1548,12 +1555,16 @@
 	my @list_attr = split(/\s+/s,$1);
 	$self->{attributes} = \@list_attr;
 
-	$self->{options}{'inline'} =~ /\s*(.*)\s*/s;
 	my @list_inline;
+	$self->{options}{'inline'} =~ /\s*(.*)\s*/s;
 	foreach my $tag (split(/\s+/s,$1)) {
 		push @list_inline, $tag
 			unless $list_nodefault{$tag};
 	}
+	$self->{options}{'_default_inline'} =~ /\s*(.*)\s*/s;
+	foreach my $tag (split(/\s+/s,$1)) {
+		push @list_inline, $tag;
+	}
 	$self->{inline} = \@list_inline;
 
 	$self->{options}{'placeholder'} =~ /\s*(.*)\s*/s;

Index: Xhtml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Xhtml.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- Xhtml.pm	14 Feb 2008 18:10:15 -0000	1.9
+++ Xhtml.pm	23 Aug 2008 01:37:07 -0000	1.10
@@ -8,7 +8,7 @@
 # documents.
 #
 # Copyright (c) 2005 by Yves Rütschlé <po4a at rutschle.net>
-# Copyright (c) 2007 by Nicolas François <nicolas.francois at centraliens.net>
+# Copyright (c) 2007-2008 by Nicolas François <nicolas.francois at centraliens.net>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -84,6 +84,7 @@
 =head1 COPYRIGHT AND LICENSE
 
 Copyright (c) 2004 by Yves Rütschlé <po4a at rutschle.net>
+Copyright (c) 2007-2008 by Nicolas François <nicolas.francois at centraliens.net>
 
 This program is free software; you may redistribute it and/or modify it
 under the terms of GPL (see the COPYING file).
@@ -165,7 +166,7 @@
         $self->{options}{'wrap'}=1;
         $self->{options}{'doctype'}=$self->{options}{'doctype'} || 'html';
 
-        $self->{options}{'inline'}.='
+        $self->{options}{'_default_inline'}.='
                 <a> 
                 <abbr> 
                 <acronym> 

Index: Dia.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Dia.pm,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- Dia.pm	17 Jun 2007 00:19:39 -0000	1.14
+++ Dia.pm	23 Aug 2008 01:37:07 -0000	1.15
@@ -93,7 +93,7 @@
 	$self->SUPER::initialize(%options);
 	$self->{options}{'tagsonly'}=1;
 	$self->{options}{'nostrip'}=1;
-	$self->{options}{'tags'}.=' <dia:string>';
+	$self->{options}{'_default_tags'}.=' <dia:string>';
 	$self->treat_options;
 }
 




More information about the Po4a-commits mailing list