po(nicepagetitle): append translation status to links to translated pages
authorintrigeri <intrigeri@boum.org>
Wed, 31 Dec 2008 14:45:05 +0000 (15:45 +0100)
committerintrigeri <intrigeri@boum.org>
Wed, 31 Dec 2008 14:45:05 +0000 (15:45 +0100)
Signed-off-by: intrigeri <intrigeri@boum.org>
IkiWiki/Plugin/po.pm

index 93274ba1300ac774bdd39912d61172a72589191b..2927759754f0832fc324aafe9f7258ccb7619e5f 100644 (file)
@@ -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).")";
 } #}}}
 
 # ,----