From: intrigeri Date: Fri, 2 Jan 2009 11:35:46 +0000 (+0100) Subject: po: cosmetic changes to percent translated display X-Git-Tag: 3.15~278 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/d1642e4cd9d77b2be6c20690912559b89b1dce2b?hp=f58cb48f1f5b718886109642ec2caed45709b5e7 po: cosmetic changes to percent translated display Signed-off-by: intrigeri --- 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; }