summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2008-11-12 18:03:14 +0100
committerintrigeri <intrigeri@boum.org>2008-11-12 18:06:04 +0100
commitc440a39ba4ba6726ab67b0e1d04b064ae84f67ef (patch)
tree4cccfbd5980dcca0c4b3c2ec0494b4d7ffa90208 /IkiWiki/Plugin
parent2f27eb969393e9df6617f09004ae2357fa15cd0c (diff)
po(htmlize): ignore PO files not managed by this plugin
This way, the po plugin will not appropriate PO files it is not responsible for, and PO files existing before this plugin was enabled can coexist peacefully with our own ones. Signed-off-by: intrigeri <intrigeri@boum.org>
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/po.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 8ece342a8..1212181ca 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -262,10 +262,14 @@ sub htmlize (@) { #{{{
my $page = $params{page};
my $content = $params{content};
- my $masterfile = srcfile($pagesources{masterpage($page)});
+
+ # ignore PO files this plugin did not create
+ return $content unless istranslation($page);
# force content to be htmlize'd as if it was the same type as the master page
- return IkiWiki::htmlize($page, $page, pagetype($masterfile), $content);
+ return IkiWiki::htmlize($page, $page,
+ pagetype(srcfile($pagesources{masterpage($page)})),
+ $content);
} #}}}
sub pagetemplate (@) { #{{{