]> sipb.mit.edu Git - ikiwiki.git/commitdiff
po plugin: rebuild %translations after having created missing POT/PO files
authorintrigeri <intrigeri@boum.org>
Wed, 15 Oct 2008 03:27:28 +0000 (05:27 +0200)
committerintrigeri <intrigeri@boum.org>
Sat, 18 Oct 2008 13:49:12 +0000 (15:49 +0200)
This is not needed yet, but when newly created POT/PO files are added to
%pagesources and other data structures, we'll need this.

Signed-off-by: intrigeri <intrigeri@boum.org>
IkiWiki/Plugin/po.pm

index 43b36430f7267cd3abb5d808185971c376be285a..62a2aa3db2a36a508cb9429c1e4958183ba419d9 100644 (file)
@@ -169,6 +169,14 @@ sub needsbuild () { #{{{
                }
        }
 
                }
        }
 
+       # 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) {
                foreach my $slave (values %{$translations{$master}}) {
        # make existing translations depend on the corresponding master page
        foreach my $master (keys %translations) {
                foreach my $slave (values %{$translations{$master}}) {