]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/po.pm
po: actually use pofiles() function, to enhance code clarity
[ikiwiki.git] / IkiWiki / Plugin / po.pm
index e7f36e968361c21e9679a80ad5d112258c8e3e1f..8ea852d04f56f8cbc7f72293c276a655d21bd8c7 100644 (file)
@@ -584,12 +584,9 @@ sub change(@) { #{{{
                        $updated_pot_file=1;
                }
                my @pofiles;
-               foreach my $lang (keys %{$config{po_slave_languages}}) {
-                       my $pofile=pofile($file, $lang);
-                       if ($updated_pot_file || ! -e $pofile) {
-                               push @pofiles, $pofile;
-                       }
-               }
+               map {
+                       push @pofiles, $_ if ($updated_pot_file || ! -e $_);
+               } (pofiles($file));
                if (@pofiles) {
                        refreshpofiles($file, @pofiles);
                        map { IkiWiki::rcs_add($_); } @pofiles if ($config{rcs});