[Po4a-commits] "po4a/lib/Locale/Po4a LaTeX.pm, 1.18, 1.19 TeX.pm, 1.100, 1.101 Texinfo.pm, 1.12, 1.13"
Nicolas FRANCOIS
nekral-guest at alioth.debian.org
Tue Mar 31 21:39:54 UTC 2009
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory alioth:/tmp/cvs-serv21375/lib/Locale/Po4a
Modified Files:
LaTeX.pm TeX.pm Texinfo.pm
Log Message:
* lib/Locale/Po4a/TeX.pm: Two escape sequences (\\ in LaTeX or @@
in Texinfo) do not introduce a command.
* lib/Locale/Po4a/TeX.pm: Escaped brackets should not be counted
(for the balancing of brackets).
* lib/Locale/Po4a/Texinfo.pm: Added support for opindex
Index: Texinfo.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Texinfo.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- Texinfo.pm 30 Jun 2008 20:27:39 -0000 1.12
+++ Texinfo.pm 31 Mar 2009 21:39:52 -0000 1.13
@@ -342,7 +342,7 @@
}
$translate_buffer_env{"ignore"} = \&translate_buffer_ignore;
-foreach (qw(appendix section cindex findex kindex pindex vindex subsection
+foreach (qw(appendix section cindex findex kindex opindex pindex vindex subsection
dircategory subtitle include
exdent center unnumberedsec
heading unnumbered unnumberedsubsec
@@ -392,9 +392,9 @@
foreach (qw(titlefont w i r b sansserif sc slanted strong t cite email
footnote indicateurl emph ref xref pxref inforef kbd key
acronym),
-# The following commands could cause problems since the their arguments
-# has a semantic and a translator could decide not to translate code but
-# still translate thses short words if they appear in another context.
+# The following commands could cause problems since their arguments
+# have a semantic and a translator could decide not to translate code but
+# still translate theses short words if they appear in another context.
qw(file command dfn dmn option math code samp var)) {
register_generic_command("-$_,{_}");
}
Index: TeX.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/TeX.pm,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -d -r1.100 -r1.101
--- TeX.pm 16 Mar 2009 20:30:11 -0000 1.100
+++ TeX.pm 31 Mar 2009 21:39:52 -0000 1.101
@@ -477,7 +477,7 @@
$variant = $2;
$buffer = $3;
# read the arguments (if any)
- while ($buffer =~ m/^\s*([\[\{])(.*)$/s) {
+ while ($buffer =~ m/^\s*$RE_PRE_COMMENT([\[\{])(.*)$/s) {
my $type = $1;
my $arg = "";
my $count = 1;
@@ -485,7 +485,7 @@
# stop reading the buffer when the number of ] (or }) matches the
# the number of [ (or {).
while ($count > 0) {
- if ($buffer =~ m/^(.*?)([\[\]\{\}])(.*)$/s) {
+ if ($buffer =~ m/^(.*?$RE_PRE_COMMENT)([\[\]\{\}])(.*)$/s) {
$arg .= $1;
$buffer = $3;
if ($2 eq $type) {
@@ -556,8 +556,8 @@
# While the buffer ends by }, consider it is a mandatory argument
# and extract this argument.
- while ( $buffer =~ m/^(.*(\{).*)\}$/s
- or $buffer =~ m/^(.*(\[).*)\]$/s) {
+ while ( $buffer =~ m/^(.*$RE_PRE_COMMENT(\{).*)$RE_PRE_COMMENT\}$/s
+ or $buffer =~ m/^(.*$RE_PRE_COMMENT(\[).*)$RE_PRE_COMMENT\]$/s) {
my $arg = "";
my $count = 1;
$buffer = $1;
@@ -565,7 +565,7 @@
# stop reading the buffer when the number of } (or ]) matches the
# the number of { (or [).
while ($count > 0) {
- if ($buffer =~ m/^(.*)([\{\}\[\]])(.*)$/s) {
+ if ($buffer =~ m/^(.*$RE_PRE_COMMENT)([\{\}\[\]])(.*)$/s) {
$arg = $3.$arg;
$buffer = $1;
if ($2 eq $type) {
@@ -588,7 +588,7 @@
}
# There should now be a command, maybe followed by an asterisk.
- if ($buffer =~ m/^(.*)$RE_ESCAPE([[:alnum:]]+)(\*?)\s*$/s
+ if ($buffer =~ m/^(.*$RE_PRE_COMMENT)$RE_ESCAPE([[:alnum:]]+)(\*?)\s*$/s
&& defined $separated_command{$2}) {
$buffer = $1;
$command = $2;
@@ -1100,15 +1100,15 @@
my $opening = 0;
# FIXME: { and } should not be counted in verbatim blocks
# Remove comments
- $tmp =~ s/($RE_PRE_COMMENT)$RE_COMMENT.*//mg;
- while ($tmp =~ /^.*?(?<!$RE_ESCAPE)(?:$RE_ESCAPE$RE_ESCAPE)*\{(.*)$/s) {
+ $tmp =~ s/$RE_PRE_COMMENT$RE_COMMENT.*//mg;
+ while ($tmp =~ /^.*?$RE_PRE_COMMENT\{(.*)$/s) {
$opening += 1;
$tmp = $1;
}
$tmp = $paragraph;
# Remove comments
- $tmp =~ s/($RE_PRE_COMMENT)$RE_COMMENT.*//mg;
- while ($tmp =~ /^.*?(?<!$RE_ESCAPE)(?:$RE_ESCAPE$RE_ESCAPE)*\}(.*)$/s) {
+ $tmp =~ s/$RE_PRE_COMMENT$RE_COMMENT.*//mg;
+ while ($tmp =~ /^.*?$RE_PRE_COMMENT\}(.*)$/s) {
$closing += 1;
$tmp = $1;
}
Index: LaTeX.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/LaTeX.pm,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- LaTeX.pm 16 Mar 2009 20:33:35 -0000 1.18
+++ LaTeX.pm 31 Mar 2009 21:39:52 -0000 1.19
@@ -375,7 +375,7 @@
# & is the cell separator, \\ is the line separator
# '\' is escaped twice
-$env_separators{'array'} =
+$env_separators{'array'} =
$env_separators{'tabular'} =
$env_separators{'tabularx'} = "(?:&|\\\\\\\\|\\\\hline)";
More information about the Po4a-commits
mailing list