diff options
author | intrigeri <intrigeri@boum.org> | 2008-11-13 01:07:52 +0100 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2008-11-13 01:07:52 +0100 |
commit | cb1fe44f5d1b7154ee7d21f00fa6ecf4972815a7 (patch) | |
tree | 7e686d41bcfd7ee70d2fcfb3f1c6db46f0a7ff4e | |
parent | 8745d67f066e3dd7e3c19f2da517711b724ba7a7 (diff) |
po(change): avoid losing information before guessing the same...
Signed-off-by: intrigeri <intrigeri@boum.org>
-rw-r--r-- | IkiWiki/Plugin/po.pm | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index f13093963..d92443b18 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -331,24 +331,25 @@ sub change(@) { #{{{ my $updated_po_files=0; # Refresh/create POT and PO files as needed. - foreach my $page (map pagename($_), @rendered) { - next unless istranslatable($page); - my $file=srcfile($pagesources{$page}); + foreach my $file (@rendered) { + next unless istranslatablefile($file); + my $page=pagename($file); + my $masterfile=srcfile($file); my $updated_pot_file=0; # Only refresh Pot file if it does not exist, or if # $pagesources{$page} was changed: don't if only the HTML was # refreshed, e.g. because of a dependency. if ((grep { $_ eq $pagesources{$page} } @origneedsbuild) - || ! -e potfile($file)) { - refreshpot($file); + || ! -e potfile($masterfile)) { + refreshpot($masterfile); $updated_pot_file=1; } my @pofiles; map { push @pofiles, $_ if ($updated_pot_file || ! -e $_); - } (pofiles($file)); + } (pofiles($masterfile)); if (@pofiles) { - refreshpofiles($file, @pofiles); + refreshpofiles($masterfile, @pofiles); map { IkiWiki::rcs_add($_); } @pofiles if ($config{rcs}); $updated_po_files=1; } |