From a8e8613fa11c1ac0b0f82e159df97d0837ae97e5 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Tue, 14 Oct 2008 23:58:21 +0200 Subject: po plugin: bugfix - only refresh POT/PO for translatable pages Signed-off-by: intrigeri --- IkiWiki/Plugin/po.pm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 42391089b..ca26101b7 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -138,14 +138,17 @@ sub needsbuild () { #{{{ istranslation($page); } + # refresh POT and PO files as needed foreach my $file (@$needsbuild) { my $page=pagename($file); - refreshpot(srcfile($file)) if (istranslatable($page)); - my @pofiles; - foreach my $lang (keys %{$translations{$page}}) { - push @pofiles, $pagesources{$translations{$page}{$lang}}; + if (istranslatable($page)) { + refreshpot(srcfile($file)); + my @pofiles; + foreach my $lang (keys %{$translations{$page}}) { + push @pofiles, $pagesources{$translations{$page}{$lang}}; + } + refreshpofiles(srcfile($file), map { srcfile($_) } @pofiles); } - refreshpofiles(srcfile($file), map { srcfile($_) } @pofiles); } } #}}} -- cgit v1.2.3