summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2008-10-14 23:58:21 +0200
committerintrigeri <intrigeri@boum.org>2008-10-18 15:49:11 +0200
commita8e8613fa11c1ac0b0f82e159df97d0837ae97e5 (patch)
treeaa0c5f8e342449d40bc0db55d1f65d2d3ce96c28 /IkiWiki
parentdc74c8e5770a1b1df02a001e5c8ffd5cf1325252 (diff)
po plugin: bugfix - only refresh POT/PO for translatable pages
Signed-off-by: intrigeri <intrigeri@boum.org>
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/po.pm13
1 files 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);
}
} #}}}