]> sipb.mit.edu Git - ikiwiki.git/commitdiff
po plugin: only refresh private module variables when needed
authorintrigeri <intrigeri@boum.org>
Wed, 15 Oct 2008 05:23:06 +0000 (07:23 +0200)
committerintrigeri <intrigeri@boum.org>
Sat, 18 Oct 2008 13:49:13 +0000 (15:49 +0200)
Signed-off-by: intrigeri <intrigeri@boum.org>
IkiWiki/Plugin/po.pm

index 9a25ff60263e0780a26bc875f91805e4764a1a66..e4cd6165fbbf28be7239adf99ee99517d8aa0a97 100644 (file)
@@ -186,16 +186,14 @@ sub needsbuild () { #{{{
                }
                IkiWiki::refresh();
                IkiWiki::saveindex();
+               # refresh module's private variables
                %filtered=undef;
+               %translations=undef;
+               foreach my $page (keys %pagesources) {
+                       istranslation($page);
+               }
        }
 
-       # refresh %translations, using istranslation's side-effect
-       # (not needed yet, but when newly created POT/PO files are
-       # added to %pagesources and other data structures, we'll need
-       # this)
-       foreach my $page (keys %pagesources) {
-               istranslation($page);
-       }
 
        # make existing translations depend on the corresponding master page
        foreach my $master (keys %translations) {