[Po4a-commits] r2286 - in /trunk: changelog lib/Locale/Po4a/Man.pm
nekral-guest at users.alioth.debian.org
nekral-guest at users.alioth.debian.org
Mon Oct 11 19:28:53 UTC 2010
Author: nekral-guest
Date: Mon Oct 11 19:28:45 2010
New Revision: 2286
URL: http://svn.debian.org/wsvn/po4a/?sc=1&rev=2286
Log:
* lib/Locale/Po4a/Man.pm: Make sure input is always passing
through either sub t{} or sub r{}. Convert back non breaking
spaces in sub r{}. This fixes the handling of mdoc(7).
Modified:
trunk/changelog
trunk/lib/Locale/Po4a/Man.pm
Modified: trunk/changelog
URL: http://svn.debian.org/wsvn/po4a/trunk/changelog?rev=2286&op=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Mon Oct 11 19:28:45 2010
@@ -1,3 +1,9 @@
+2010-03-17 Nicolas François <nicolas.francois at centraliens.net>
+
+ * lib/Locale/Po4a/Man.pm: Make sure input is always passing
+ through either sub t{} or sub r{}. Convert back non breaking
+ spaces in sub r{}. This fixes the handling of mdoc(7).
+
2010-10-02 Denis Barbier <barbier-guest at alioth.debian.org>
* lib/Locale/Po4a/Texinfo.pm: Fix handling of
Modified: trunk/lib/Locale/Po4a/Man.pm
URL: http://svn.debian.org/wsvn/po4a/trunk/lib/Locale/Po4a/Man.pm?rev=2286&op=diff
==============================================================================
--- trunk/lib/Locale/Po4a/Man.pm (original)
+++ trunk/lib/Locale/Po4a/Man.pm Mon Oct 11 19:28:45 2010
@@ -1216,7 +1216,14 @@
# As a rule of thumb, I do not recode macro names, unless they may be
# followed by other characters.
sub r {
- return $_[0]->recode_skipped_text($_[1]);
+ my $self = shift;
+ my $str = shift;
+
+ # non-breaking spaces
+ # some non-breaking spaces may have been added during the parsing
+ $str =~ s/\Q$nbs/\\ /sg;
+
+ return $self->recode_skipped_text($str);
}
@@ -1772,8 +1779,8 @@
# For macro whose arguments shouldn't be translated
sub untranslated {
- my $self = shift;
- $self->pushmacro(@_);
+ my ($self,$first)= (shift,0);
+ $self->pushmacro( map { $first++ ?$self->r($_):$_ } @_);
}
###
More information about the Po4a-commits
mailing list