diff options
author | intrigeri <intrigeri@boum.org> | 2008-10-05 19:56:53 +0200 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2008-10-18 15:49:07 +0200 |
commit | 575d4021e3a2da519f20d83be4916cb172ec5e2f (patch) | |
tree | c211e122f845af227c76bd085ccc75d0896b4184 /IkiWiki/Plugin/po.pm | |
parent | 1b5f610a974bedd98b4feeaf566f6ad2eeb6acab (diff) |
po plugin: htmlize translated content as if it was the same type as the master page
Signed-off-by: intrigeri <intrigeri@boum.org>
Diffstat (limited to 'IkiWiki/Plugin/po.pm')
-rw-r--r-- | IkiWiki/Plugin/po.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 62632e1df..dbeb0b481 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -92,9 +92,13 @@ sub filter (@) { #{{{ sub htmlize (@) { #{{{ my %params=@_; + my $page = $params{page}; my $content = $params{content}; - # FIXME: run master page's type htmlize hook - return $content; + my ($masterpage, $lang) = ($page =~ /(.*)[.]([a-z]{2})$/); + my $masterfile = srcfile($pagesources{$masterpage}); + + # 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); } #}}} package IkiWiki::PageSpec; |