- my $content=readfile(srcfile($file));
- $content=IkiWiki::Plugin::po::po_to_markup($page, $content);
- writefile($masterpage.".".$config{default_pageext}, $config{destdir}, $content);
+ my $content=IkiWiki::Plugin::po::po_to_markup($page, readfile(srcfile($file)));
+ # avoid wasting space if the page is not translated at all
+ my $mastercontent=readfile(srcfile($pagesources{$masterpage}));
+ if ($content ne $mastercontent) {
+ writefile($masterpage.".".$config{default_pageext},
+ $config{destdir}, $content);
+ }