summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/po.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index d92443b18..60a9f2632 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -35,6 +35,7 @@ sub import { #{{{
hook(type => "filter", id => "po", call => \&filter);
hook(type => "htmlize", id => "po", call => \&htmlize);
hook(type => "pagetemplate", id => "po", call => \&pagetemplate, last => 1);
+ hook(type => "delete", id => "po", call => \&mydelete);
hook(type => "change", id => "po", call => \&change);
hook(type => "editcontent", id => "po", call => \&editcontent);
@@ -325,6 +326,12 @@ sub pagetemplate (@) { #{{{
}
} # }}}
+sub mydelete(@) { #{{{
+ my @deleted=@_;
+
+ map { deletetranslations($_) } grep istranslatablefile($_), @deleted;
+} #}}}
+
sub change(@) { #{{{
my @rendered=@_;
@@ -757,6 +764,13 @@ sub homepageurl (;$) { #{{{
return urlto('', $page);
} #}}}
+# do *not* implement this until the renamepage hook works
+sub deletetranslations ($) { #{{{
+ my $file=shift;
+
+ debug 'po(deletetranslations): TODO: delete translations of ' . $file;
+} #}}}
+
# ,----
# | PageSpec's
# `----