X-Git-Url: http://git.tremily.us/?a=blobdiff_plain;f=IkiWiki%2FPlugin%2Fgooglecalendar.pm;h=3f5102210f0e30ae73ba3a322b7ab98345c69084;hb=4d8b2d84d5635e0e718e9f66fcdf6e20587fbc2c;hp=c99563d9591f856ed7e01661534733ea812b206e;hpb=aa2b3b8f637d0f3abe2ebf3845a22781ffd83c72;p=ikiwiki.git diff --git a/IkiWiki/Plugin/googlecalendar.pm b/IkiWiki/Plugin/googlecalendar.pm index c99563d95..3f5102210 100644 --- a/IkiWiki/Plugin/googlecalendar.pm +++ b/IkiWiki/Plugin/googlecalendar.pm @@ -4,12 +4,11 @@ package IkiWiki::Plugin::googlecalendar; use warnings; use strict; use IkiWiki; -use IPC::Open2; 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+)"#;