[Po4a-commits] "po4a/lib/Locale/Po4a TeX.pm,1.76,1.77"
Nicolas FRANCOIS
nekral-guest at alioth.debian.org
Wed Sep 21 20:18:49 UTC 2005
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv18913/lib/Locale/Po4a
Modified Files:
TeX.pm
Log Message:
check_arg_count is called before translate_environment. We must verify
there that the given environment is registered.
Also use wrap_ref_mod instead of wrap_mod (the line references are really
useful!).
Index: TeX.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/TeX.pm,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- TeX.pm 21 Sep 2005 20:16:17 -0000 1.76
+++ TeX.pm 21 Sep 2005 20:18:46 -0000 1.77
@@ -1244,9 +1244,9 @@
if (!@$env || @$env[-1] ne $args->[1]) {
# a begin may have been hidden in the middle of a translated
# buffer. FIXME: Just warn for now.
- warn wrap_mod("po4a::tex",
- dgettext("po4a", "unmatched end of environment '%s'"),
- $args->[1]);
+ warn wrap_ref_mod($self->{'ref'}, "po4a::tex",
+ dgettext("po4a", "unmatched end of environment '%s'"),
+ $args->[1]);
} else {
pop @$env;
}
@@ -1455,6 +1455,11 @@
$check = 0;
}
my $env = shift @targs;
+ if (not defined $environment_parameters{$env}) {
+ die wrap_ref_mod($self->{ref},"po4a::tex",
+ dgettext("po4a", "unknown environment: '%s'"),
+ $env);
+ }
@arg_types = @{$environment_parameters{$env}{'types'}};
} else {
@arg_types = @{$command_parameters{$command}{'types'}};
More information about the Po4a-commits
mailing list