From d1642e4cd9d77b2be6c20690912559b89b1dce2b Mon Sep 17 00:00:00 2001 From: intrigeri Date: Fri, 2 Jan 2009 12:35:46 +0100 Subject: po: cosmetic changes to percent translated display Signed-off-by: intrigeri --- IkiWiki/Plugin/po.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index c8b5e8fde..61331edeb 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -541,7 +541,7 @@ sub mynicepagetitle ($;$) { my $res = $origsubs{'nicepagetitle'}->($page, $unescaped); return $res unless istranslation($page); return $res unless $config{po_translation_status_in_links}; - return $res.' ('.percenttranslated($page).' %)'; + return $res.' ('.percenttranslated($page).' %)'; } # ,---- @@ -795,6 +795,7 @@ sub percenttranslated ($) { 'file_out_charset' => 'utf-8', ) or error("[po/percenttranslated:$page]: failed to translate"); my ($percent,$hit,$queries) = $doc->stats(); + $percent =~ s/\.[0-9]+$//; return $percent; } -- cgit v1.2.3