X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/aa2b3b8f637d0f3abe2ebf3845a22781ffd83c72..c23abb3553cf03e9b85aff0e9a6cc8e1c55acde5:/IkiWiki/Plugin/googlecalendar.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/googlecalendar.pm b/IkiWiki/Plugin/googlecalendar.pm index c99563d95..c6409e5e6 100644 --- a/IkiWiki/Plugin/googlecalendar.pm +++ b/IkiWiki/Plugin/googlecalendar.pm @@ -3,13 +3,12 @@ package IkiWiki::Plugin::googlecalendar; use warnings; use strict; -use IkiWiki; -use IPC::Open2; +use IkiWiki 2.00; sub import { #{{{ - IkiWiki::hook(type => "preprocess", id => "googlecalendar", + hook(type => "preprocess", id => "googlecalendar", call => \&preprocess); - IkiWiki::hook(type => "format", id => "googlecalendar", + hook(type => "format", id => "googlecalendar", call => \&format); } # }}} @@ -20,7 +19,7 @@ sub preprocess (@) { #{{{ # Avoid XSS attacks.. my ($url)=$params{html}=~m#iframe\s+src="http://www\.google\.com/calendar/embed\?([^"<>]+)"#; if (! defined $url || ! length $url) { - return "[[googlecalendar failed to find url in html]]"; + return "[[googlecalendar ".gettext("failed to find url in html")."]]"; } my ($height)=$params{html}=~m#height="(\d+)"#; my ($width)=$params{html}=~m#width="(\d+)"#;