}
} #}}}
+sub buildtranslationscache() { #{{{
+ # use istranslation's side-effect
+ map istranslation($_), (keys %pagesources);
+} #}}}
+
+sub resettranslationscache() { #{{{
+ undef %translations;
+} #}}}
+
sub needsbuild () { #{{{
my $needsbuild=shift;
# a given master page was rendered because its source file was changed
@origneedsbuild=(@$needsbuild);
- # build %translations, using istranslation's side-effect
- map istranslation($_), (keys %pagesources);
+ buildtranslationscache();
# make existing translations depend on the corresponding master page
foreach my $master (keys %translations) {
}
# Reinitialize module's private variables.
resetalreadyfiltered();
- undef %translations;
+ resettranslationscache();
# Trigger a wiki refresh.
require IkiWiki::Render;
IkiWiki::refresh();