X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/779c5214f330269fa95a5fed5b16fe8d65730102..339478ba4737d77b5e03a3489c3f1f78b7af147d:/IkiWiki/Plugin/progress.pm?ds=inline diff --git a/IkiWiki/Plugin/progress.pm b/IkiWiki/Plugin/progress.pm index 6cb21a916..e536f4e23 100644 --- a/IkiWiki/Plugin/progress.pm +++ b/IkiWiki/Plugin/progress.pm @@ -29,12 +29,11 @@ sub preprocess (@) { #{{{ if (defined $params{percent}) { $fill = $params{percent}; ($fill) = $fill =~ m/($percentage_pattern)/; # fill is untainted now + $fill=~s/%$//; if (! defined $fill || ! length $fill || $fill > 100 || $fill < 0) { - error("illegal percent value $params{percent}"); - } - elsif ($fill !~ /%$/) { - $fill.="%"; + error(sprintf(gettext("illegal percent value %s"), $params{percent})); } + $fill.="%"; } elsif (defined $params{totalpages} and defined $params{donepages}) { add_depends($params{page}, $params{totalpages}); @@ -57,7 +56,7 @@ sub preprocess (@) { #{{{ } } else { - error("need either `percent` or `totalpages` and `donepages` parameters"); + error(gettext("need either `percent` or `totalpages` and `donepages` parameters")); } return <