From: intrigeri Date: Wed, 31 Dec 2008 14:45:05 +0000 (+0100) Subject: po(nicepagetitle): append translation status to links to translated pages X-Git-Tag: 3.15~312 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0d874f0b69c25cb4c5faed59261446dad0b22d32;p=ikiwiki.git po(nicepagetitle): append translation status to links to translated pages Signed-off-by: intrigeri --- diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 93274ba13..292775975 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -490,7 +490,9 @@ sub myurlto ($$;$) { #{{{ sub mynicepagetitle ($;$) { #{{{ my ($page, $unescaped) = (shift, shift); - return $origsubs{'nicepagetitle'}->($page, $unescaped); + my $res = $origsubs{'nicepagetitle'}->($page, $unescaped); + return $res unless istranslation($page); + return $res." (".percenttranslated($page).")"; } #}}} # ,----