]> git.deb.at Git - deb/packages.git/commitdiff
Packages::I18N::Locale: Simplify format string test regex
authorFrank Lichtenheld <frank@lichtenheld.de>
Mon, 10 Dec 2007 20:41:07 +0000 (21:41 +0100)
committerFrank Lichtenheld <frank@lichtenheld.de>
Mon, 10 Dec 2007 20:41:07 +0000 (21:41 +0100)
We only use %s and %u now, no need to test for %f anymore

lib/Packages/I18N/Locale.pm.sed.in

index 11c75a39e93df80ef336431a63badf03374b4f74..d33f820b92a8abc405f092b2109e4edd556442af 100644 (file)
@@ -28,7 +28,7 @@ sub N_ { return $_[0]; }
 sub g {
     my ($self, $format, @args) = @_;
     my $result = $self->maketext($format, @args);
 sub g {
     my ($self, $format, @args) = @_;
     my $result = $self->maketext($format, @args);
-    return sprintf($result, @args) if $result =~ /%([su]|[.\d]*f)/;
+    return sprintf($result, @args) if $result =~ /%[su]/o;
     return $result;
 }
 
     return $result;
 }