summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/po.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index f29ad7a79..e06fd5043 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -19,6 +19,7 @@ memoize("_istranslation");
sub import {
hook(type => "getsetup", id => "po", call => \&getsetup);
hook(type => "checkconfig", id => "po", call => \&checkconfig);
+ hook(type => "scan", id => "po", call => \&scan);
hook(type => "targetpage", id => "po", call => \&targetpage);
hook(type => "tweakurlpath", id => "po", call => \&tweakurlpath);
hook(type => "tweakbestlink", id => "po", call => \&tweakbestlink);
@@ -89,6 +90,15 @@ sub checkconfig () { #{{{
push @{$config{wiki_file_prune_regexps}}, qr/\.pot$/;
} #}}}
+sub scan (@) { #{{{
+ my %params=@_;
+ my $page=$params{page};
+ # let's build %translations, using istranslation's
+ # side-effect, so that we can consider it is complete at
+ # preprocess time
+ istranslation($page);
+} #}}}
+
sub targetpage (@) { #{{{
my %params = @_;
my $page=$params{page};