X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/1a670d3aca228fb9baed05890b175ef9aed9b102..6add615928581ddacd03b01de126fb098d1a8eda:/IkiWiki/Plugin/po.pm diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index eee6d4058..98c070481 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -18,6 +18,7 @@ use Memoize; my %translations; memoize("istranslatable"); memoize("_istranslation"); +memoize("percenttranslated"); sub import { hook(type => "getsetup", id => "po", call => \&getsetup); @@ -318,6 +319,9 @@ sub pagetemplate (@) { #{{{ my $page=$params{page}; my $template=$params{template}; + if (istranslation($page) && $template->query(name => "percenttranslated")) { + $template->param(percenttranslated => percenttranslated($page)); + } if ($template->query(name => "otherlanguages")) { $template->param(otherlanguages => [otherlanguages($page)]); }